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 140 141 142 143 144 145 146 147 148 149 150
|
#!/usr/bin/make -f
# Sample debian.rules file - Copyright 1994,1995 by Ian Jackson.
#
# Invoke each target with `./debian/rules <target>'. All targets should be
# invoked with the package root as the current directory.
# cjwatson: It would be better to remove the bashisms, but this is quicker. :)
SHELL = /bin/bash
# The name of the package
P = fidogate
R = debian/tmp
DIRECTORIES = \
$(R) \
$(R)/DEBIAN \
$(R)/etc \
$(R)/etc/fido \
$(R)/etc/news \
$(R)/etc/news/scripts \
$(R)/usr \
$(R)/usr/share/doc/$(P) \
$(R)/usr/bin \
$(R)/usr/lib \
$(R)/usr/lib/$(P) \
$(R)/usr/lib/$(P)/scripts \
$(R)/usr/lib/$(P)/scripts/filebase \
$(R)/usr/lib/$(P)/scripts/nodelist \
$(R)/usr/lib/$(P)/scripts/outbound \
$(R)/usr/share/sendmail/cf \
$(R)/usr/share/sendmail/cf/mailer \
$(R)/usr/sbin \
$(R)/var \
$(R)/var/spool \
$(R)/var/spool/fido \
$(R)/var/spool/fido/in \
$(R)/var/spool/fido/in/tmpmail \
$(R)/var/spool/fido/in/tmpnews \
$(R)/var/spool/fido/in/bad \
$(R)/var/spool/fido/insecure \
$(R)/var/spool/fido/out \
$(R)/var/spool/fido/locks \
$(R)/var/spool/fido/seq \
$(R)/var/spool/fido/toss \
$(R)/var/spool/fido/toss/in \
$(R)/var/spool/fido/toss/bad \
$(R)/var/spool/fido/toss/tmp \
$(R)/var/spool/fido/toss/out \
$(R)/var/spool/fido/toss/pack \
$(R)/var/spool/ftn/ \
$(R)/var/spool/ftn/in \
$(R)/var/spool/ftn/pin \
$(R)/var/spool/ftn/uuin
$(DIRECTORIES):
install -d -g root -o root -m 755 $@
chmod g-s $@
# Builds the binary package.
build:
$(checkdir)
touch build
# Clean $(DIRECTORIES)
clean-dir:
$(checkdir)
rm -rf $(R)
# Undoes the effect of `make -f rules build'.
clean: clean-dir
$(checkdir)
[ ! -f Makefile ] || make clean
rm -f debian/files* debian/substvars core debian/*~ *~ build
# Makes a binary package.
binary-indep: $(DIRECTORIES) checkroot build
$(checkdir)
binary-arch: $(DIRECTORIES) checkroot build
$(checkdir)
make depend
make
install -m755 src/ffx/{ffx,ffxmail,ffxnews,ffxqt,ffxrmail,runffx} \
src/gate/{ftn2rfc,ftnin,ftninpost,ftninrecomb,ftnmail,rfc2ftn,rungate} \
src/tick/{ftnhatch,ftntick,ftntickpost} \
src/areafix/{ftnaf,ftnafmail,runafutil,ftnafutil} \
src/toss/{ftn2ftn,ftnexpire,ftnpack,ftnroute,ftntoss} \
src/toss/{runin,runout,runtoss,rununpack,runmail,runnews} \
src/util/{ftnbsy,ftnconfig,ftnflo,ftnseq,ftnlock} \
src/util/{ftnlog,ftnoutpkt,ftnfattach} \
$(R)/usr/lib/$(P)
cp src/util/{sumcrc,pktmore,pktdebug} $(R)/usr/bin
cp scripts/filebase/{fb-chkfiles,fb-filelist} \
$(R)/usr/lib/$(P)/scripts/filebase
cp scripts/nodelist/{latest,nl-2hosts,nl-2routing,nl-autoupd} \
scripts/nodelist/{nl-check,nl-del,nl-diff,nl-html,nl-isdn} \
scripts/nodelist/{nl-print,template.html} \
$(R)/usr/lib/$(P)/scripts/nodelist
cp scripts/outbound/out-{freq,ls,manip,rm0,rmbsy} \
$(R)/usr/lib/$(P)/scripts/outbound
cp sendmail/mailer/{ftn.m4,ffx.m4} $(R)/usr/share/sendmail/cf/mailer
cp src/ffx/send-ffx $(R)/etc/news/scripts
cp src/gate/send-fidogate $(R)/etc/news/scripts
chmod 755 $(R)/etc/news/scripts/*
chown -R news.news $(R)/etc/news/{*,.}
chown 64000 $(R)/usr/lib/$(P)/{ffx,rfc2ftn,ftnafmail}
chmod 4755 $(R)/usr/lib/$(P)/{ffx,rfc2ftn,ftnafmail}
chown -R 64000.64000 $(R)/etc/fido $(R)/var/spool/fido \
$(R)/var/spool/ftn
chmod 2755 $(R)/etc/fido
cp debian/fidogateconfig $(R)/usr/sbin
chmod 755 $(R)/usr/sbin/fidogateconfig
cp debian/fidopoll $(R)/usr/bin
chmod 755 $(R)/usr/bin/fidopoll
cp debian/dhelp $(R)/usr/share/doc/$(P)/.dhelp
debstd -m ChangeLog
dpkg-gencontrol -isp
dpkg --build debian/tmp ..
define checkdir
test -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|