• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
7DEB_CFLAGS_MAINT_PREPEND = -Wall
8
9include /usr/share/dpkg/default.mk
10include /usr/share/dpkg/buildtools.mk
11
12export CC
13
14lib := liburing1
15libdbg := $(lib)-dbg
16libudeb := $(lib)-udeb
17libdev := liburing-dev
18
19build-indep:
20
21build-arch:
22	dh_testdir
23
24	$(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
25
26build: build-indep build-arch
27
28clean:
29	dh_testdir
30	dh_testroot
31
32	$(MAKE) clean
33
34	dh_clean
35
36check-arch: build-arch
37	dh_testdir
38
39ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
40	$(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
41	        partcheck
42endif
43
44install-arch: check-arch
45	dh_testdir
46	dh_testroot
47	dh_clean
48	dh_installdirs
49
50	$(MAKE) install \
51	  DESTDIR=$(CURDIR)/debian/tmp \
52	  libdir=/lib/$(DEB_HOST_MULTIARCH) \
53	  libdevdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
54	  relativelibdir=/lib/$(DEB_HOST_MULTIARCH)/
55
56binary: binary-indep binary-arch
57
58binary-indep:
59	# Nothing to do.
60
61binary-arch: install-arch
62	dh_testdir
63	dh_testroot
64	dh_install -a
65	dh_installdocs -a
66	dh_installexamples -a
67	dh_installman -a
68	dh_lintian -a
69	dh_link -a
70	dh_strip -a --ddeb-migration='$(libdbg) (<< 0.3)'
71	dh_compress -a
72	dh_fixperms -a
73	dh_makeshlibs -a --add-udeb '$(libudeb)'
74	dh_shlibdeps -a
75	dh_installdeb -a
76	dh_gencontrol -a
77	dh_md5sums -a
78	dh_builddeb -a
79
80.PHONY: clean build-indep build-arch build
81.PHONY: install-arch binary-indep binary-arch binary
82