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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Tell Autoconf the correct system types.
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))
SYSTEM = --build $(DEB_HOST_GNU_TYPE)
else
SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# We'd like to use --enable-version to install as tf5, but unfortunately that
# installs as things like tf50b8. Use --program-suffix instead, which
# requires some hacking on configure so that it doesn't also change the
# library path.
configure: configure-stamp
configure-stamp:
dh_testdir
autoconf
CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
--disable-version --disable-version-symlink --program-suffix=5 \
--datadir=\$${prefix}/share/tf5 --enable-mailcheck=/var/mail \
--enable-256colors --enable-ssl $(SYSTEM)
touch $@
build: build-arch build-indep
build-arch: build-stamp
build-indep:
build-stamp: configure-stamp
dh_testdir
$(MAKE) STRIP=:
touch $@
clean:
dh_testdir
dh_testroot
rm -f configure-stamp build-stamp install-stamp
make -f unix/Makefile distclean
dh_clean Makefile config.log config.status configure \
src/TF_LIBDIR.build src/tfconfig.h src/tfdefs.h tf-lib/tf-help.idx
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(CURDIR)/debian/tf5 STRIP=:
install -d $(CURDIR)/debian/tf5/usr/share/man/man1
install -m 644 src/tf.1.nroffman \
$(CURDIR)/debian/tf5/usr/share/man/man1/tf5.1
touch $@
binary: binary-arch binary-indep
binary-indep:
binary-arch: install-stamp
dh_testdir
dh_testroot
dh_installchangelogs CHANGES
dh_installdocs README
dh_installmenu
dh_link
dh_fixperms
dh_strip
dh_compress
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: build build-arch build-indep clean binary binary-arch binary-indep
.PHONY: install
|