2000-04-22 05:47:47 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
use ExtUtils::MakeMaker;
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
|
|
# Just to make it ignore editor backup files.
|
|
|
|
|
sub MY::libscan {
|
|
|
|
|
$_ = $_[1];
|
|
|
|
|
|
2000-04-23 03:55:53 +00:00
|
|
|
return '' if $_ eq 'alien.pl';
|
2000-04-22 05:47:47 +00:00
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
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
|
2000-04-22 05:47:47 +00:00
|
|
|
|
|
|
|
|
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 05:47:47 +00:00
|
|
|
|
2000-04-22 06:02:51 +00:00
|
|
|
alien:
|
|
|
|
|
perl -pe ' \
|
2000-04-22 23:32:45 +00:00
|
|
|
$$_="" if /use lib/; \
|
* The great rewrite. Alien is now based on pure object oriented package
objects. These objects can read all relevant details about a package, and
can generate packages based on that information. Thus, converting from one
format to another becomes a simple matter of generating one of these
objects, pointing it at a package, mutating it into the destination
class, and telling it to write the new package out! A basic alien can now
be written using these objects in one "line" of perl -- in fact, here is
one:
perl -MAlien::Package::Deb -MAlien::Package::Rpm -e '
$p=Alien::Package::Rpm->new(filename => shift); $p->unpack;
* Almost every line of code has been rewritten.
* Package descriptions now include a note that they were converted with
alien. There are other numerous changes to the converted packages, for
instance, generated .deb's now have more info in their copyright file.
* The template files were all moved inside the objects, which is actually
cleaner and is certainly easier to deal with.
* Usernames are now looked up the way POSIX intended.
* alien.1 is now generated from POD docs.
* Alien can now convert into multiple formats at once.
* Alien now always cleans up after failed converts, Closes: #62331
* Alien can now be used to just install a package with no conversion.
Closes: #53441
* Use a Makefile.PL because that seems to make sense, which means lots of
the build system had to be changed.
2000-04-22 06:18:50 +00:00
|
|
|
$$_="\tmy \$$version_string=\"$(VER)\";\n" \
|
2000-04-22 06:02:51 +00:00
|
|
|
if /VERSION_AUTOREPLACE/' alien.pl > alien
|
2000-04-22 05:47:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WriteMakefile(
|
|
|
|
|
'NAME' => 'Alien',
|
|
|
|
|
'EXE_FILES' => ['alien'],
|
|
|
|
|
# Pure evil. Hook into build and install targets
|
|
|
|
|
'depend' => {'all:' => 'extra_build',
|
2000-04-23 03:47:44 +00:00
|
|
|
# Why build on clean? Because I want to ensure the spec file
|
|
|
|
|
# gets put in the tarball, and so it has to happen in debian/rules
|
|
|
|
|
# clean
|
|
|
|
|
'clean:' => 'extra_build',
|
2000-04-22 05:47:47 +00:00
|
|
|
'install:' => 'extra_install',
|
* The great rewrite. Alien is now based on pure object oriented package
objects. These objects can read all relevant details about a package, and
can generate packages based on that information. Thus, converting from one
format to another becomes a simple matter of generating one of these
objects, pointing it at a package, mutating it into the destination
class, and telling it to write the new package out! A basic alien can now
be written using these objects in one "line" of perl -- in fact, here is
one:
perl -MAlien::Package::Deb -MAlien::Package::Rpm -e '
$p=Alien::Package::Rpm->new(filename => shift); $p->unpack;
* Almost every line of code has been rewritten.
* Package descriptions now include a note that they were converted with
alien. There are other numerous changes to the converted packages, for
instance, generated .deb's now have more info in their copyright file.
* The template files were all moved inside the objects, which is actually
cleaner and is certainly easier to deal with.
* Usernames are now looked up the way POSIX intended.
* alien.1 is now generated from POD docs.
* Alien can now convert into multiple formats at once.
* Alien now always cleans up after failed converts, Closes: #62331
* Alien can now be used to just install a package with no conversion.
Closes: #53441
* Use a Makefile.PL because that seems to make sense, which means lots of
the build system had to be changed.
2000-04-22 06:18:50 +00:00
|
|
|
'pure_install:' => 'extra_install'},
|
2000-04-23 03:20:12 +00:00
|
|
|
'clean' => {FILES => 'alien'},
|
2000-04-22 05:47:47 +00:00
|
|
|
);
|