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
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
# This is the debhelper compatibility version to use.
export DH_COMPAT=3
# Prevents the patch command to look for RCS files
export PATCH_GET=0
package := fig2sty
debinst := $(shell pwd)/debian/$(package)
debusr := $(debinst)/usr
debbin := $(debusr)/bin
debshare := $(debusr)/share
debperl := $(debshare)/perl5
debtex := $(debshare)/texmf/tex/latex/fig2sty
clean: unpatch
dh_testdir
dh_testroot
# Add here commands to clean up after the build process.
rm -f fig2sty-fixed *.man
dh_clean
build: patch
install:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/fig2sty.
install --mode=644 XFig.pm $(debperl)
install --mode=644 figtosty.sty $(debtex)
pod2man fig2sty > fig2sty.man
pod2man --section=3pm XFig.pm > XFig.man
perl -ne 'BEGIN {$$found = 0} \
if ($$found) { \
print; \
} \
elsif (m{^#!\s*[^\s]+\s+(.*)$$}) { \
print "#! /usr/bin/perl $$1\n"; \
$$found = 1; \
}' < fig2sty > fig2sty-fixed
install --mode=755 fig2sty-fixed $(debbin)/fig2sty
# Build architecture-independent files here.
binary-indep: install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples Doc/*
dh_installman fig2sty.man XFig.man
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
.PHONY: build clean binary-indep binary install patch unpatch
|