[451] | 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 | # $Id$
|
---|
| 7 | #
|
---|
| 8 |
|
---|
| 9 | # Uncomment this to turn on verbose mode.
|
---|
| 10 | #export DH_VERBOSE=1
|
---|
| 11 |
|
---|
| 12 | # Define package name variable for a one-stop change.
|
---|
| 13 | PACKAGE_NAME = PBPKG
|
---|
| 14 |
|
---|
| 15 | # These are used for cross-compiling and for saving the configure script
|
---|
| 16 | # from having to guess our platform (since we know it already)
|
---|
| 17 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
---|
| 18 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
---|
| 19 |
|
---|
| 20 | CFLAGS = -Wall -g
|
---|
| 21 |
|
---|
| 22 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
---|
[1204] | 23 | CFLAGS += -O0
|
---|
[451] | 24 | else
|
---|
[1204] | 25 | CFLAGS += -O2
|
---|
[451] | 26 | endif
|
---|
| 27 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
---|
[1204] | 28 | INSTALL_PROGRAM += -s
|
---|
[451] | 29 | endif
|
---|
| 30 |
|
---|
| 31 | # Build both architecture dependent and independent
|
---|
[1204] | 32 | build: build-arch
|
---|
[451] | 33 |
|
---|
| 34 | # Build architecture dependent
|
---|
| 35 | build-arch: build-arch-stamp
|
---|
| 36 |
|
---|
[1204] | 37 | build-arch-stamp:
|
---|
| 38 | dh_testdir
|
---|
[451] | 39 |
|
---|
[1204] | 40 | # Compile the package.
|
---|
| 41 | $(MAKE)
|
---|
| 42 | chmod 644 script*/*
|
---|
| 43 | touch build-stamp
|
---|
[451] | 44 |
|
---|
| 45 | # Clean up
|
---|
| 46 | clean:
|
---|
[1204] | 47 | dh_testdir
|
---|
| 48 | dh_testroot
|
---|
| 49 | rm -f build-arch-stamp #CONFIGURE-STAMP#
|
---|
| 50 | # Clean temporary document directory
|
---|
| 51 | rm -rf debian/doc-temp
|
---|
| 52 | # Clean up.
|
---|
| 53 | -$(MAKE) distclean
|
---|
| 54 | rm -f config.log
|
---|
[451] | 55 | ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
---|
[1204] | 56 | cp -f /usr/share/misc/config.sub config.sub
|
---|
[451] | 57 | endif
|
---|
| 58 | ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
---|
[1204] | 59 | cp -f /usr/share/misc/config.guess config.guess
|
---|
[451] | 60 | endif
|
---|
| 61 |
|
---|
[1204] | 62 | dh_clean
|
---|
[451] | 63 |
|
---|
| 64 | # Install architecture dependent and independent
|
---|
[1204] | 65 | install: install-arch
|
---|
[451] | 66 |
|
---|
| 67 | # Install architecture dependent
|
---|
| 68 | install-arch: build-arch
|
---|
[1204] | 69 | dh_testdir
|
---|
| 70 | dh_testroot
|
---|
| 71 | dh_clean -k -s
|
---|
| 72 | dh_installdirs -s
|
---|
[451] | 73 |
|
---|
[1204] | 74 | # Install the package files into build directory:
|
---|
| 75 | dh_install -s
|
---|
| 76 | rm -rf $(CURDIR)/debian/$(PACKAGE_NAME)
|
---|
| 77 | mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
|
---|
| 78 | mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
|
---|
| 79 | install -p -m 755 afio $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
|
---|
| 80 | install -p -m 644 afio.1 $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
|
---|
[451] | 81 |
|
---|
| 82 | # Must not depend on anything. This is to be called by
|
---|
| 83 | # binary-arch/binary-indep
|
---|
| 84 | # in another 'make' thread.
|
---|
| 85 | binary-common:
|
---|
[1204] | 86 | dh_testdir
|
---|
| 87 | dh_testroot
|
---|
| 88 | #dh_installchangelogs changelog
|
---|
| 89 | dh_installdocs
|
---|
| 90 | dh_installman
|
---|
| 91 | dh_link
|
---|
| 92 | dh_strip
|
---|
| 93 | dh_compress
|
---|
| 94 | dh_fixperms
|
---|
| 95 | dh_installdeb
|
---|
| 96 | dh_shlibdeps
|
---|
| 97 | dh_gencontrol
|
---|
| 98 | dh_md5sums
|
---|
| 99 | dh_builddeb
|
---|
[451] | 100 |
|
---|
| 101 | # Build architecture dependant packages using the common target.
|
---|
| 102 | binary-arch: build-arch install-arch
|
---|
[1204] | 103 | $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
|
---|
[451] | 104 |
|
---|
| 105 | # Build architecture depdendent and independent packages
|
---|
[1204] | 106 | binary: binary-arch
|
---|
[451] | 107 | .PHONY: clean binary
|
---|
| 108 |
|
---|