]>
Commit | Line | Data |
---|---|---|
fc49813f NS |
1 | #!/usr/bin/make -f |
2 | ||
3 | package = xfsprogs | |
4 | develop = xfslibs-dev | |
33a4da69 NS |
5 | bootpkg = xfsprogs-udeb |
6 | ||
7 | version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) | |
8 | target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) | |
9 | udebpkg = $(bootpkg)_$(version)_$(target).udeb | |
fc49813f NS |
10 | |
11 | dirtmp = debian/tmp | |
12 | dirdev = debian/$(develop) | |
33a4da69 | 13 | dirdi = debian/$(bootpkg) |
fc49813f NS |
14 | pkgtmp = DIST_ROOT=`pwd`/$(dirtmp); export DIST_ROOT; |
15 | pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; | |
33a4da69 | 16 | pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT; |
c5389736 | 17 | stdenv = @GZIP=-q; export GZIP; |
fc49813f | 18 | |
e246ba5f | 19 | options = DEBUG=-DNDEBUG; DISTRIBUTION=debian; LOCAL_CONFIGURE_OPTIONS=--enable-readline=yes; export DEBUG DISTRIBUTION LOCAL_CONFIGURE_OPTIONS; |
7b9d2be9 | 20 | diopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS; |
fc49813f NS |
21 | checkdir = test -f debian/rules |
22 | ||
8c4a2bb0 | 23 | build: built |
33a4da69 | 24 | built: dibuild config |
fc49813f | 25 | @echo "== dpkg-buildpackage: build" 1>&2 |
f937adac NS |
26 | $(MAKE) default |
27 | touch built | |
28 | ||
29 | config: .census | |
30 | .census: | |
31 | @echo "== dpkg-buildpackage: configure" 1>&2 | |
fc49813f | 32 | $(checkdir) |
6c6508ec | 33 | $(options) $(MAKE) configure |
f937adac | 34 | touch .census |
fc49813f | 35 | |
33a4da69 | 36 | dibuild: |
3a1664fa | 37 | $(checkdir) |
7c1bfe37 | 38 | @echo "== dpkg-buildpackage: installer" 1>&2 |
8c4a2bb0 | 39 | if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \ |
33a4da69 | 40 | $(diopts) $(MAKE) configure; \ |
7631d136 NS |
41 | for dir in include libxfs libdisk mkfs; do \ |
42 | $(MAKE) -C $$dir; \ | |
43 | done; \ | |
8c4a2bb0 NS |
44 | mv mkfs/mkfs.xfs mkfs/mkfs.xfs-$(bootpkg); \ |
45 | $(MAKE) distclean; \ | |
46 | fi | |
3a1664fa | 47 | |
fc49813f NS |
48 | clean: |
49 | @echo "== dpkg-buildpackage: clean" 1>&2 | |
50 | $(checkdir) | |
8c4a2bb0 | 51 | -rm -f built .census mkfs/mkfs.xfs-$(bootpkg) |
fc49813f | 52 | $(MAKE) distclean |
33a4da69 | 53 | -rm -rf $(dirtmp) $(dirdev) $(dirdi) debian/*substvars debian/files* |
fc49813f NS |
54 | |
55 | binary-indep: | |
56 | ||
8c4a2bb0 | 57 | binary-arch: checkroot built |
fc49813f NS |
58 | @echo "== dpkg-buildpackage: binary-arch" 1>&2 |
59 | $(checkdir) | |
33a4da69 | 60 | -rm -rf $(dirtmp) $(dirdev) $(dirdi) |
fc49813f NS |
61 | $(pkgtmp) $(MAKE) -C . install |
62 | $(pkgdev) $(MAKE) -C . install-dev | |
33a4da69 | 63 | $(pkgdi) $(MAKE) -C debian install-d-i |
fc49813f | 64 | $(pkgtmp) $(MAKE) -C build src-manifest |
33a4da69 NS |
65 | |
66 | dh_installdocs -p$(package) -p$(develop) | |
67 | dh_installchangelogs -N$(bootpkg) | |
68 | dh_strip | |
69 | dh_compress | |
70 | dh_fixperms | |
71 | dh_makeshlibs -p$(package) | |
72 | dh_installdeb -N$(bootpkg) | |
73 | dh_shlibdeps | |
74 | dh_gencontrol -N$(bootpkg) | |
75 | dh_gencontrol -p$(bootpkg) -- -n$(udebpkg) | |
76 | ||
77 | dh_md5sums -N$(bootpkg) | |
78 | dh_builddeb -N$(bootpkg) | |
79 | dh_builddeb -p$(bootpkg) --filename=$(udebpkg) | |
fc49813f NS |
80 | |
81 | binary: binary-indep binary-arch | |
82 | ||
83 | checkroot: | |
84 | test 0 -eq `id -u` | |
85 | ||
86 | .PHONY: binary binary-arch binary-indep clean checkroot |