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
|
#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
package=mgetty
build:
$(checkdir)
make
cd doc; make manpages mgetty.info
make vgetty callback
cd contrib; make g3toxwd g3tolj;
cd frontends/X11/viewfax*;make
touch build
clean:
$(checkdir)
-rm -f build
-make fullclean
-rm `find . -name "*~"`
-cd frontends/X11/viewfax*;make clean
-rm -rf `find debian/* -type -d` debian/files* contrib/g3tolj contrib/g3toxwd
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp `find debian/* -type`
install -d debian/tmp/usr/bin debian/tmp/usr/sbin \
debian/tmp/sbin \
debian/tmp/var/spool \
debian/tmp/var/log/mgetty \
debian/tmp/etc/mgetty \
debian/mgetty-voice/usr/{bin,sbin} \
debian/mgetty-voice/usr/man/man1 \
debian/mgetty-voice/etc/mgetty \
debian/mgetty-docs/usr/doc/mgetty/voice \
debian/mgetty-docs/usr/doc/mgetty/examples/voice \
debian/mgetty-fax/usr/man/man1 \
debian/mgetty-fax/usr/lib/mgetty+sendfax
# Mgetty install
make install prefix=`pwd`/debian/tmp/usr spool=`pwd`/debian/tmp/var/spool
# Vgetty install
make vgetty-install prefix=`pwd`/debian/mgetty-voice/usr spool=`pwd`/debian/mgetty-voice/var/spool
# Enforce debian standard for location of getty's
mv debian/tmp/usr/sbin/?getty debian/tmp/sbin
# And usr/sbin stuff
install -d debian/mgetty-fax/usr/sbin
mv debian/tmp/usr/bin/faxrunq* debian/mgetty-fax/usr/sbin
# Contrib stuff
install -d debian/mgetty-fax/usr/bin
install -s contrib/g3toxwd contrib/g3tolj debian/mgetty-fax/usr/bin
cd frontends/X11/viewfax*;make install DESTDIR=../../../debian/mgetty-fax
# callback stuff
install -s callback/callback debian/tmp/usr/sbin
install -m644 callback/README debian/mgetty-docs/usr/doc/mgetty/README.callback
install -d debian/mgetty-docs/usr/doc/mgetty
install -m644 frontends/X11/viewfax*/README debian/mgetty-docs/usr/doc/mgetty/README.viewfax
# Setup a default configuration
cp *.config debian/faxheader debian/etc/mgetty
install debian/new_fax debian/mgetty-fax/usr/lib/mgetty+sendfax
cp voice/voice.conf-dist debian/mgetty-voice/etc/mgetty/voice.conf
cp -a voice/scripts voice/{Announce,ChangeLog,Credits,Readme,ToDo,magic.voice,voice.conf-dist} \
debian/mgetty-docs/usr/doc/mgetty/voice
cp debian/inittab debian/mgetty-docs/usr/doc/$(package)/examples/inittab.DEBIAN
cp voice/voice.conf-dist debian/mgetty-docs/usr/doc/mgetty/examples/voice/voice.conf
cp voice/scripts/{demo.sh,events.sh,voice_mail.sh} debian/mgetty-docs/usr/doc/mgetty/examples/voice
chmod -R a+r debian/mgetty-docs/usr/doc/mgetty
# And continue with debian control files
debstd
chown -R root.root debian/tmp/usr debian/mgetty*/usr
chmod -R g-ws debian/tmp/usr debian/mgetty*/usr
rm -rf debian/tmp/usr/{info,lib} debian/tmp/var/spool
# Up to the finale
dpkg-gencontrol -pmgetty
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
|