Subversion Repositories

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

Rev 64 | Rev 67 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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