| 1 |
#!/usr/bin/make -f |
| 2 |
# MAde with the aid of dh_make, by Craig Small |
| 3 |
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. |
| 4 |
# Some lines taken from debmake, by Cristoph Lameter. |
| 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) |
| 13 |
|
| 14 |
PACKAGE = ac252 |
| 15 |
DSTDIR := $(CURDIR)/debian/$(PACKAGE) |
| 16 |
|
| 17 |
CFLAGS = |
| 18 |
|
| 19 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 20 |
CFLAGS += -O0 |
| 21 |
else |
| 22 |
CFLAGS += -O2 |
| 23 |
endif |
| 24 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
| 25 |
INSTALL_PROGRAM += -s |
| 26 |
endif |
| 27 |
|
| 28 |
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
| 29 |
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
| 30 |
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
| 31 |
|
| 32 |
configure: configure-stamp |
| 33 |
configure-stamp: |
| 34 |
dh_testdir |
| 35 |
|
| 36 |
CPPFLAGS="$(CPPFLAGS)" \ |
| 37 |
CFLAGS="$(CFLAGS)" \ |
| 38 |
LDFLAGS="$(LDFLAGS)" \ |
| 39 |
./configure \ |
| 40 |
--program-suffix=-252 \ |
| 41 |
--host=$(DEB_HOST_GNU_TYPE) \ |
| 42 |
--build=$(DEB_BUILD_GNU_TYPE) \ |
| 43 |
--prefix=/usr \ |
| 44 |
--mandir=\$${prefix}/share/man \ |
| 45 |
--infodir=\$${prefix}/share/info \ |
| 46 |
--datadir=\$${prefix}/share/$(PACKAGE) |
| 47 |
|
| 48 |
touch configure-stamp |
| 49 |
|
| 50 |
build: build-stamp |
| 51 |
build-stamp: configure-stamp |
| 52 |
dh_testdir |
| 53 |
|
| 54 |
$(MAKE) |
| 55 |
|
| 56 |
touch build-stamp |
| 57 |
|
| 58 |
clean: |
| 59 |
dh_testdir |
| 60 |
dh_testroot |
| 61 |
|
| 62 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 63 |
rm -f build-stamp install-stamp |
| 64 |
|
| 65 |
dh_clean |
| 66 |
|
| 67 |
install: install-stamp |
| 68 |
install-stamp: build-stamp |
| 69 |
dh_testdir |
| 70 |
dh_testroot |
| 71 |
dh_clean -k |
| 72 |
dh_installdirs |
| 73 |
|
| 74 |
$(MAKE) install DESTDIR=$(DSTDIR) |
| 75 |
rm -f $(DSTDIR)/usr/share/info/dir* |
| 76 |
rm -f $(DSTDIR)/usr/share/info/standard* |
| 77 |
|
| 78 |
touch install-stamp |
| 79 |
|
| 80 |
# Build architecture-independent files here. |
| 81 |
binary-indep: build install |
| 82 |
# No binary-indep target. |
| 83 |
|
| 84 |
# Build architecture-dependent files here. |
| 85 |
binary-arch: build install |
| 86 |
dh_testdir |
| 87 |
dh_testroot |
| 88 |
dh_installdocs |
| 89 |
dh_installchangelogs ChangeLog |
| 90 |
dh_strip |
| 91 |
dh_compress |
| 92 |
dh_fixperms |
| 93 |
dh_installdeb |
| 94 |
dh_shlibdeps |
| 95 |
dh_gencontrol |
| 96 |
dh_md5sums |
| 97 |
dh_builddeb |
| 98 |
|
| 99 |
binary: binary-indep binary-arch |
| 100 |
.PHONY: build clean binary-indep binary-arch binary install install-stamp |