Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
7
8 export UDEVDIR = $(shell pkg-config --variable=udevdir udev)
9
10 PY3VERS=$(shell py3versions -vr)
11
12 DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname )
13
14 %:
15 dh $@ --with python3
16
17 override_dh_auto_clean:
18 ( cd libconcord/ && [ ! -f Makefile ] || $(MAKE) clean )
19 rm -f libconcord/Makefile libconcord/config.h \
20 libconcord/config.status libconcord/config.log \
21 libconcord/libconcord.rules \
22 libconcord/libtool libconcord/stamp-h1
23 rm -rf libconcord/bindings/python/build
24 ( cd concordance/ && [ ! -f Makefile ] || $(MAKE) clean )
25 rm -f concordance/Makefile concordance/config.h \
26 concordance/config.status concordance/config.log \
27 concordance/libtool concordance/stamp-h1
28 find . -name *\.py[co] -exec rm {} \;
29 rm -f build-ext-* install-ext-*
30 rm -f libconcord/libconcord-usbnet.rules
31 dh_auto_clean
32
33 override_dh_auto_configure:
34 ( cd libconcord/ && ./configure --prefix=/usr --sysconfdir=/etc )
35 ( cd concordance/ && ./configure --prefix=/usr $(shell DEB_CFLAGS_MAINT_APPEND=-L../libconcord/.libs DEB_CPPFLAGS_MAINT_APPEND=-I../libconcord dpkg-buildflags --export=configure))
36
37 build-ext-%:
38 ( cd libconcord/bindings/python && python$* setup.py build )
39 touch $@
40
41 override_dh_auto_build: $(PY3VERS:%=build-ext-%)
42 ( cd libconcord/ && $(MAKE) )
43 ( cd libconcord/ && $(MAKE) udev )
44 ( cd concordance/ && $(MAKE) )
45
46 install-ext3-%:
47 ( cd libconcord/bindings/python && python$* setup.py install --root=$(CURDIR)/debian/python3-libconcord )
48
49 override_dh_auto_install: $(PY3VERS:%=install-ext3-%)
50 ( cd libconcord/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install )
51 ( cd libconcord/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp UDEVDIR=$(UDEVDIR) install_udev )
52 ( cd concordance/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install )
53
54 override_dh_install:
55 find $(CURDIR)/debian -name *.la -delete
56 find $(CURDIR)/debian -name *.a -delete
57 dh_install
58
59 override_dh_missing:
60 dh_missing --fail-missing