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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#!/usr/bin/make -f
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
package=arch-perl
configure: configure-stamp
configure-stamp:
$(checkdir)
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
$(checkdir)
chmod 644 MANIFEST
perl Makefile.PL INSTALLDIRS=vendor
$(MAKE)
touch build-stamp
clean:
$(checkroot)
test ! -f Makefile || $(MAKE) clean
rm -rf debian/libarch-perl
rm -f build-stamp configure-stamp
install: build
$(MAKE) install DESTDIR=debian/libarch-perl/
# Build architecture-independent files here.
binary-indep: build install
$(checkroot)
$(INSTALL_DIR) debian/libarch-perl/usr/share/doc/libarch-perl \
debian/libarch-perl/DEBIAN
chown -R root:root debian/libarch-perl/usr
chmod -R u+rwX,a+rX debian/libarch-perl/usr
gzip -9fq debian/libarch-perl/usr/share/man/man3/*
$(INSTALL_FILE) debian/changelog \
debian/libarch-perl/usr/share/doc/libarch-perl/changelog.Debian
$(INSTALL_FILE) NEWS \
debian/libarch-perl/usr/share/doc/libarch-perl/changelog
$(INSTALL_FILE) debian/copyright TODO \
debian/libarch-perl/usr/share/doc/libarch-perl
gzip -9fq debian/libarch-perl/usr/share/doc/libarch-perl/changelog*
cd debian/libarch-perl && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum >DEBIAN/md5sums
dpkg-gencontrol -isp -plibarch-perl -Pdebian/libarch-perl
chown -R root:root debian/libarch-perl
chmod -R go=rX debian/libarch-perl
dpkg --build debian/libarch-perl ..
# Build architecture-dependent files here.
binary-arch: build install
# nothing arch-dependent yet
binary: binary-indep binary-arch
define checkdir
test -f debian/rules
endef
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: build clean binary-indep binary-arch binary install configure checkroot
|