summaryrefslogtreecommitdiff
path: root/rules
blob: ba9fd587e06db9ddf697bfda8dcef0ed96553a5e (plain)
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
#!/usr/bin/make -f

# That's needed for DEB_VERSION_UPSTREAM
-include /usr/share/dpkg/pkg-info.mk
# That's needed for DEB_HOST_MULTIARCH
-include /usr/share/dpkg/architecture.mk

export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Convenience shortcuts
MA_DESTDIR ?= debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
MA_DEV_DESTDIR ?= debian/libjim-dev/usr/lib/$(DEB_HOST_MULTIARCH)

%:
	dh $@ --list-missing

override_dh_auto_configure:
	dh_auto_configure --builddirectory=static/
	dh_auto_configure -- --shared

override_dh_auto_build:
	dh_auto_build --builddirectory=static/
	dh_auto_build

override_dh_auto_test:
	dh_auto_test --builddirectory=static/
	dh_auto_test

override_dh_auto_install:
	dh_auto_install --builddirectory=static/
	dh_auto_install

override_dh_install:
	dh_install
	set -e; rootdir=`pwd` ;\
	cd ${MA_DESTDIR}; libfile=`ls *.so.*`; cd $${rootdir};\
	cd ${MA_DEV_DESTDIR}; ln -sf $${libfile} libjim.so

override_dh_auto_clean:
	dh_auto_clean
	rm -f libjim.so*
	rm -f tests/exec.tmp1
	rm -Rf static/