| 1 |
#!/usr/bin/make -f
|
| 2 |
# Sample debian/rules that uses debhelper.
|
| 3 |
# GNU copyright 1997 to 1999 by Joey Hess.
|
| 4 |
|
| 5 |
# Uncomment this to turn on verbose mode.
|
| 6 |
#export DH_VERBOSE=1
|
| 7 |
|
| 8 |
# This is the debhelper compatability version to use.
|
| 9 |
export DH_COMPAT=2
|
| 10 |
|
| 11 |
PACKAGE=$(shell dh_listpackages)
|
| 12 |
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
|
| 13 |
ARCH=$(shell dpkg --print-architecture)
|
| 14 |
FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb
|
| 15 |
PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
|
| 16 |
|
| 17 |
build: build-stamp
|
| 18 |
build-stamp:
|
| 19 |
dh_testdir
|
| 20 |
$(MAKE) small
|
| 21 |
touch build-stamp
|
| 22 |
|
| 23 |
clean:
|
| 24 |
dh_testdir
|
| 25 |
dh_testroot
|
| 26 |
rm -f build-stamp
|
| 27 |
$(MAKE) clean
|
| 28 |
dh_clean
|
| 29 |
|
| 30 |
install: build
|
| 31 |
dh_testdir
|
| 32 |
dh_testroot
|
| 33 |
dh_clean -k
|
| 34 |
dh_installdirs usr/lib/debian-installer/retriever/
|
| 35 |
install net-retriever \
|
| 36 |
debian/$(PACKAGE)/usr/lib/debian-installer/retriever/
|
| 37 |
|
| 38 |
# Build architecture-independent files here.
|
| 39 |
binary-indep: build install
|
| 40 |
# We have nothing to do by default.
|
| 41 |
|
| 42 |
# Build architecture-dependent files here.
|
| 43 |
#
|
| 44 |
# Note that this builds a .udeb, which is not policy compliant or anything.
|
| 45 |
binary-arch: build install
|
| 46 |
dh_testdir
|
| 47 |
dh_testroot
|
| 48 |
dh_installdebconf
|
| 49 |
dh_strip
|
| 50 |
dh_compress
|
| 51 |
dh_fixperms
|
| 52 |
dh_installdeb
|
| 53 |
dh_shlibdeps
|
| 54 |
# Don't write your stupid guesses to debian/files.
|
| 55 |
dh_gencontrol -- -fdebian/files~
|
| 56 |
# Register file manually.
|
| 57 |
dpkg-distaddfile $(FILENAME) debian-installer $(PRIORITY)
|
| 58 |
dh_builddeb --filename=$(FILENAME)
|
| 59 |
|
| 60 |
binary: binary-indep binary-arch
|
| 61 |
.PHONY: build clean binary-indep binary-arch binary install
|