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
|
#!/usr/bin/make -f
# Debian Package Building Makefile
# For modemu
# Package maintainer: John Goerzen <jgoerzen@complete.org>
# Program author: Toru Egashira <toru@jms.jeton.or.jp>
# Configuration and compilation
PACKAGENAME=modemu
BINARIES=$(PACKAGENAME)
MANPAGE=$(PACKAGENAME).1
build:
make
binary: binary-arch binary-indep
binary-indep:
# This one needs to be root.
binary-arch: build
rm -rf debian/tmp
install -d debian/tmp debian/tmp/DEBIAN debian/tmp/usr/bin
install -d debian/tmp/usr/share/doc/$(PACKAGENAME)
install -d debian/tmp/usr/share/man/man1
install -s $(BINARIES) debian/tmp/usr/bin/
cp debian/copyright debian/tmp/usr/share/doc/$(PACKAGENAME)/copyright
cp debian/changelog debian/tmp/usr/share/doc/$(PACKAGENAME)/changelog.Debian
cp README QuickStart debian/tmp/usr/share/doc/$(PACKAGENAME)
install -m 644 $(MANPAGE) debian/tmp/usr/share/man/man1/
gzip -9vr debian/tmp/usr/share/man/ debian/tmp/usr/share/doc/$(PACKAGENAME)/changelog.Debian
dpkg-shlibdeps $(PACKAGENAME)
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R go-ws debian/tmp
dpkg --build debian/tmp ..
clean:
make clean
-rm -rf debian/tmp debian/files debian/substvars debian/*~ *~ *.o
|