File: rules

package info (click to toggle)
libmowgli 1.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,000 kB
  • ctags: 697
  • sloc: ansic: 4,284; sh: 3,434; makefile: 160
file content (45 lines) | stat: -rwxr-xr-x 1,494 bytes parent folder | download
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)
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

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/libmowgli2/usr/include/$(DEB_HOST_MULTIARCH)/libmowgli
	mv -f debian/tmp/usr/include/libmowgli/mowgli_config.h debian/libmowgli2/usr/include/$(DEB_HOST_MULTIARCH)/libmowgli/mowgli_config.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-dev/examples

override_dh_strip:
	dh_strip --dbg-package=libmowgli2-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