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 | # Define package name variable for a one-stop change.
|
---|
10 | PACKAGE_NAME = mondo-doc
|
---|
11 |
|
---|
12 | # These are used for cross-compiling and for saving the configure script
|
---|
13 | # from having to guess our platform (since we know it already)
|
---|
14 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
---|
15 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
---|
16 |
|
---|
17 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
---|
18 | INSTALL_PROGRAM += -s
|
---|
19 | endif
|
---|
20 |
|
---|
21 | # Build both architecture dependent and independent
|
---|
22 | build: build-indep
|
---|
23 |
|
---|
24 | # Build architecture independent
|
---|
25 | build-indep:
|
---|
26 | $(MAKE) -f Makefile.man VERSION=VVV
|
---|
27 | $(MAKE) -f Makefile.howto VERSION=VVV
|
---|
28 | touch build-indep-stamp
|
---|
29 |
|
---|
30 | # Clean up
|
---|
31 | clean:
|
---|
32 | dh_testdir
|
---|
33 | dh_testroot
|
---|
34 | rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
|
---|
35 | # Clean temporary document directory
|
---|
36 | rm -rf debian/doc-temp
|
---|
37 | # Clean up.
|
---|
38 | -$(MAKE) distclean
|
---|
39 | rm -f config.log
|
---|
40 | ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
---|
41 | cp -f /usr/share/misc/config.sub config.sub
|
---|
42 | endif
|
---|
43 | ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
---|
44 | cp -f /usr/share/misc/config.guess config.guess
|
---|
45 | endif
|
---|
46 |
|
---|
47 | dh_clean
|
---|
48 |
|
---|
49 | # Install architecture dependent and independent
|
---|
50 | install: install-indep
|
---|
51 |
|
---|
52 | # Install architecture independent
|
---|
53 | install-indep: build-indep
|
---|
54 | dh_testdir
|
---|
55 | dh_testroot
|
---|
56 | dh_clean -k -i
|
---|
57 | $(MAKE) -f Makefile.man install INSTALLDIR=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/doc/$(PACKAGE_NAME)
|
---|
58 | $(MAKE) -f Makefile.howto install INSTALLDIR=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/doc/$(PACKAGE_NAME)
|
---|
59 |
|
---|
60 | # Must not depend on anything. This is to be called by
|
---|
61 | # binary-arch/binary-indep
|
---|
62 | # in another 'make' thread.
|
---|
63 | binary-common:
|
---|
64 | dh_testdir
|
---|
65 | dh_testroot
|
---|
66 | dh_installdocs
|
---|
67 | dh_installman
|
---|
68 | dh_link
|
---|
69 | dh_strip
|
---|
70 | dh_compress
|
---|
71 | dh_fixperms
|
---|
72 | dh_installdeb
|
---|
73 | dh_shlibdeps
|
---|
74 | dh_gencontrol
|
---|
75 | dh_md5sums
|
---|
76 | dh_builddeb
|
---|
77 |
|
---|
78 | # Build architecture independant packages using the common target.
|
---|
79 | binary-indep: build-indep install-indep
|
---|
80 | $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
---|
81 |
|
---|
82 | # Build architecture depdendent and independent packages
|
---|
83 | binary: binary-indep
|
---|
84 | .PHONY: clean binary
|
---|