Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 40 | Rev 85 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 magnus 1
#!/usr/bin/make -f
79 magnus 2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
4
# GNU copyright 1997 to 1999 by Joey Hess.
2 magnus 5
 
79 magnus 6
# Uncomment this to turn on verbose mode.
7
#export DH_VERBOSE=1
2 magnus 8
 
79 magnus 9
# These are used for cross-compiling and for saving the configure script
10
# from having to guess our platform (since we know it already)
11
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
2 magnus 13
 
79 magnus 14
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
15
  buildflags = --build=$(DEB_BUILD_GNU_TYPE)
16
else
17
  buildflags = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
18
endif
2 magnus 19
 
79 magnus 20
parallel = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21
ifneq (,$(parallel))
22
jobsflag = -j$(parallel)
23
endif
24
 
25
config.status: configure.ac
26
	dh_testdir
27
	# Add here commands to configure the package.
28
	[ -d src/nettle-dontuse -a ! -d src/nettle ] || mv src/nettle src/nettle-dontuse
29
	dh_autoreconf
30
	./configure $(buildflags) \
31
		    --prefix=/usr \
32
		    --libdir=/usr/lib \
33
	            --disable-dependency-tracking \
34
	            --enable-pam --enable-kerberos --enable-srp \
35
	            --with-pty --enable-tcp-forward --enable-x11-forward \
36
	            --enable-agent-forward --enable-ipv6 --enable-utmp \
37
	            --with-zlib --with-tcpwrappers --with-sshd1=/usr/sbin/sshd \
38
	            --with-x XAUTH_PROGRAM=/usr/bin/xauth \
39
	            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,-z,defs -Wl,--as-needed"
40
 
41
build: build-stamp
42
build-stamp:  config.status
43
	dh_testdir
44
 
45
	# Add here commands to compile the package.
46
	$(MAKE) $(jobsflag) MAKEINFO='makeinfo --enable-encoding'
47
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
48
	$(MAKE) check
49
endif
50
 
51
	touch build-stamp
52
 
53
clean:
54
	dh_testdir
55
	dh_testroot
56
	rm -f build-stamp
57
 
58
	# Add here commands to clean up after the build process.
59
	[ ! -f Makefile ] || $(MAKE) distclean
60
	dh_autoreconf_clean
61
	dh_clean
62
	[ -d src/nettle -a ! -d src/nettle-dontuse ] || mv src/nettle-dontuse src/nettle
63
 
64
install: build
65
	dh_testdir
66
	dh_testroot
67
	dh_clean -k
68
	dh_installdirs
69
 
70
	# Add here commands to install the package into debian/tmp
71
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
72
 
73
build-indep build-arch: build
74
 
75
# Build architecture-independent files here.
76
binary-indep: build-indep install
77
	dh_testdir
78
	dh_testroot
79
	dh_install -i --sourcedir=debian/tmp
80
	dh_link -i
81
	dh_installchangelogs -i ChangeLog
82
	dh_installdocs -i -A README
83
	dh_installinfo -i
84
	dh_installman -i
85
	dh_installdebconf -i
86
	dh_compress -i
87
	dh_fixperms -i
88
	dh_makeshlibs -i
89
	dh_installdeb -i
90
	dh_shlibdeps -i
91
	dh_gencontrol -i
92
	dh_md5sums -i
93
	dh_builddeb -i
94
 
95
# Build architecture-dependent files here.
96
binary-arch: build-arch install
97
	dh_testdir
98
	dh_testroot
99
	dh_install -a --sourcedir=debian/tmp
100
	dh_link -a
101
	dh_installchangelogs -a ChangeLog
102
	dh_installdocs -a -A README
103
	dh_installexamples -a
104
	dh_installman -a
105
	dh_installinit -a
106
	dh_installdebconf -a
107
	dh_strip -a
108
	dh_compress -a
109
	dh_fixperms -a
110
	dh_makeshlibs -a
111
	dh_installdeb -a
112
	dh_shlibdeps -a
113
	dh_gencontrol -a
114
	dh_md5sums -a
115
	dh_builddeb -a
116
 
117
binary: binary-arch binary-indep
118
.PHONY: build-indep build-arch build clean clean-patched binary-indep binary-arch binary install