Codebase list dillo / debian/0.8.6-3 debian / rules
debian/0.8.6-3

Tree @debian/0.8.6-3 (Download .tar.gz)

rules @debian/0.8.6-3raw · history · blame

#!/usr/bin/make -f

#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

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
	[ -f config.sub.d-r-orig ] || cp -p config.sub config.sub.d-r-orig
	[ -f config.guess.d-r-orig ] || cp -p config.guess config.guess.d-r-orig
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	./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
	[ ! -f config.sub.d-r-orig ] || mv config.sub.d-r-orig config.sub
	[ ! -f config.guess.d-r-orig ] || mv config.guess.d-r-orig config.guess
	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