Changeset 29638


Ignore:
Timestamp:
2014-12-15T15:56:33+13:00 (9 years ago)
Author:
Jeremy Symon
Message:

Building for correct architecture for RPM. Kind of. Subpackage architectures don't work due to a flaw in RPM subpackages (see rant in perllib/Greenstone/Package/_rpm.pm for details)

Location:
main/trunk/package-kits/linux
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/package-kits/linux/distros/arch

    r29607 r29638  
    1111TOMCAT_USER:            tomcat7
    1212GLI:                    %GREENSTONE_HOME%/gli
    13 
    14 ARCH_NATIVE:
    15     'x86_64'
    16     'i686'
    17 
    18 ARCH_ANY:
    19     'any'
    2013
    2114PKG_SVN:
  • main/trunk/package-kits/linux/distros/fedora

    r29607 r29638  
    1111TOMCAT_USER:            tomcat
    1212GLI:                    %GREENSTONE_HOME%/gli
    13 
    14 ARCH_NATIVE:
    15     x86_64
    16     i686
    17 
    18 ARCH_ANY:
    19     any
    2013
    2114PKG_SVN:
  • main/trunk/package-kits/linux/distros/ubuntu

    r29607 r29638  
    1111TOMCAT_USER:            tomcat7
    1212GLI:                    %GREENSTONE_HOME%/gli
    13 
    14 ARCH_NATIVE:
    15     any
    16 
    17 ARCH_ANY:
    18     all
    1913
    2014PKG_SVN:
  • main/trunk/package-kits/linux/managers/apt/conf

    r29607 r29638  
    11BUILD_LIB_DIR:  %SYSTEMLIB%
    22BUILD_BIN_DIR:  %SYSTEMBIN%
     3
     4ARCH_NATIVE:            any
     5ARCH_ANY:               all
  • main/trunk/package-kits/linux/managers/pacman/conf

    r29607 r29638  
    11BUILD_LIB_DIR:  %SYSTEMLIB%
    22BUILD_BIN_DIR:  %SYSTEMBIN%
     3
     4ARCH_NATIVE:            'x86_64' 'i686'
     5ARCH_ANY:               'any'
  • main/trunk/package-kits/linux/managers/rpm/conf

    r29607 r29638  
    11BUILD_LIB_DIR:  %{_libdir}/*
    22BUILD_BIN_DIR:  %{_bindir}/*
     3
     4ARCH_NATIVE:           
     5ARCH_ANY:               noarch
  • main/trunk/package-kits/linux/perllib/Greenstone/Package/_rpm.pm

    r29611 r29638  
    5353        my @optional;
    5454        scalar(@{$self->{config}->{DEPENDS}}) gt 0 and
    55             push @optional, 'Requires:  %DEPENDS%';
     55            push @optional, 'Requires:      %DEPENDS%';
     56        # Cannot set architecture for subpackages because RPM's subpackages
     57        #  implementation is broken.
     58        # Greenstone core gets split into three packages:
     59        #  - The main web servlets (java classes)       - noarch
     60        #  - The native libraries used by the servlets  - native
     61        #  - The tools for building collections         - native
     62        # As RPM forces subpackages to inherit their name from a root package,
     63        #  the main web servlets must be set as the root package
     64        #  (in order for everything to get the right name).
     65        # This means that the root package should be noarch, and the subpackages
     66        #  must be native.
     67        # But this is impossible with RPM (subpackages must be either the same
     68        #  architecture as the root package, or noarch)
     69        # To avoid this until someone fixes RPM into an actual working package
     70        #  manager, we will just make the core greenstone package pretend to
     71        #  be native.
     72        unless (defined $packages) {
     73            $self->{config}->{ARCHITECTURE} eq $self->{config}->{ARCH_ANY} and
     74                push @optional, 'BuildArch:     %ARCHITECTURE%';
     75        }
    5676        for my $line (
    5777            'Name:          %NAME%',
     
    95115            $self->{config} = $package;
    96116            my @optional;
    97             scalar(@{$package->{DEPENDS}}) gt 0 and
    98                 push @optional, 'Requires:  %DEPENDS%';
     117            scalar(@{$self->{config}->{DEPENDS}}) gt 0 and
     118                push @optional, 'Requires:      %DEPENDS%';
    99119            for my $line (
    100120                '%package %NAME%',
    101                 'Summary:   %DESCRIPTION_SHORT%',
     121                'Summary:       %DESCRIPTION_SHORT%',
    102122                'AutoReqProv:   no',
    103123                @optional,
Note: See TracChangeset for help on using the changeset viewer.