switched to using Makefile.PL, though I hate MakeMaker, it seems to make

some sense to use it here.
This commit is contained in:
joey
2000-04-22 05:47:47 +00:00
parent f79b8473da
commit 60f67d6d70
8 changed files with 58 additions and 137 deletions

View File

@@ -1,7 +1,8 @@
To try alien before installing, just run ./alien from this directory. Most
features will work prior to installation.
To install alien, become root and type "make install".
To install alien, become root and type:
perl Makefile.PL; make; make install
To use alien, you'll need a variety of other software. See the README for
details.

View File

@@ -1,52 +0,0 @@
# Set this to wherever you want alien to install. Eg, /usr/local or /usr
PREFIX=/usr
VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
all:
clean:
-rm build
-rm *.bak *.out
install:
install -d $(DESTDIR)/$(PREFIX)/bin
perl -pe '$$_="\t\$$prefix=\"$(PREFIX)\";" if /PREFIX_AUTOREPLACE/;\
$$_="\tmy \$$version_string=\"$(VER)\";" if /VERSION_AUTOREPLACE/' alien \
> $(DESTDIR)/$(PREFIX)/bin/alien
chmod 755 $(DESTDIR)/$(PREFIX)/bin/alien
install -d $(DESTDIR)/$(PREFIX)/share/alien/patches \
$(DESTDIR)/var/lib/alien
cp -fr lib/* $(DESTDIR)/$(PREFIX)/share/alien
cp -f patches/* $(DESTDIR)/$(PREFIX)/share/alien/patches/
-rm -f $(DESTDIR)/$(PREFIX)/share/alien/patches/*.gz
gzip -qf9 $(DESTDIR)/$(PREFIX)/share/alien/patches/*
install -d $(DESTDIR)/$(PREFIX)/share/man/man1
cp -f alien.1 $(DESTDIR)/$(PREFIX)/share/man/man1
# This updates the version number in various files.
version:
@echo Updating version info....
perl -i -pe "s/\@version\@/$(VER)/g" <alien.spec.in >alien.spec
perl -i -pe "s/\@version\@/$(VER)/g" <alien.lsm.in >alien.lsm
debian:
dpkg-buildpackage -tc -rfakeroot
rpm: version
install -d /home/joey/src/redhat/SOURCES
install -d /home/joey/src/redhat/BUILD
install -d /home/joey/src/redhat/SRPMS
install -d /home/joey/src/redhat/RPMS/noarch
ln -sf /home/ftp/pub/code/debian/alien_$(VER).tar.gz \
/home/joey/src/redhat/SOURCES/alien_$(VER).tar.gz
fakeroot rpm -ba -v alien.spec --target noarch
rm -f /home/joey/src/redhat/SOURCES/alien_$(VER).tar.gz
mv /home/joey/src/redhat/SRPMS/* /home/ftp/pub/code/SRPMS
mv /home/joey/src/redhat/RPMS/noarch/* /home/ftp/pub/code/RPMS/noarch
fakeroot rm -rf /home/joey/src/redhat/SOURCES \
/home/joey/src/redhat/BUILD \
/home/joey/src/redhat/SRPMS \
/home/joey/src/redhat/RPMS/
.PHONY: debian

40
Makefile.PL Executable file
View File

@@ -0,0 +1,40 @@
#!/usr/bin/perl -w
use ExtUtils::MakeMaker;
use strict;
# Just to make it ignore editor backup files.
sub MY::libscan {
$_ = $_[1];
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
extra_install:
install -d $(PREFIX)/usr/share/alien/patches \
$(PREFIX)/var/lib/alien
cp -f patches/*.diff $(PREFIX)/usr/share/alien/patches/
-rm -f $(PREFIX)/usr/share/alien/patches/*.gz
gzip -qf9 $(PREFIX)/usr/share/alien/patches/*
}
}
WriteMakefile(
'NAME' => 'Alien',
'EXE_FILES' => ['alien'],
# Pure evil. Hook into build and install targets
'depend' => {'all:' => 'extra_build',
'install:' => 'extra_install',
'pure_install:' => 'extra_install'},
'clean' => {FILES => 'alien.lsm'},
);

View File

@@ -1,14 +0,0 @@
Begin3
Title: alien
Version: 6.59
Entered-date: 31MAR97
Description: Alien converts Slackware .tgz packages, Red Hat .rpm packages,
Debian .deb packages, and Stampede .slp packages. It can
convert from any of the formats to any other format. It works
only on binary packages.
Keywords: debian dpkg deb red hat redhat rpm slackware tgz stampede slp convert package
Author: joey@kitenet.net
Primary-site: sunsite.unc.edu /pub/Linux/utils/package
32 alien-6.59.tar.gz
Copying-policy: GPL
End

View File

@@ -1,30 +0,0 @@
Summary: Install Debian and Slackware Packages with rpm.
Name: alien
Packager: Joey Hess <joey@kitenet.net>
Version: 6.59
Release: 1
Source: ftp://kitenet.net/pub/code/debian/alien_6.59.tar.gz
Copyright: GPL
Group: Utilities/File
Buildroot: /tmp/alien-6.59.build
Requires: perl
%description
Alien allows you to convert Debian, Slackware, and Stampede Packages into Red
Hat packages, which can be installed with rpm.
It can also convert into Slackware, Debian and Stampede packages.
This is a tool only suitable for binary packages.
%prep
%setup -n alien
rm -r /tmp/alien-6.59.build || true
%install
make DESTDIR=$RPM_BUILD_ROOT install
chown -R root.root $RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -not -type d -printf "/%%P\n" > manifest
%files -f manifest
%doc CHANGES COPYING README alien.lsm

View File

@@ -1,30 +0,0 @@
Summary: Install Debian and Slackware Packages with rpm.
Name: alien
Packager: Joey Hess <joey@kitenet.net>
Version: @version@
Release: 1
Source: ftp://kitenet.net/pub/code/debian/alien_@version@.tar.gz
Copyright: GPL
Group: Utilities/File
Buildroot: /tmp/alien-@version@.build
Requires: perl
%description
Alien allows you to convert Debian, Slackware, and Stampede Packages into Red
Hat packages, which can be installed with rpm.
It can also convert into Slackware, Debian and Stampede packages.
This is a tool only suitable for binary packages.
%prep
%setup -n alien
rm -r /tmp/alien-@version@.build || true
%install
make DESTDIR=$RPM_BUILD_ROOT install
chown -R root.root $RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -not -type d -printf "/%%P\n" > manifest
%files -f manifest
%doc denbian/changelog COPYING README alien.lsm

2
debian/changelog vendored
View File

@@ -24,6 +24,8 @@ alien (6.99) unstable; urgency=low
* 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.
-- Joey Hess <joeyh@debian.org> Thu, 20 Apr 2000 18:52:41 -0700

24
debian/rules vendored
View File

@@ -1,5 +1,4 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@@ -7,29 +6,33 @@
build: build-stamp
build-stamp:
dh_testdir
$(MAKE) version
perl Makefile.PL
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-$(MAKE) realclean
dh_clean
# Build architecture-dependent files here.
binary-arch: build
# We have nothing to do by default.
# Build architecture-independent files here.
binary-indep: build
dh_testdir
dh_testroot
dh_clean
$(MAKE) DESTDIR=debian/tmp install
dh_clean -k
$(MAKE) pure_install PREFIX=$(shell pwd)/debian/tmp/ INSTALLDIRS=perl \
INSTALLMAN1DIR=$(shell pwd)/debian/tmp/usr/share/man/man1 \
INSTALLMAN3DIR=$(shell pwd)/debian/tmp/usr/share/man/man3 \
INSTALLPRIVLIB=$(shell pwd)/debian/tmp/usr/lib/perl5 \
INSTALLSCRIPT=$(shell pwd)/debian/tmp/usr/bin \
INSTALLARCHLIB=$(shell pwd)/debian/tmp/killme
# Who does it make this empty directory? Sigh.
rm -rf debian/tmp/killme
dh_installdocs README gendiff.txt
dh_installexamples
dh_installmenu
dh_installmanpages
dh_installchangelogs
dh_compress
dh_fixperms
@@ -50,7 +53,8 @@ installhook:
ln -sf ../debian/alien_$(VERSION).tar.gz alien.tar.gz
fakeroot alien --to-slp /home/joey/debian/public/alien_*.deb
mv alien-$(VERSION).slp /home/ftp/pub/code/alien/
make rpm
fakeroot alien --to-rpm /home/joey/debian/public/alien_*.deb
mv alien-$(VERSION)*.rpm /home/ftp/pub/code/alien/
ln -s /home/ftp/pub/code/alien/alien-$(VERSION).slp \
/home/ftp/pub/code/alien/alien.slp