Package list pipenightdreams / debian/0.10.0-11 debian / rules
debian/0.10.0-11

Tree @debian/0.10.0-11 (Download .tar.gz)

rules @debian/0.10.0-11raw · history · blame

#!/usr/bin/make -f

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 = $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

CFLAGS = -g

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \
		./configure $(CONFFLAGS) --prefix=/usr \
		--bindir=\$${prefix}/games --mandir=\$${prefix}/share/man
	touch configure-stamp

build: configure build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-$(MAKE) distclean
	dh_clean src/level.cc config.guess config.sub

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
	dh_install --sourcedir=debian/tmp --autodest

binary-arch: configure build install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a ChangeLog
	dh_installdocs -a
	dh_installmenu -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: configure build install
	dh_testdir -i
	dh_testroot -i
	dh_installchangelogs -i
	dh_installdocs -i
	dh_installmenu -i
	dh_link -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary: binary-indep binary-arch

.PHONY: configure build clean install binary-arch binary-indep binary