]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - debian/rules
Simpler fix for the libuuid problem from awhile ago, works with all autoconf versions.
[thirdparty/xfsprogs-dev.git] / debian / rules
CommitLineData
fc49813f
NS
1#!/usr/bin/make -f
2
3package = xfsprogs
4develop = xfslibs-dev
33a4da69
NS
5bootpkg = xfsprogs-udeb
6
7version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
8target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
9udebpkg = $(bootpkg)_$(version)_$(target).udeb
fc49813f
NS
10
11dirtmp = debian/tmp
12dirdev = debian/$(develop)
33a4da69 13dirdi = debian/$(bootpkg)
fc49813f
NS
14pkgtmp = DIST_ROOT=`pwd`/$(dirtmp); export DIST_ROOT;
15pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
33a4da69 16pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
c5389736 17stdenv = @GZIP=-q; export GZIP;
fc49813f 18
e246ba5f 19options = DEBUG=-DNDEBUG; DISTRIBUTION=debian; LOCAL_CONFIGURE_OPTIONS=--enable-readline=yes; export DEBUG DISTRIBUTION LOCAL_CONFIGURE_OPTIONS;
7b9d2be9 20diopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS;
fc49813f
NS
21checkdir = test -f debian/rules
22
8c4a2bb0 23build: built
33a4da69 24built: dibuild config
fc49813f 25 @echo "== dpkg-buildpackage: build" 1>&2
f937adac
NS
26 $(MAKE) default
27 touch built
28
29config: .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 36dibuild:
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
48clean:
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
55binary-indep:
56
8c4a2bb0 57binary-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
81binary: binary-indep binary-arch
82
83checkroot:
84 test 0 -eq `id -u`
85
86.PHONY: binary binary-arch binary-indep clean checkroot