Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 46 lines (38 sloc) 1.121 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#!/usr/bin/perl
use warnings;
use strict;
use ExtUtils::MakeMaker;

# Add a few more targets.
sub MY::postamble {
q{
all:: extra_build
clean:: extra_clean
install:: extra_install
pure_install:: extra_install

extra_build: zgz/zgz pristine-tar.spec
pod2man -c pristine-tar pristine-tar > pristine-tar.1
pod2man -c pristine-gz pristine-gz > pristine-gz.1
pod2man -c pristine-bz2 pristine-bz2 > pristine-bz2.1
pod2man -c zgz zgz/zgz.pod > zgz.1

ZGZ_SOURCES = zgz/zgz.c zgz/gzip/*.c zgz/old-bzip2/*.c
zgz/zgz: $(ZGZ_SOURCES)
gcc -Wall -O2 -o $@ $(ZGZ_SOURCES) -lz

extra_install:
install -d $(DESTDIR)/usr/bin
install -d $(DESTDIR)/usr/share/man/man1
install pristine-tar pristine-gz pristine-bz2 zgz/zgz $(DESTDIR)/usr/bin
install -m 0644 *.1 $(DESTDIR)/usr/share/man/man1

extra_clean: pristine-tar.spec
rm -f zgz/zgz *.1

pristine-tar.spec:
sed -i "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)/" pristine-tar.spec

.PHONY: pristine-tar.spec
}
}

WriteMakefile(
NAME => 'Pristine',
PREFIX => "/usr/local",
MAN1PODS => {},
MAN3PODS => {},
PMLIBDIRS => ["Pristine"],
);
Something went wrong with that request. Please try again.