File: rules

package info (click to toggle)
softhsm 1.3.7-2%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,688 kB
  • ctags: 1,498
  • sloc: sh: 11,139; cpp: 8,504; ansic: 1,614; makefile: 110
file content (48 lines) | stat: -rwxr-xr-x 1,279 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
46
47
48
#!/usr/bin/make -f

export DEB_BUILD_HARDENING=1

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)

SKIP_64BIT_ON_CPU="alpha ia64 mips64 mips64el"

ifeq ($(DEB_HOST_ARCH_BITS),64)
  # -m64 is not recognized on some architectures
  ifeq (,$(findstring $(DEB_HOST_GNU_CPU),$(SKIP_64BIT_ON_CPU)))
    CONFIGURE_FLAGS = --enable-64bit
  endif
endif

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
	  --sysconfdir=/etc/softhsm \
	  --localstatedir=/var/lib \
	  --with-botan=/usr \
	  --with-pic \
	  $(CONFIGURE_FLAGS) \
	  LDFLAGS="-Wl,-z,defs -Wl,--as-needed" 

override_dh_link:
	rm -rf $(CURDIR)/debian/libsofthsm/usr/share/doc/libsofthsm/
	rm -rf $(CURDIR)/debian/softhsm/usr/share/doc/softhsm/
	rm -rf $(CURDIR)/debian/libsofthsm-dev/usr/share/doc/libsofthsm-dev/
	dh_link

override_dh_makeshlibs:
	# Fail only if symbols have disappeared
	dh_makeshlibs -- -c1

override_dh_strip:
	dh_strip --dbg-package=softhsm-dbg

override_dh_installchangelogs:
	dh_installchangelogs NEWS

#override_dh_install:
#	rm $(CURDIR)/debian/tmp/usr/lib/softhsm/libsofthsm.la
#	dh_install --fail-missing