File: rules

package info (click to toggle)
libmowgli-2 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,792 kB
  • sloc: ansic: 13,344; sh: 3,903; makefile: 310
file content (45 lines) | stat: -rwxr-xr-x 1,590 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/make -f

export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

export ACLOCAL := aclocal -I m4

export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --with=autoreconf

override_dh_auto_configure:
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	dh_auto_configure -- SHELL=/bin/sh --with-openssl=no

override_dh_auto_install:
	dh_auto_install
	# mkdir -p debian/libmowgli-2-0/usr/include/$(DEB_HOST_MULTIARCH)/libmowgli-2/platform
	# mv -f debian/tmp/usr/include/libmowgli-2/platform/autoconf.h debian/libmowgli-2-0/usr/include/$(DEB_HOST_MULTIARCH)/libmowgli-2/platform/autoconf.h

override_dh_installexamples:
	sed -e 's,\(libdir = \$${prefix}/lib\)/.*$$,\1,' \
	    -e 's,CFLAGS = .*$$,CFLAGS = ,' \
		-e 's,CPPFLAGS = .*$$,CPPFLAGS = ,' \
		-e 's,LDFLAGS = .*$$,LDFLAGS = ,' < buildsys.mk > buildsys.mk.new
	mv -f buildsys.mk.new buildsys.mk
	dh_installexamples -X.dep

override_dh_compress:
	dh_compress -Xusr/share/doc/libmowgli-2-dev/examples

override_dh_strip:
	dh_strip --dbg-package=libmowgli-2-0-dbg

override_dh_auto_clean:
	[ ! -f buildsys.mk ] || dh_auto_clean

.PHONY: override_dh_installexamples override_dh_compress override_dh_strip override_dh_auto_clean override_dh_auto_install override_dh_auto_configure