1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
#!/usr/bin/make -f
SHELL+= -e
DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
CFLAGS += -fno-strict-aliasing
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
autoreconf: autoreconf-stamp
autoreconf-stamp:
dh_testdir
autoreconf --force --install --symlink
touch $@
configure: config.status
config.status: autoreconf-stamp
dh_testdir
./configure $(CONFFLAGS) \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: config.status
dh_testdir
$(MAKE)
cat debian/copyright.header COPYING > debian/copyright
touch $@
clean:
dh_testdir
[ ! -f Makefile ] || $(MAKE) distclean
rm -f debian/atm-tools.8 debian/copyright \
src/switch/cfg_?.[ch] src/qgen/ql_?.[ch] src/test/ispl_?.[ch] \
src/sigd/cfg_?.[ch] src/lane/lecs_db.c src/lane/load_lex.c \
aclocal.m4 autom4te.cache/* config.h.in config.h.in~ \
config.guess config.sub configure libtool compile \
INSTALL depcomp install-sh ltmain.sh missing ylwrap \
$$(find . -name Makefile.in)
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) DESTDIR=`pwd`/debian/tmp install
# manpages
/usr/bin/pod2man --section=8 --release="atm-tools $(PKG_VER)" --lax \
--center="Debian GNU/Linux" debian/atm-tools.pod > debian/atm-tools.8
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_install --sourcedir=debian/tmp
rm debian/atm-tools/usr/share/man/man8/br2684ctl.8
dh_installdocs --link-doc=libatm1
dh_installinit --init-script=atm
dh_installsystemd --name=atm
dh_installman
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs -- -c4
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch
.PHONY: build-arch build-indep build binary-arch binary-indep install autoreconf configure clean install
|