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
|
#! /usr/bin/make -f
# Dummy line to let emacs know this is a -*- Makefile -*-
# debian/rules for osdclock
checkdir=test -f debian/control
checkroot=test `id -u` -eq 0
build: build-stamp
build-stamp:
$(checkdir)
$(MAKE)
touch build-stamp
clean:
$(checkdir)
$(checkroot)
rm -f build-stamp
-$(MAKE) clean
-rm -fr debian/tmp
-rm -fr debian/files debian/substvars
install: build
$(checkdir)
$(checkroot)
# Binary package
install -d -m 755 -o root -g root debian/tmp/DEBIAN
install -d -m 755 -o root -g root debian/tmp/usr/bin
install -d -m 755 -o root -g root debian/tmp/usr/share/man/man1
install -d -m 755 -o root -g root debian/tmp/usr/share/doc/osdclock
install -o root -g root -m 755 -s osd_clock debian/tmp/usr/bin
install -o root -g root -m 644 osd_clock.1 \
debian/tmp/usr/share/man/man1/osd_clock.1xosd
gzip -9f debian/tmp/usr/share/man/man1/osd_clock.1xosd
# Create the packages
binary: binary-arch binary-indep
# No independant parts..
binary-indep: build install
@echo "No architecture-independant binaries"
binary-arch: build install
$(checkdir)
$(checkroot)
# Install the changelog, changelog.Debian and copyright files
install -m 644 -o root -g root ChangeLog \
debian/tmp/usr/share/doc/osdclock/changelog
install -m 644 -o root -g root README \
debian/tmp/usr/share/doc/osdclock/README
install -m 644 -o root -g root debian/copyright \
debian/tmp/usr/share/doc/osdclock
install -m 644 -o root -g root debian/changelog \
debian/tmp/usr/share/doc/osdclock/changelog.Debian
# gzip the changelogs
gzip -9f debian/tmp/usr/share/doc/osdclock/changelog.Debian
gzip -9f debian/tmp/usr/share/doc/osdclock/changelog
# And the READMEs
gzip -9f debian/tmp/usr/share/doc/osdclock/README
# Install postinst/prerm scripts and other assorted stuff
sed -e 's/::PKG::/osdclock/g' < debian/prerm.template > debian/tmp/DEBIAN/prerm
sed -e 's/::PKG::/osdclock/g' < debian/postinst.template > debian/tmp/DEBIAN/postinst
chmod 755 debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/prerm
# Build the packages
dpkg-shlibdeps -Tdebian/substvars \
debian/tmp/usr/bin/osd_clock
dpkg-gencontrol -posdclock -isp -Pdebian/tmp -Tdebian/substvars
dpkg --build debian/tmp ..
|