#!/usr/bin/make -f
#export DH_VERBOSE=1
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
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: config.status
config.status: patch-stamp
dh_testdir
./autogen.sh
./configure $(CONFFLAGS) \
--prefix=/usr \
--sysconfdir=/etc \
--enable-ipv6 \
--enable-ssl \
--enable-meta-refresh \
--disable-dlgui \
CFLAGS="$(CFLAGS)" \
build: build-stamp
build-stamp: config.status patch-stamp
dh_testdir
$(MAKE)
touch build-stamp
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) distclean
-rm -f `find . -name "*~"`
-rm -rf debian/dillo debian/files* core debian/substvars debian/prerm.debhelper debian/*postinst.debhelper debian/*postrm.debhelper
-rm -f `find . -name "*.o"` `find . -name "*.dpi"` `find . -name "*.a"`
-rm -f `find . -name "*.gmo"` src/dillo dpid/dpid config/dillocfg
[ ! -f Makefile ] || $(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(CURDIR)/debian/dillo
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
mkdir -p debian/dillo/etc
$(MAKE) DESTDIR=`pwd`/debian/dillo install
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_installmenu
dh_installman debian/dillo.1 debian/bm-update.1 debian/dillocfg.1
install -m644 -D debian/dillo.desktop debian/dillo/usr/share/applications/dillo.desktop
# Decode png icon
uudecode debian/dillo.uuencode -o debian/dillo.png
# Install icons
install -m644 -D debian/dillo.xpm debian/dillo/usr/share/pixmaps/dillo.xpm
install -m644 -D debian/dillo.png debian/dillo/usr/share/pixmaps/dillo.png
dh_desktop
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure