source: main/trunk/package-kits/linux/generate@ 29667

Last change on this file since 29667 was 29536, checked in by Jeremy Symon, 9 years ago

Working on a more flexible generation system. Only working for pacman so far, so if you want to generate packages you'll need to check out an old revision. The reason behind this change is that I discovered that the greenstone user database really needs to be owned by the tomcat user rather than root (things such as edit mode don't work properly otherwise), and setting file ownership requires .install files, which was not really possible with the existing system. At this point it would certainly have been faster to just write all the scripts by hand, but this way I get to learn perl.

  • Property svn:executable set to *
File size: 841 bytes
Line 
1#!/usr/bin/env perl
2
3# Generates Makefiles for different systems and packages
4
5use strict;
6use warnings;
7use utf8;
8use File::Basename;
9use lib 'perllib';
10use Greenstone::Helpers;
11use Greenstone::Package;
12
13my $USAGE = "Usage: " . basename($0) . " <distros> <packages>
14 distros: A comma separated list of the distros defined in distros/
15 Or 'all' (for all distros)
16 packages: A comma separated list of the packages defined in packages/
17 Or 'all' (for all packages)
18";
19
20$#ARGV == 1 or die $USAGE;
21
22my @distros = lsfiles "distros", shift;
23my @packages = lsfiles "packages", shift;
24
25for my $distro (@distros) {
26 print $distro, "\n";
27 for my $package (@packages) {
28 print " - ", $package, "\n";
29 makepkg (
30 package => $package,
31 distro => $distro
32 );
33 }
34}
Note: See TracBrowser for help on using the repository browser.