]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - debian/rules
xfs_scrub: remove moveon from repair action list helpers
[thirdparty/xfsprogs-dev.git] / debian / rules
CommitLineData
fc49813f
NS
1#!/usr/bin/make -f
2
160f1e13
AMS
3export DH_VERBOSE=1
4
e3d9ff3c
DW
5ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
6 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
7 PMAKEFLAGS += -j$(NUMJOBS)
8endif
9
fc49813f
NS
10package = xfsprogs
11develop = xfslibs-dev
33a4da69
NS
12bootpkg = xfsprogs-udeb
13
ec1cf08d 14version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
33a4da69
NS
15target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
16udebpkg = $(bootpkg)_$(version)_$(target).udeb
fc49813f 17
e9941b38 18dirme = debian/$(package)
fc49813f 19dirdev = debian/$(develop)
33a4da69 20dirdi = debian/$(bootpkg)
e9941b38 21pkgme = DIST_ROOT=`pwd`/$(dirme); export DIST_ROOT;
fc49813f 22pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
33a4da69 23pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
c5389736 24stdenv = @GZIP=-q; export GZIP;
fc49813f 25
b84c55e5
NS
26options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
27 INSTALL_USER=root INSTALL_GROUP=root \
e61f1552 28 LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes --enable-blkid=yes --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ;
b84c55e5 29diopts = $(options) \
e61f1552 30 export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ;
fc49813f
NS
31checkdir = test -f debian/rules
32
ec1cf08d
NS
33build: build-arch build-indep
34build-arch: built
35build-indep: built
33a4da69 36built: dibuild config
fc49813f 37 @echo "== dpkg-buildpackage: build" 1>&2
e3d9ff3c 38 $(MAKE) $(PMAKEFLAGS) default
f937adac
NS
39 touch built
40
41config: .census
42.census:
43 @echo "== dpkg-buildpackage: configure" 1>&2
fc49813f 44 $(checkdir)
37754344 45 AUTOHEADER=/bin/true dh_autoreconf
e3d9ff3c 46 $(options) $(MAKE) $(PMAKEFLAGS) include/platform_defs.h
f937adac 47 touch .census
fc49813f 48
b84c55e5 49dibuild:
3a1664fa 50 $(checkdir)
7c1bfe37 51 @echo "== dpkg-buildpackage: installer" 1>&2
8c4a2bb0 52 if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
cffbe0d3 53 $(diopts) $(MAKE) include/platform_defs.h; \
7af0c6c3 54 mkdir -p include/xfs; \
b08338d7 55 for dir in include libxfs; do \
e3d9ff3c 56 $(MAKE) $(PMAKEFLAGS) -C $$dir NODEP=1 install-headers; \
b08338d7 57 done; \
5caa042b 58 for dir in include libxfs libxcmd libfrog mkfs; do \
e3d9ff3c 59 $(MAKE) $(PMAKEFLAGS) $$dir; \
7631d136 60 done; \
8c4a2bb0
NS
61 mv mkfs/mkfs.xfs mkfs/mkfs.xfs-$(bootpkg); \
62 $(MAKE) distclean; \
63 fi
3a1664fa 64
fc49813f
NS
65clean:
66 @echo "== dpkg-buildpackage: clean" 1>&2
67 $(checkdir)
8c4a2bb0 68 -rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
fc49813f 69 $(MAKE) distclean
e9941b38 70 -rm -rf $(dirme) $(dirdev) $(dirdi)
160f1e13 71 -rm -f debian/*substvars debian/files* debian/*.debhelper
37754344 72 dh_autoreconf_clean
773d6f6e 73 dh_clean
fc49813f
NS
74
75binary-indep:
76
8c4a2bb0 77binary-arch: checkroot built
fc49813f
NS
78 @echo "== dpkg-buildpackage: binary-arch" 1>&2
79 $(checkdir)
e9941b38
NS
80 -rm -rf $(dirme) $(dirdev) $(dirdi)
81 $(pkgme) $(MAKE) -C . install
fc49813f 82 $(pkgdev) $(MAKE) -C . install-dev
e9941b38 83 $(pkgdi) $(MAKE) -C debian install-d-i
10a41599 84 $(pkgme) $(MAKE) dist
900bd62e 85 install -D -m 0755 debian/local/initramfs.hook debian/xfsprogs/usr/share/initramfs-tools/hooks/xfs
160f1e13 86 rmdir debian/xfslibs-dev/usr/share/doc/xfsprogs
ec1cf08d 87 rm -f debian/xfslibs-dev/lib/libhandle.la
4efcad54 88 rm -f debian/xfslibs-dev/lib/libhandle.a
ec1cf08d 89 rm -fr debian/xfslibs-dev/usr/lib
a91237bd
NS
90 dh_installdocs
91 dh_installchangelogs
33a4da69
NS
92 dh_strip
93 dh_compress
94 dh_fixperms
a91237bd
NS
95 dh_makeshlibs
96 dh_installdeb
33a4da69 97 dh_shlibdeps
a91237bd
NS
98 dh_gencontrol
99 dh_md5sums
100 dh_builddeb
fc49813f
NS
101
102binary: binary-indep binary-arch
103
104checkroot:
105 test 0 -eq `id -u`
106
107.PHONY: binary binary-arch binary-indep clean checkroot