1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#!/usr/bin/perl -w
=head1 NAME
dh_zope - create zope install in package build directories
=cut
use strict;
use File::Find;
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
B<dh_zope> [S<I<debhelper options>>] [B<-A>] [S<I<source destination ...>>]
=head1 DESCRIPTION
dh_zope is a debhelper program that build package directories.
=cut
init();
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $name;
my $links="debian/links";
my $instdir="usr/share/zope/python/Products";
my $zopedir="usr/lib/zope/lib/python/Products";
if(exists $ENV{NAME} && length $ENV{NAME}) {
$name=$ENV{NAME};
} else {
die("Must be declare NAME in rules file !");
}
open(LINKS, ">$links");
print LINKS "$instdir/$name $zopedir/$name\n";
close(LINKS);
open(FILES, "find -type f -not -path './debian/*' |");
while(<FILES>) {
s#./##;
chomp;
doit("cp","$_", "$tmp/$instdir/$name/$_");
}
close FILES;
}
=head1 SEE ALSO
L<debhelper(7)>
This program is not a part of debhelper but make same work.
=head1 AUTHOR
Nicolas Ledez <nledez@virtual-net.fr>
=cut
|