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 94 95 96 97 98
|
#!/usr/bin/make -f
# ekg package rules file
# Copyright 2002-2011 Marcin Owsiany <porridge@debian.org>
# Remember to update README.Debian as well...
confflags = \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--libexecdir=\$${prefix}/lib/ekg \
--with-pthread \
--enable-ioctld \
--disable-ui-readline \
--enable-ui-ncurses \
--enable-force-ncurses \
--without-termcap \
--without-bind \
--enable-aspell \
--with-libgsm \
--with-python \
--with-zlib \
--without-libjpeg \
--without-libungif \
--with-openssl
# Reasons for disabling some features are in README.Debian
# Remember to update README.Debian as well...
# As recommended by "current Debian best practice" prescribed by autotools-dev,
# we set configure flags appropriately to help cross-compiling:
# These are set automatically by dpkg-buildpackage, but we cannot depend on
# them being available, because caller might not be using dpkg-buildpackage
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
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with autoreconf --no-parallel
override_dh_autoreconf:
dh_autoreconf autoreconf -- -f -i -I m4
override_dh_auto_configure:
dh_auto_configure -- $(confflags) --disable-ui-gtk
mkdir build-gtk && cd build-gtk && ../configure $(confflags) --enable-ui-gtk
# Reasons for disabling some features are in README.Debian
# Remember to update README.Debian as well...
override_dh_auto_build:
dh_auto_build -- compat ekg
cd build-gtk && $(MAKE) compat ekg
$(MAKE) -C contrib/ekg_logs
override_dh_auto_clean:
dh_auto_clean
rm -rf build-gtk
if [ -e contrib/ekg_logs/Makefile ] ; then $(MAKE) -C contrib/ekg_logs clean ; fi
override_dh_auto_install:
# ncurses ekg
dh_auto_install --destdir=$(CURDIR)/debian/ekg -- install-ekg
mv debian/ekg/usr/bin/ekg debian/ekg/usr/bin/ekg-ncurses
# gtk ekg
install -d -m 0755 -o root -g root debian/ekg-gtk/usr/bin
install -m 0755 -o root -g root build-gtk/src/ekg debian/ekg-gtk/usr/bin/ekg-gtk
# programs which are not installed by default by upstream
install -m 0755 -o root -g root contrib/ekl2.sh debian/ekg/usr/bin/ekl2
install -m 0755 -o root -g root contrib/ekg_logs/parse debian/ekg/usr/bin/ekglogs
# ioctld is not supported at least on hurd-i386
case $(DEB_BUILD_GNU_TYPE) in i[3456]86-gnu) rm -f debian/ekg/usr/lib/ekg/ioctld ;; *) ;; esac
override_dh_installman:
dh_installman
install -p -m644 docs/ekl2.man.en debian/ekg/usr/share/man/man1/ekl2.1
install -p -m644 docs/ekl2.man.pl debian/ekg/usr/share/man/pl/man1/ekl2.1
install -p -m644 docs/ekglogs.man.en debian/ekg/usr/share/man/man1/ekglogs.1
install -p -m644 docs/ekglogs.man.pl debian/ekg/usr/share/man/pl/man1/ekglogs.1
override_dh_link:
rm -r debian/ekg-gtk/usr/share/doc/ekg-gtk
dh_link
# A hack to downgrade ekglogs dependencies to recommedations, for ekg.
# ekg-gtk already transitively depends on GLib, so no need to tweak that one.
override_dh_shlibdeps:
dh_shlibdeps -pekg -X debian/ekg/usr/bin/ekglogs
dh_shlibdeps --remaining-packages
dpkg-shlibdeps -Tdebian/ekg.substvars.tmp -dRecommends debian/ekg/usr/bin/ekglogs
cat debian/ekg.substvars.tmp >> debian/ekg.substvars
rm -f debian/ekg.substvars.tmp
|