parallel: Makefile for creating .deb package (dependent on --minversion)

This commit is contained in:
Ole Tange 2011-10-10 21:59:19 +02:00
parent a5cd7dc7ee
commit fd138579c3
3 changed files with 17 additions and 5 deletions

View file

@ -1,12 +1,20 @@
all: clean unpack build
all: clean makedist unpack build
unpack:
ls ../../parallel-*.tar.bz2| tail -n1 | parallel tar xvf
cd parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]; cp -a ../debian-template debian
build:
cd parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]; debchange -i
which dpkg-buildpackage >/dev/null || ( \
echo "Error, could not find 'dpkg-buildpackage'." ; \
echo "To install, run:" ; \
echo -e "\tapt-get install dpkg-dev" ; \
false )
cd parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]; perl -i -pe "s/201[0-9]{5}-[0-9]+/"`src/parallel --minversion 1`"/" debian/{changelog,parallel/DEBIAN/control}
cd parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]; dpkg-buildpackage -us -uc
@echo
@echo "To install the GNU Parallel Debian package, run:"
@echo -e \\t sudo dpkg -i `ls -rt parallel_*_all.deb | tail -n 1`
clean:
rm -f parallel_*
@ -16,3 +24,5 @@ distclean:
rm -f parallel_*
rm -rf parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
makedist:
cd ../..; make dist-bzip2 dist-gzip

View file

@ -1,2 +1,4 @@
To build a .deb package:
make
Edit 20100906-2 to the version number

View file

@ -582,7 +582,7 @@ sub parse_options {
if(defined $::opt_bg) { $Global::semaphore = 1; }
if(defined $::opt_wait) { $Global::semaphore = 1; }
if(defined $::opt_minversion) {
version();
print $Global::version,"\n";
if($Global::version < $::opt_minversion) {
wait_and_exit(255);
} else {