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
|
#!/usr/bin/make -f
# debian.rules file for xvmount
# Derived from the 'hello' sample files provided by Ian Jackson.
package=xvmount
DESTDIR = debian/tmp/usr
# On Debian systems OPENWINHOME = /usr/X11R6
ifndef OPENWINHOME
OPENWINHOME = /usr/X11R6
endif
# Enable debug information by Debian policy
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
PASS='-O0 -DDEBUG'
else
PASS='-O2'
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP='-s'
else
STRIP=''
endif
# The simple rules
build:
$(checkdir)
$(MAKE) OPENWINHOME=$(OPENWINHOME) PASS=$(PASS)
touch build
clean:
$(checkdir)
-rm -f build
-$(MAKE) -i clean
-rm -rf debian/tmp *~ debian/*~ debian/files* debian/substvars
# The binary package
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp debian/tmp/DEBIAN
install -d $(DESTDIR)/share/doc/$(package)
install -d $(DESTDIR)/share/doc/$(package)/examples
install -d $(DESTDIR)/lib/menu
install -d $(DESTDIR)/share/pixmaps
install -d $(DESTDIR)/X11R6/lib/help
install -d $(DESTDIR)/sbin $(DESTDIR)/share/man/man8
install -m '0755' debian/config debian/tmp/DEBIAN/config
install -m '0644' debian/templates debian/tmp/DEBIAN/templates
install -m '0755' debian/postinst debian/tmp/DEBIAN/postinst
install -m '0755' debian/postrm debian/tmp/DEBIAN/postrm
$(MAKE) DESTDIR=$(DESTDIR) STRIP=$(STRIP) install
gzip -9v $(DESTDIR)/share/man/man1/xvmount.1
install -m '0755' xvmountconfig $(DESTDIR)/sbin/xvmountconfig
install -m '0644' xvmountconfig.8 $(DESTDIR)/share/man/man8/xvmountconfig.8
gzip -9v $(DESTDIR)/share/man/man8/xvmountconfig.8
install -m '0644' xvmount.info $(DESTDIR)/X11R6/lib/help/xvmount.info
install -m '0644' debian/copyright $(DESTDIR)/share/doc/$(package)
install -m '0644' debian/changelog $(DESTDIR)/share/doc/$(package)/changelog.Debian
gzip -9v $(DESTDIR)/share/doc/$(package)/changelog.Debian
install -m '0644' README $(DESTDIR)/share/doc/$(package)
gzip -9v $(DESTDIR)/share/doc/$(package)/README
install -m '0644' xvmounttab $(DESTDIR)/share/doc/$(package)/examples
install -m '0644' debian/menu $(DESTDIR)/lib/menu/$(package)
install -m '0644' debian/xvmount.xpm $(DESTDIR)/share/pixmaps
dpkg-shlibdeps xvmount
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
po2debconf debian/templates > debian/templates.merged
mv debian/templates.merged debian/tmp/DEBIAN/templates
dpkg --build debian/tmp ..
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
define checkdir
test -f $(package).c
endef
.PHONY: binary binary-arch binary-indep clean checkroot
|