From 60f67d6d703852ffeb5c56d162801b8c859d6d49 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 22 Apr 2000 05:47:47 +0000 Subject: [PATCH] switched to using Makefile.PL, though I hate MakeMaker, it seems to make some sense to use it here. --- INSTALL | 3 ++- Makefile | 52 ------------------------------------------------ Makefile.PL | 40 +++++++++++++++++++++++++++++++++++++ alien.lsm | 14 ------------- alien.spec | 30 ---------------------------- alien.spec.in | 30 ---------------------------- debian/changelog | 2 ++ debian/rules | 24 ++++++++++++---------- 8 files changed, 58 insertions(+), 137 deletions(-) delete mode 100644 Makefile create mode 100755 Makefile.PL delete mode 100644 alien.lsm delete mode 100644 alien.spec delete mode 100644 alien.spec.in diff --git a/INSTALL b/INSTALL index 05bede5..04717a2 100644 --- a/INSTALL +++ b/INSTALL @@ -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. diff --git a/Makefile b/Makefile deleted file mode 100644 index 929f147..0000000 --- a/Makefile +++ /dev/null @@ -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/\((.*?)\)/' $(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 - perl -i -pe "s/\@version\@/$(VER)/g" 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 diff --git a/Makefile.PL b/Makefile.PL new file mode 100755 index 0000000..ae5d8c0 --- /dev/null +++ b/Makefile.PL @@ -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/\((.*?)\)/'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'}, +); diff --git a/alien.lsm b/alien.lsm deleted file mode 100644 index 39123cd..0000000 --- a/alien.lsm +++ /dev/null @@ -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 diff --git a/alien.spec b/alien.spec deleted file mode 100644 index 4311c5d..0000000 --- a/alien.spec +++ /dev/null @@ -1,30 +0,0 @@ -Summary: Install Debian and Slackware Packages with rpm. -Name: alien -Packager: Joey Hess -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 diff --git a/alien.spec.in b/alien.spec.in deleted file mode 100644 index 798dbc4..0000000 --- a/alien.spec.in +++ /dev/null @@ -1,30 +0,0 @@ -Summary: Install Debian and Slackware Packages with rpm. -Name: alien -Packager: Joey Hess -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 diff --git a/debian/changelog b/debian/changelog index addb466..056de85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 20 Apr 2000 18:52:41 -0700 diff --git a/debian/rules b/debian/rules index 8ca5e26..8ad432c 100755 --- a/debian/rules +++ b/debian/rules @@ -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