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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
dtmp=debian/trn4
ifeq (,$(wildcard /usr/bin/po2debconf))
PO2DEBCONF := no
MINDEBCONFVER := 0.5
else
PO2DEBCONF := yes
MINDEBCONFVER := 1.2.0
endif
configure: configure-stamp
configure-stamp:
dh_testdir
cp debian/Policy.sh .
# Configure adds -DDEBUG for us when we use -g.
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
./Configure -OdErs -Doptimize='-O2 -g -Wall'
else
./Configure -OdErs -Doptimize='-g -Wall'
endif
perl -pi -e "s,^egrep='[^']*/egrep',egrep='egrep'," config.sh
./Configure -desS
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
-rm -f build-stamp configure-stamp
-$(MAKE) -i spotless
ifeq ($(PO2DEBCONF),yes)
# Hack for woody compatibility. This makes sure that the
# debian/templates file shipped in the source package doesn't
# specify encodings, which woody's debconf can't handle. If building
# on a system with po-debconf installed (conveniently debhelper (>=
# 4.1.16) depends on it), the binary-arch target will generate a
# better version for sarge.
echo 1 > debian/po/output
po2debconf debian/templates.master > debian/templates
rm -f debian/po/output
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Do the install ourselves, as we use a slightly different directory
# layout to what 'make install' wants, and we may not want to strip
# binaries.
# Binaries.
install -p trn trn-artchk nntplist Pnews Rnmail $(dtmp)/usr/lib/trn4
install -p inews $(dtmp)/usr/lib/trn4
# Other executables.
install -p Speller filexp makedir mbox.saver norm.saver \
$(dtmp)/usr/share/trn4
# Configuration files and similar.
install -p -m 0644 INIT access.def $(dtmp)/etc/trn4
install -p -m 0644 Pnews.header newsnews $(dtmp)/usr/share/trn4
# Group-scanning configuration files.
install -p -m 0644 default_topic $(dtmp)/etc/trn4/trn4top
install -p -m 0644 samples/univ/hier_groups $(dtmp)/etc/trn4
# Documentation.
cp -pR HelpFiles $(dtmp)/usr/share/trn4
install -p -m 0644 support/filter.README support/unipatch.c \
$(dtmp)/usr/share/doc/trn4/support
install -p support/Score.pl support/filter support/mhactive \
support/trnkill \
$(dtmp)/usr/share/doc/trn4/support
# Man pages.
install -p -m 0644 trn.1 $(dtmp)/usr/share/man/man1/trn4.1
for x in Pnews Rnmail strn; do \
install -p -m 0644 $$x.1 \
$(dtmp)/usr/share/man/man1/trn4-$$x.1; \
done
for x in nntplist trn-artchk; do \
install -p -m 0644 debian/$$x.1 \
$(dtmp)/usr/share/man/man1/trn4-$$x.1; \
done
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
ifeq ($(PO2DEBCONF),yes)
po2debconf -e utf8 debian/templates.master > debian/templates
endif
dh_installdebconf
dh_installdocs
mv $(dtmp)/usr/share/doc/trn4/changelog $(dtmp)/usr/share/doc/trn4/NEWS
dh_installexamples
dh_installmenu
dh_installchangelogs debian/changelog.upstream
dh_link
dh_strip
dh_compress -X examples
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))'
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: configure build clean install binary-indep binary-arch binary
|