Files
alien/Makefile.PL

49 lines
1.1 KiB
Makefile
Raw Normal View History

#!/usr/bin/perl -w
use ExtUtils::MakeMaker;
use strict;
# Just to make it ignore editor backup files.
sub MY::libscan {
$_ = $_[1];
return '' if $_ eq 'alien.pl';
return '' if m/\/(RCS|CVS|SCCS)\// || m/[~%]$/ || m/\.(orig|rej)$/;
return $_;
}
# Add a more targets.
sub MY::postamble {
return q{
VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
all:: extra_build
clean:: extra_build
install:: extra_install
pure_install:: extra_install
extra_build:
perl -i -pe "s/\@version\@/$(VER)/g" <alien.lsm.in >alien.lsm
2000-04-23 03:20:12 +00:00
perl -i -pe "s/\@version\@/$(VER)/g" <alien.spec.in >alien.spec
extra_install:
2000-04-24 05:18:29 +00:00
install -d $(PREFIX)/share/alien/patches \
$(VARPREFIX)/var/lib/alien
cp -f patches/*.diff $(PREFIX)/share/alien/patches/
-rm -f $(PREFIX)/share/alien/patches/*.gz
gzip -qf9 $(PREFIX)/share/alien/patches/*
2000-04-22 06:02:51 +00:00
alien:
perl -pe ' \
$$_="" if /use lib/; \
$$_="\tmy \$$version_string=\"$(VER)\";\n" \
2000-04-22 06:02:51 +00:00
if /VERSION_AUTOREPLACE/' alien.pl > alien
}
}
WriteMakefile(
'NAME' => 'Alien',
'EXE_FILES' => ['alien'],
2000-04-23 03:20:12 +00:00
'clean' => {FILES => 'alien'},
);