]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - debian/rules
xfsprogs: update deb packaging for upcoming release
[thirdparty/xfsprogs-dev.git] / debian / rules
CommitLineData
fc49813f
NS
1#!/usr/bin/make -f
2
160f1e13
AMS
3export DH_VERBOSE=1
4
fc49813f
NS
5package = xfsprogs
6develop = xfslibs-dev
33a4da69
NS
7bootpkg = xfsprogs-udeb
8
9version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
10target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
11udebpkg = $(bootpkg)_$(version)_$(target).udeb
fc49813f 12
e9941b38 13dirme = debian/$(package)
fc49813f 14dirdev = debian/$(develop)
33a4da69 15dirdi = debian/$(bootpkg)
e9941b38 16pkgme = DIST_ROOT=`pwd`/$(dirme); export DIST_ROOT;
fc49813f 17pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
33a4da69 18pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
c5389736 19stdenv = @GZIP=-q; export GZIP;
fc49813f 20
b84c55e5
NS
21options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
22 INSTALL_USER=root INSTALL_GROUP=root \
87c2e433 23 LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes --enable-blkid=yes" ;
b84c55e5
NS
24diopts = $(options) \
25 export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no" ;
fc49813f
NS
26checkdir = test -f debian/rules
27
8c4a2bb0 28build: built
33a4da69 29built: dibuild config
fc49813f 30 @echo "== dpkg-buildpackage: build" 1>&2
f937adac
NS
31 $(MAKE) default
32 touch built
33
34config: .census
35.census:
36 @echo "== dpkg-buildpackage: configure" 1>&2
fc49813f 37 $(checkdir)
37754344 38 AUTOHEADER=/bin/true dh_autoreconf
cffbe0d3 39 $(options) $(MAKE) include/platform_defs.h
f937adac 40 touch .census
fc49813f 41
b84c55e5 42dibuild:
3a1664fa 43 $(checkdir)
7c1bfe37 44 @echo "== dpkg-buildpackage: installer" 1>&2
8c4a2bb0 45 if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
cffbe0d3 46 $(diopts) $(MAKE) include/platform_defs.h; \
7631d136
NS
47 for dir in include libxfs libdisk mkfs; do \
48 $(MAKE) -C $$dir; \
49 done; \
8c4a2bb0
NS
50 mv mkfs/mkfs.xfs mkfs/mkfs.xfs-$(bootpkg); \
51 $(MAKE) distclean; \
52 fi
3a1664fa 53
fc49813f
NS
54clean:
55 @echo "== dpkg-buildpackage: clean" 1>&2
56 $(checkdir)
8c4a2bb0 57 -rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
fc49813f 58 $(MAKE) distclean
e9941b38 59 -rm -rf $(dirme) $(dirdev) $(dirdi)
160f1e13 60 -rm -f debian/*substvars debian/files* debian/*.debhelper
37754344 61 dh_autoreconf_clean
773d6f6e 62 dh_clean
fc49813f
NS
63
64binary-indep:
65
8c4a2bb0 66binary-arch: checkroot built
fc49813f
NS
67 @echo "== dpkg-buildpackage: binary-arch" 1>&2
68 $(checkdir)
e9941b38
NS
69 -rm -rf $(dirme) $(dirdev) $(dirdi)
70 $(pkgme) $(MAKE) -C . install
fc49813f 71 $(pkgdev) $(MAKE) -C . install-dev
e9941b38 72 $(pkgdi) $(MAKE) -C debian install-d-i
10a41599 73 $(pkgme) $(MAKE) dist
160f1e13 74 rmdir debian/xfslibs-dev/usr/share/doc/xfsprogs
a91237bd
NS
75 dh_installdocs
76 dh_installchangelogs
33a4da69
NS
77 dh_strip
78 dh_compress
79 dh_fixperms
a91237bd
NS
80 dh_makeshlibs
81 dh_installdeb
33a4da69 82 dh_shlibdeps
a91237bd
NS
83 dh_gencontrol
84 dh_md5sums
85 dh_builddeb
fc49813f
NS
86
87binary: binary-indep binary-arch
88
89checkroot:
90 test 0 -eq `id -u`
91
92.PHONY: binary binary-arch binary-indep clean checkroot