Subversion Repositories

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

Rev 129 | 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
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
4
# GNU copyright 1997 to 1999 by Joey Hess.
5
 
6
# Uncomment this to turn on verbose mode.
7
#export DH_VERBOSE=1
8
 
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)
77 magnus 13
DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
2 magnus 14
 
65 magnus 15
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
16
  buildflags = --build=$(DEB_BUILD_GNU_TYPE)
2 magnus 17
else
65 magnus 18
  buildflags = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
2 magnus 19
endif
65 magnus 20
 
21
parallel = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22
ifneq (,$(parallel))
23
jobsflag = -j$(parallel)
2 magnus 24
endif
25
 
64 magnus 26
config.status: configure
2 magnus 27
	dh_testdir
28
	# Add here commands to configure the package.
64 magnus 29
	dh_autotools-dev_updateconfig
65 magnus 30
	./configure $(buildflags) \
47 magnus 31
		    --prefix=/usr \
77 magnus 32
		    --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
47 magnus 33
	            --enable-shared \
34
	            --disable-dependency-tracking \
95 magnus 35
	            $(shell DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed dpkg-buildflags --export=configure)
2 magnus 36
 
37
 
38
build: build-stamp
39
build-stamp:  config.status
40
	dh_testdir
41
 
42
	# Add here commands to compile the package.
65 magnus 43
	$(MAKE) $(jobsflag) MAKEINFO='makeinfo --enable-encoding'
54 magnus 44
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
15 magnus 45
	$(MAKE) check
46
endif
2 magnus 47
 
48
	touch build-stamp
49
 
64 magnus 50
clean:
2 magnus 51
	dh_testdir
52
	dh_testroot
53
	rm -f build-stamp
54
 
55
	# Add here commands to clean up after the build process.
35 magnus 56
	[ ! -f Makefile ] || $(MAKE) distclean
64 magnus 57
	dh_autotools-dev_restoreconfig
58
	dh_clean
2 magnus 59
 
60
install: build
61
	dh_testdir
62
	dh_testroot
67 magnus 63
	dh_prep
2 magnus 64
	dh_installdirs
65
 
66
	# Add here commands to install the package into debian/tmp
67
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
68
 
69
# Build architecture-independent files here.
67 magnus 70
build-indep:
52 magnus 71
binary-indep:
72
# Nothing to do
2 magnus 73
 
74
# Build architecture-dependent files here.
67 magnus 75
build-arch: build
76
binary-arch: build-arch install
2 magnus 77
	dh_testdir
78
	dh_testroot
47 magnus 79
	dh_install -a --sourcedir=debian/tmp
129 magnus 80
	dh_installdocs -a -Nnettle-dev --link-doc=libnettle4
81
	dh_installdocs -a -pnettle-dev
47 magnus 82
	dh_installchangelogs -a ChangeLog
83
	dh_installexamples -a
84
	dh_installinfo -a
85
	dh_installman -a
51 magnus 86
	dh_strip -a --dbg-package=nettle-dbg
52 magnus 87
	dh_compress -a -X.pdf
47 magnus 88
	dh_fixperms -a
73 magnus 89
	dh_makeshlibs -a -V
47 magnus 90
	dh_installdeb -a
91
	dh_shlibdeps -a
92
	dh_gencontrol -a
93
	dh_md5sums -a
94
	dh_builddeb -a
2 magnus 95
 
52 magnus 96
binary: binary-arch
67 magnus 97
.PHONY: build build-indep build-arch clean clean-patched binary-indep binary-arch binary install