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