File: rules

package info (click to toggle)
opencryptoki 2.2.8%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,588 kB
  • ctags: 7,069
  • sloc: ansic: 97,330; sh: 10,650; makefile: 501
file content (47 lines) | stat: -rwxr-xr-x 1,095 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
#!/usr/bin/make -f

SHELL := sh -e

%:
	dh ${@} --with quilt

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

	rm -f config.guess config.sub

override_dh_auto_configure:
	cp -f /usr/share/misc/config.guess config.guess
	cp -f /usr/share/misc/config.sub config.sub

	touch aclocal.m4 configure Makefile.in
	dh_auto_configure -- --enable-tpmtok

override_dh_auto_install:
	dh_auto_install

	# Adjusting libdir
	for FILE in debian/tmp/usr/lib/opencryptoki/*.la; \
	do \
		sed -i -e "s|^libdir='/usr/lib|libdir='/usr/lib/opencryptoki|" $$FILE; \
	done

	for FILE in debian/tmp/usr/lib/opencryptoki/stdll/*.la; \
	do \
		sed -i -e "s|^libdir='/usr/lib|libdir='/usr/lib/opencryptoki/stdll|" $$FILE; \
	done

	# Removing useless files
	rm -rf debian/tmp/etc/init.d
	rm -f debian/tmp/usr/include/Makefile*
	rm -f debian/tmp/usr/include/*/Makefile*

	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_strip:
	dh_strip --dbg-package=opencryptoki-dbg