Show
Ignore:
Timestamp:
12.12.2014 15:12:15 (5 years ago)
Author:
jts21
Message:

Changes to get Ubuntu working.

Location:
main/trunk/package-kits/linux
Files:
4 added
11 modified
2 moved

Legend:

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

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

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

    r29577 r29607  
    1111TOMCAT_USER:            tomcat7 
    1212GLI:                    %GREENSTONE_HOME%/gli 
     13 
     14ARCH_NATIVE: 
     15    any 
     16 
     17ARCH_ANY: 
     18    all 
    1319 
    1420PKG_SVN: 
  • main/trunk/package-kits/linux/managers/apt/files/debian/rules

    r29508 r29607  
    33%: 
    44    dh $@ --with autotools_dev 
     5 
     6override_dh_shlibdeps: 
     7        dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info 
  • main/trunk/package-kits/linux/packages/demo

    r29583 r29607  
    66DESCRIPTION:            'Several example collections for Greenstone Digital Library' 
    77HOMEPAGE:               http://greenstone.org 
    8 ARCHITECTURE:           any 
     8ARCHITECTURE:           %ARCH_ANY% 
    99LICENSE_SHORT:          GPL-2 
    1010LICENSE:                 
  • main/trunk/package-kits/linux/packages/gli

    r29583 r29607  
    66DESCRIPTION:            'A GUI interface for using the Greenstone Tools' 
    77HOMEPAGE:               http://greenstone.org 
    8 ARCHITECTURE:           any 
     8ARCHITECTURE:           %ARCH_ANY% 
    99LICENSE_SHORT:          GPL-2 
    1010LICENSE:                 
     
    2525FILES: 
    2626    %GLI% 
    27     %{_bindir}/* 
     27    %BUILD_BIN_DIR% 
    2828 
    2929SOURCES: 
  • main/trunk/package-kits/linux/packages/greenstone

    r29595 r29607  
    1111    greenstone 
    1212    wvWare 
     13    perl-util.patch 
    1314    gs2build.patch 
    1415    servlets.patch 
     
    2021    src 
    2122    clean 
    22     build-core 
     23    core 
    2324    main 
    2425    native 
     
    4344NATIVE_DESCRIPTION_SHORT:       'Native libraries for Greenstone' 
    4445NATIVE_DESCRIPTION:             'Architecture-dependent binary files required by the core Greenstone package' 
    45 NATIVE_ARCHITECTURE:            %ARCH% 
     46NATIVE_ARCHITECTURE:            %ARCH_NATIVE% 
    4647 
    4748NATIVE_DEPENDS: 
     
    5253 
    5354NATIVE_FILES:                   
    54     %TOMCATLIB%/* 
    55     %{_libdir}/* 
     55    %BUILD_LIB_DIR% 
    5656 
    5757 
     
    5959TOOLS_DESCRIPTION_SHORT:        'Tools for building Greenstone collections' 
    6060TOOLS_DESCRIPTION:              %TOOLS_DESCRIPTION_SHORT% 
    61 TOOLS_ARCHITECTURE:             %ARCH% 
     61TOOLS_ARCHITECTURE:             %ARCH_NATIVE% 
    6262 
    6363TOOLS_DEPENDS: 
     
    7373 
    7474TOOLS_FILES: 
    75         %GREENSTONE_HOME%/* 
    76         %{_bindir}/* 
     75    %GREENSTONE_HOME%/bin 
     76    %GREENSTONE_HOME%/gs2build 
     77    %BUILD_BIN_DIR% 
    7778 
    7879 
     
    8081MAIN_DESCRIPTION_SHORT:         'Greenstone Digital Library' 
    8182MAIN_DESCRIPTION:               'Greenstone is a suite of software for building and distributing digital library collections' 
    82 MAIN_ARCHITECTURE:              any 
     83MAIN_ARCHITECTURE:              %ARCH_ANY% 
    8384 
    8485MAIN_DEPENDS: 
     
    9899    %TOMCATCONF%/* 
    99100    %TOMCATLIB%/* 
    100     %{_libdir}/* 
    101101 
    102102MAIN_POST_INSTALL: 
  • main/trunk/package-kits/linux/perllib/Greenstone/Package.pm

    r29595 r29607  
    5959    $self->readconf ("global.conf"); 
    6060    $self->readconf ($distro_conf); 
    61     $self->{config}->{ARCH} = (uname)[4]; 
     61 
     62    my $manager_conf = "managers/$self->{config}->{MANAGER}/conf"; 
     63    -f $manager_conf or die "Manager config for '$self->{config}->{MANAGER}' does not exist"; 
     64 
     65    $self->readconf ($manager_conf); 
    6266 
    6367    die "Distro '$args{distro}' is invalid (does not specify a manager)" 
     
    7983    $self->add_sources; 
    8084    $self->add_makefile; 
    81     $self->add_install; 
    8285    $self->add_package; 
    8386} 
     
    130133     
    131134    # Add the (relatively) static files 
    132     $self->add ("managers/$self->{config}->{MANAGER}", $self->{output}); 
     135    my $static = "managers/$self->{config}->{MANAGER}/files"; 
     136    -d $static and $self->add ($static, $self->{output}); 
    133137 
    134138    if (exists $self->{config}->{SUB_PACKAGES}) { 
  • main/trunk/package-kits/linux/perllib/Greenstone/Package/_apt.pm

    r29598 r29607  
    66use parent 'Greenstone::Package'; 
    77 
     8# Deb packages expect lists to be comma separated 
    89sub replacement_array { 
    910    my $self = shift; 
     
    1617    my $file = "$self->{output}/debian/$name"; 
    1718    print "    - $file\n"; 
    18     open my $OUT, '>', $file; 
     19    open my $OUT, '>', $file 
     20        or die "Failed to open $file: $!"; 
    1921    for my $line (@lines) { 
    2022        print $OUT $line, "\n"; 
     
    2426} 
    2527 
     28# Add pre/post install/remove hooks 
    2629sub add_install { 
    27     my $self = shift; 
     30    my ($self, $name) = @_; 
     31    my $prefix = (defined $name ? "$name." : ""); 
    2832    exists $self->{config}->{PRE_INSTALL} and 
    29         $self->write_function ("preinst", @{$self->{config}->{PRE_INSTALL}}); 
     33        $self->write_function ("${prefix}preinst", @{$self->{config}->{PRE_INSTALL}}); 
    3034    exists $self->{config}->{POST_INSTALL} and 
    31         $self->write_function ("postinst", @{$self->{config}->{POST_INSTALL}}); 
     35        $self->write_function ("${prefix}postinst", @{$self->{config}->{POST_INSTALL}}); 
    3236    exists $self->{config}->{PRE_REMOVE} and 
    33         $self->write_function ("prerm", @{$self->{config}->{PRE_REMOVE}}); 
     37        $self->write_function ("${prefix}prerm", @{$self->{config}->{PRE_REMOVE}}); 
    3438    exists $self->{config}->{POST_REMOVE} and 
    35         $self->write_function ("postrm", @{$self->{config}->{POST_REMOVE}}); 
     39        $self->write_function ("${prefix}postrm", @{$self->{config}->{POST_REMOVE}}); 
    3640} 
    3741 
     42# Adds a definition for a package or subpackage 
    3843sub add_package_section { 
    3944    my ($self, $out) = @_; 
     
    4247        'Architecture: %ARCHITECTURE%', 
    4348        'Homepage: %HOMEPAGE%', 
    44         'Depends:', 
    45         '  %DEPENDS%', 
    46         'Description: %DESCRIPTION_SHORT', 
    47         '  %DESCRIPTION' 
     49        'Depends: %DEPENDS%', 
     50        'Description: %DESCRIPTION_SHORT%', 
     51        '  %DESCRIPTION%', 
     52        '' 
    4853    ) { 
    4954        my $copy = $line; 
     
    5358} 
    5459 
     60# Handles the apt-specific package generation 
    5561sub add_package_impl { 
    5662    my ($self, $packages) = @_; 
    57     $self->add_install; 
    5863    my $file = "$self->{output}/debian/control"; 
    5964    print "    - $file\n"; 
    60     open my $CONTROL, '>', $file; 
     65    open my $CONTROL, '>', $file 
     66        or die "Failed to open $file: $!"; 
    6167    for my $line ( 
    6268        'Source: %NAME%', 
     
    6470        'Priority: optional', 
    6571        'Maintainer: %MAINTAINER_NAME% <%MAINTAINER_EMAIL%>', 
    66         'Build-Depends:', 
    67         '  %MAKEDEPENDS%', 
     72        'Build-Depends: %MAKEDEPENDS%', 
     73        '' 
    6874    ) { 
    6975        my $copy = $line; 
     
    7379    if (defined $packages) { 
    7480        my $config = $self->{config}; 
     81        my @names; 
    7582        for my $package (@{$packages}) { 
     83            push @names, $package->{NAME}; 
    7684            $package->{HOMEPAGE} = $config->{HOMEPAGE}; 
    7785            $self->{config} = $package; 
     86            $self->add_install ($package->{NAME}); 
    7887            $self->add_package_section ($CONTROL); 
     88            my $install = "$self->{output}/debian/$self->{config}->{NAME}.install"; 
     89            open my $INSTALL, '>', $install; 
     90            for my $line (@{$self->{config}->{FILES}}) { 
     91                print $INSTALL $line, "\n"; 
     92            } 
     93            close $INSTALL; 
    7994        } 
    8095        $self->{config} = $config; 
     96        my $rules = "$self->{output}/debian/rules"; 
     97        open my $RULES, '>>', $rules 
     98            or die "Failed to open $rules: $!"; 
     99        print $RULES "\noverride_dh_gencontrol:\n"; 
     100        for my $name (@names) { 
     101            print $RULES "\tdh_gencontrol -p$name\n"; 
     102        } 
     103        close $RULES; 
    81104    } else { 
     105        $self->add_install; 
    82106        $self->add_package_section ($CONTROL); 
    83107    } 
  • main/trunk/package-kits/linux/perllib/Greenstone/Package/_pacman.pm

    r29598 r29607  
    9494        'url=%HOMEPAGE%', 
    9595        'license=%LICENSE_SHORT%', 
    96         'arch=(any)', 
     96        'arch=(' . (defined $self->{config}->{ARCH} ? '%ARCH%' : 'any') . ')', 
    9797        'makedepends=(', 
    9898        '%MAKEDEPENDS%', 
  • main/trunk/package-kits/linux/perllib/Greenstone/Package/_rpm.pm

    r29598 r29607  
    9090                $self->add_install, 
    9191                '%files', 
    92                 '%FILES%' 
     92                '%FILES%', 
     93                '', 
     94                '' 
    9395            ) { 
    9496                my $copy = $line; 
  • main/trunk/package-kits/linux/segments/core

    r29577 r29607  
    2121    find src/ \( -iname "*.dll" -o -iname "*.exe" \) -exec rm -rf {} \; || : 
    2222    touch build 
     23 
     24install: install_greenstone install_greenstone-native install_greenstone-tools