diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 88 |
1 files changed, 76 insertions, 12 deletions
diff --git a/debian/rules b/debian/rules index fbc3942..283d464 100755 --- a/debian/rules +++ b/debian/rules @@ -1,16 +1,80 @@ #!/usr/bin/make -f -# You must remove unused comment lines for the released package. -export DH_VERBOSE = 1 -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -%: - dh $@ +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 -override_dh_auto_configure: - ./configure --mandir=/usr/share/man - rm -rf config.log +DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow +DEB_CFLAGS_MAINT_PREPEND = -Wall -override_dh_strip: - dh_strip --dbgsym-migration=liburing-dev +include /usr/share/dpkg/default.mk +include /usr/share/dpkg/buildtools.mk + +export CC + +lib := liburing1 +libdbg := $(lib)-dbg +libudeb := $(lib)-udeb +libdev := liburing-dev + +build-indep: + +build-arch: + dh_testdir + + $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + + $(MAKE) clean + + dh_clean + +check-arch: build-arch + dh_testdir + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + partcheck +endif + +install-arch: check-arch + dh_testdir + dh_testroot + dh_clean + dh_installdirs + + $(MAKE) install \ + DESTDIR=$(CURDIR)/debian/tmp \ + libdir=/lib/$(DEB_HOST_MULTIARCH) \ + libdevdir=/usr/lib/$(DEB_HOST_MULTIARCH) + +binary: binary-indep binary-arch + +binary-indep: + # Nothing to do. + +binary-arch: install-arch + dh_testdir + dh_testroot + dh_install -a + dh_installdocs -a + dh_installexamples -a + dh_installman -a + dh_lintian -a + dh_link -a + dh_strip -a --ddeb-migration='$(libdbg) (<< 0.3)' + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a --add-udeb '$(libudeb)' + dh_shlibdeps -a + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +.PHONY: clean build-indep build-arch build +.PHONY: install-arch binary-indep binary-arch binary |