File: rules

package info (click to toggle)
opencryptoki 3.6.1%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,628 kB
  • ctags: 5,333
  • sloc: ansic: 75,819; perl: 1,513; makefile: 614; yacc: 370; sh: 148; lex: 124
file content (49 lines) | stat: -rwxr-xr-x 1,252 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
46
47
48
49
#!/usr/bin/make -f

SHELL := sh -e

%:
	dh ${@} --with autoreconf,systemd

override_dh_auto_clean:
	dh_auto_clean
	rm -f usr/lib/pkcs11/api/pkcs11

override_dh_auto_configure:
	dh_auto_configure -- --enable-tpmtok --with-systemd=/lib/systemd/system ac_cv_path_CHGRP=true

override_dh_auto_install:
	dh_auto_install

	# create links to .so-files in usr/lib
	( cd debian/tmp/usr/lib && \
	 for FILE in ./opencryptoki/*.so.* ./opencryptoki/stdll/*.so.*; \
	 do \
		ln -s $$FILE ; \
	 done \
	)

	# Remove broken symlinks in /usr/lib/pkcs11/
	cd debian/tmp/usr/lib/pkcs11 && rm -f \
		libopencryptoki.so PKCS11_API.so

	# Removing useless files
	rm -rf debian/tmp/etc/ld.so.conf.d
	rm -rf debian/tmp/etc/init.d
	rm -f debian/tmp/usr/include/Makefile*
	rm -f debian/tmp/usr/include/*/Makefile*
	rm -f debian/tmp/usr/lib/opencryptoki/*.la \
		debian/tmp/usr/lib/opencryptoki/stdll/*.la

	mkdir -p debian/opencryptoki/etc
	ln -s ../var/lib/opencryptoki debian/opencryptoki/etc/pkcs11

override_dh_install:
	dh_install --fail-missing --sourcedir=debian/tmp

override_dh_installinit:
	dh_installinit -p opencryptoki --name pkcsslotd

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST))).. && \
	uscan --force-download --repack --rename --destdir $(CURDIR)