blob: 38a32886e40af92f644feabc82d43f714d13526f (
plain)
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 -lz -o $@ $(ZGZ_SOURCES)
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"],
);
|