File: rules

package info (click to toggle)
nacl 20110221-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,264 kB
  • sloc: asm: 19,669; ansic: 13,199; cpp: 1,125; sh: 793; makefile: 72
file content (90 lines) | stat: -rwxr-xr-x 2,491 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

# It is needed to specify the destination architecture
#export DH_OPTIONS
export SHORTHOSTNAME=debianbuildhost

configure: configure-stamp

configure-stamp:
	dh_testdir
	touch configure-stamp

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp: configure-stamp  
	# DJB "makefile"-ish
	./do
	docbook-to-man debian/nacl-sha256.sgml > debian/nacl-sha256.1
	docbook-to-man debian/nacl-sha512.sgml > debian/nacl-sha512.1
	docbook-to-man debian/curvecpmessage.sgml > debian/curvecpmessage.1
	docbook-to-man debian/curvecpserver.sgml > debian/curvecpserver.1
	docbook-to-man debian/curvecpclient.sgml > debian/curvecpclient.1
	docbook-to-man debian/curvecpmakekey.sgml > debian/curvecpmakekey.1
	docbook-to-man debian/curvecpprintkey.sgml > debian/curvecpprintkey.1
	cat $(CURDIR)/build/$(SHORTHOSTNAME)/log
	touch $@

clean: 
	dh_testdir
	rm -f configure-stamp
	rm -rf build/
	dh_auto_clean
	dh_clean 

install-arch:
	dh_testdir
	dh_testroot
	dh_prep -s 
	dh_installdirs -s
	mv build/$(SHORTHOSTNAME)/include/*/* build/$(SHORTHOSTNAME)/include/
	mkdir build/$(SHORTHOSTNAME)/include/nacl
	mv build/$(SHORTHOSTNAME)/include/*.h build/$(SHORTHOSTNAME)/include/nacl/
	mv build/$(SHORTHOSTNAME)/lib/*/* build/$(SHORTHOSTNAME)/lib/
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/log
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/work
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/data
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/include/x86
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/include/amd64
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/include/lpia
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/lib/x86
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/lib/amd64
	rm -rf $(CURDIR)/build/$(SHORTHOSTNAME)/lib/lpia
	rm -f $(CURDIR)/build/$(SHORTHOSTNAME)/bin/ok*
	rm -f $(CURDIR)/build/$(SHORTHOSTNAME)/lib/*.o
	rm build/$(SHORTHOSTNAME)/include/nacl/cpuid.h
	dh_install --sourcedir=$(CURDIR)/build/$(SHORTHOSTNAME)

install-indep:
	dh_testdir
	dh_testroot

binary: binary-arch binary-indep
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary-indep: build-arch install-arch

binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installman -s
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

.PHONY: build clean binary install configure