Changeset 29607 for main/trunk/package-kits
- Timestamp:
- 2014-12-12T15:12:15+13:00 (9 years ago)
- Location:
- main/trunk/package-kits/linux
- Files:
-
- 4 added
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/package-kits/linux/distros/arch
r29577 r29607 11 11 TOMCAT_USER: tomcat7 12 12 GLI: %GREENSTONE_HOME%/gli 13 14 ARCH_NATIVE: 15 'x86_64' 16 'i686' 17 18 ARCH_ANY: 19 'any' 13 20 14 21 PKG_SVN: -
main/trunk/package-kits/linux/distros/fedora
r29577 r29607 11 11 TOMCAT_USER: tomcat 12 12 GLI: %GREENSTONE_HOME%/gli 13 14 ARCH_NATIVE: 15 x86_64 16 i686 17 18 ARCH_ANY: 19 any 13 20 14 21 PKG_SVN: -
main/trunk/package-kits/linux/distros/ubuntu
r29577 r29607 11 11 TOMCAT_USER: tomcat7 12 12 GLI: %GREENSTONE_HOME%/gli 13 14 ARCH_NATIVE: 15 any 16 17 ARCH_ANY: 18 all 13 19 14 20 PKG_SVN: -
main/trunk/package-kits/linux/managers/apt/files/debian/rules
r29508 r29607 3 3 %: 4 4 dh $@ --with autotools_dev 5 6 override_dh_shlibdeps: 7 dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -
main/trunk/package-kits/linux/packages/demo
r29583 r29607 6 6 DESCRIPTION: 'Several example collections for Greenstone Digital Library' 7 7 HOMEPAGE: http://greenstone.org 8 ARCHITECTURE: any8 ARCHITECTURE: %ARCH_ANY% 9 9 LICENSE_SHORT: GPL-2 10 10 LICENSE: -
main/trunk/package-kits/linux/packages/gli
r29583 r29607 6 6 DESCRIPTION: 'A GUI interface for using the Greenstone Tools' 7 7 HOMEPAGE: http://greenstone.org 8 ARCHITECTURE: any8 ARCHITECTURE: %ARCH_ANY% 9 9 LICENSE_SHORT: GPL-2 10 10 LICENSE: … … 25 25 FILES: 26 26 %GLI% 27 % {_bindir}/*27 %BUILD_BIN_DIR% 28 28 29 29 SOURCES: -
main/trunk/package-kits/linux/packages/greenstone
r29595 r29607 11 11 greenstone 12 12 wvWare 13 perl-util.patch 13 14 gs2build.patch 14 15 servlets.patch … … 20 21 src 21 22 clean 22 build-core23 core 23 24 main 24 25 native … … 43 44 NATIVE_DESCRIPTION_SHORT: 'Native libraries for Greenstone' 44 45 NATIVE_DESCRIPTION: 'Architecture-dependent binary files required by the core Greenstone package' 45 NATIVE_ARCHITECTURE: %ARCH %46 NATIVE_ARCHITECTURE: %ARCH_NATIVE% 46 47 47 48 NATIVE_DEPENDS: … … 52 53 53 54 NATIVE_FILES: 54 %TOMCATLIB%/* 55 %{_libdir}/* 55 %BUILD_LIB_DIR% 56 56 57 57 … … 59 59 TOOLS_DESCRIPTION_SHORT: 'Tools for building Greenstone collections' 60 60 TOOLS_DESCRIPTION: %TOOLS_DESCRIPTION_SHORT% 61 TOOLS_ARCHITECTURE: %ARCH %61 TOOLS_ARCHITECTURE: %ARCH_NATIVE% 62 62 63 63 TOOLS_DEPENDS: … … 73 73 74 74 TOOLS_FILES: 75 %GREENSTONE_HOME%/* 76 %{_bindir}/* 75 %GREENSTONE_HOME%/bin 76 %GREENSTONE_HOME%/gs2build 77 %BUILD_BIN_DIR% 77 78 78 79 … … 80 81 MAIN_DESCRIPTION_SHORT: 'Greenstone Digital Library' 81 82 MAIN_DESCRIPTION: 'Greenstone is a suite of software for building and distributing digital library collections' 82 MAIN_ARCHITECTURE: any83 MAIN_ARCHITECTURE: %ARCH_ANY% 83 84 84 85 MAIN_DEPENDS: … … 98 99 %TOMCATCONF%/* 99 100 %TOMCATLIB%/* 100 %{_libdir}/*101 101 102 102 MAIN_POST_INSTALL: -
main/trunk/package-kits/linux/perllib/Greenstone/Package.pm
r29595 r29607 59 59 $self->readconf ("global.conf"); 60 60 $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); 62 66 63 67 die "Distro '$args{distro}' is invalid (does not specify a manager)" … … 79 83 $self->add_sources; 80 84 $self->add_makefile; 81 $self->add_install;82 85 $self->add_package; 83 86 } … … 130 133 131 134 # 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}); 133 137 134 138 if (exists $self->{config}->{SUB_PACKAGES}) { -
main/trunk/package-kits/linux/perllib/Greenstone/Package/_apt.pm
r29598 r29607 6 6 use parent 'Greenstone::Package'; 7 7 8 # Deb packages expect lists to be comma separated 8 9 sub replacement_array { 9 10 my $self = shift; … … 16 17 my $file = "$self->{output}/debian/$name"; 17 18 print " - $file\n"; 18 open my $OUT, '>', $file; 19 open my $OUT, '>', $file 20 or die "Failed to open $file: $!"; 19 21 for my $line (@lines) { 20 22 print $OUT $line, "\n"; … … 24 26 } 25 27 28 # Add pre/post install/remove hooks 26 29 sub add_install { 27 my $self = shift; 30 my ($self, $name) = @_; 31 my $prefix = (defined $name ? "$name." : ""); 28 32 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}}); 30 34 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}}); 32 36 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}}); 34 38 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}}); 36 40 } 37 41 42 # Adds a definition for a package or subpackage 38 43 sub add_package_section { 39 44 my ($self, $out) = @_; … … 42 47 'Architecture: %ARCHITECTURE%', 43 48 'Homepage: %HOMEPAGE%', 44 'Depends: ',45 ' %DEPENDS%',46 ' Description: %DESCRIPTION_SHORT',47 ' %DESCRIPTION'49 'Depends: %DEPENDS%', 50 'Description: %DESCRIPTION_SHORT%', 51 ' %DESCRIPTION%', 52 '' 48 53 ) { 49 54 my $copy = $line; … … 53 58 } 54 59 60 # Handles the apt-specific package generation 55 61 sub add_package_impl { 56 62 my ($self, $packages) = @_; 57 $self->add_install;58 63 my $file = "$self->{output}/debian/control"; 59 64 print " - $file\n"; 60 open my $CONTROL, '>', $file; 65 open my $CONTROL, '>', $file 66 or die "Failed to open $file: $!"; 61 67 for my $line ( 62 68 'Source: %NAME%', … … 64 70 'Priority: optional', 65 71 'Maintainer: %MAINTAINER_NAME% <%MAINTAINER_EMAIL%>', 66 'Build-Depends: ',67 ' %MAKEDEPENDS%',72 'Build-Depends: %MAKEDEPENDS%', 73 '' 68 74 ) { 69 75 my $copy = $line; … … 73 79 if (defined $packages) { 74 80 my $config = $self->{config}; 81 my @names; 75 82 for my $package (@{$packages}) { 83 push @names, $package->{NAME}; 76 84 $package->{HOMEPAGE} = $config->{HOMEPAGE}; 77 85 $self->{config} = $package; 86 $self->add_install ($package->{NAME}); 78 87 $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; 79 94 } 80 95 $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; 81 104 } else { 105 $self->add_install; 82 106 $self->add_package_section ($CONTROL); 83 107 } -
main/trunk/package-kits/linux/perllib/Greenstone/Package/_pacman.pm
r29598 r29607 94 94 'url=%HOMEPAGE%', 95 95 'license=%LICENSE_SHORT%', 96 'arch=( any)',96 'arch=(' . (defined $self->{config}->{ARCH} ? '%ARCH%' : 'any') . ')', 97 97 'makedepends=(', 98 98 '%MAKEDEPENDS%', -
main/trunk/package-kits/linux/perllib/Greenstone/Package/_rpm.pm
r29598 r29607 90 90 $self->add_install, 91 91 '%files', 92 '%FILES%' 92 '%FILES%', 93 '', 94 '' 93 95 ) { 94 96 my $copy = $line; -
main/trunk/package-kits/linux/segments/core
r29603 r29607 21 21 find src/ \( -iname "*.dll" -o -iname "*.exe" \) -exec rm -rf {} \; || : 22 22 touch build 23 24 install: install_greenstone install_greenstone-native install_greenstone-tools
Note:
See TracChangeset
for help on using the changeset viewer.