"Fossies" - the Fresh Open Source Software archive 
Member "cdk-5.0-20120323/package/debian/rules" of archive cdk-5.0-20120323.tgz:
#!/usr/bin/make -f
# MAde with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# packages
PACKAGES.indep = libcdk5-doc
PACKAGES.arch = libcdk5-dev libcdk5
CFLAGS =
TARGET = $(CURDIR)/debian
P_NORM = $(CURDIR)/t/libcdk5
verbose = # -v
LOG = @echo "**"
configure = ../../configure \
--disable-echo \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--disable-rpath-hack
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
.PHONY: all config build install binary clean config-indep config-arch \
build-indep build-arch install-indep install-arch binary-indep \
binary-arch
all: build
config: config-indep config-arch
build: build-indep build-arch
install: install-indep install-arch
binary: binary-indep binary-arch
clean:
dh_testdir
dh_testroot
dh_clean $(verbose)
rm -rf t
config-indep: $(PACKAGES.indep:%=config-%-stamp)
config-arch: $(PACKAGES.arch:%=config-%-stamp)
build-indep: $(PACKAGES.indep:%=build-%-stamp)
build-arch: $(PACKAGES.arch:%=build-%-stamp)
install-indep: $(PACKAGES.indep:%=install-%-stamp)
install-arch: $(PACKAGES.arch:%=install-%-stamp)
binary-indep: install-indep
ifneq ($(PACKAGES.indep),)
rm -f $(PACKAGES.indep:%=install-%-stamp)
dh_testdir
dh_testroot
dh_installdocs $(verbose) $(PACKAGES.indep:%=-p%)
dh_installman $(verbose) $(PACKAGES.indep:%=-p%)
dh_installexamples $(verbose) $(PACKAGES.indep:%=-p%)
dh_installchangelogs $(verbose) $(PACKAGES.indep:%=-p%) -k CHANGES
dh_compress $(verbose) $(PACKAGES.indep:%=-p%)
dh_fixperms $(verbose) $(PACKAGES.indep:%=-p%)
dh_installdeb $(verbose) $(PACKAGES.indep:%=-p%)
dh_gencontrol $(verbose) $(PACKAGES.indep:%=-p%)
dh_md5sums $(verbose) $(PACKAGES.indep:%=-p%)
dh_builddeb $(verbose) $(PACKAGES.indep:%=-p%)
endif
binary-arch: install-arch
ifneq ($(PACKAGES.arch),)
rm -f $(PACKAGES.arch:%=install-%-stamp)
dh_testdir
dh_testroot
dh_link $(verbose) $(PACKAGES.arch:%=-p%)
dh_installdocs $(verbose) $(PACKAGES.arch:%=-p%)
dh_installmenu $(verbose) $(PACKAGES.arch:%=-p%)
dh_strip $(verbose) $(PACKAGES.arch:%=-p%)
dh_compress $(verbose) $(PACKAGES.arch:%=-p%)
dh_fixperms $(verbose) $(PACKAGES.arch:%=-p%)
dh_makeshlibs $(verbose) $(PACKAGES.arch:%=-p%)
dh_installdeb $(verbose) $(PACKAGES.arch:%=-p%)
dh_shlibdeps $(verbose) $(PACKAGES.arch:%=-p%)
dh_gencontrol $(verbose) $(PACKAGES.arch:%=-p%)
dh_md5sums $(verbose) $(PACKAGES.arch:%=-p%)
dh_builddeb $(verbose) $(PACKAGES.arch:%=-p%)
endif
#------------------------------------------------------------------------------
config-libcdk5-stamp :
$(LOG) "configuring libcdk5"
dh_testdir
rm -rf $(P_NORM)
mkdir -p $(P_NORM)
cd $(P_NORM); CFLAGS="$(CFLAGS)" \
$(configure) --with-ncursesw --with-libname=cdk
touch $@
build-libcdk5-stamp : config-libcdk5-stamp
$(LOG) "building libcdk5"
dh_testdir
$(MAKE) -C $(P_NORM) cdklib cdkshlib
touch $@
install-libcdk5-stamp : build-libcdk5-stamp
$(LOG) "installing libcdk5"
dh_testdir
dh_testroot
dh_prep $(verbose) -plibcdk5
dh_installdirs $(verbose) -plibcdk5
$(MAKE) -C $(P_NORM) DESTDIR=$(TARGET)/libcdk5 installCDKSHLibrary
touch $@
#------------------------------------------------------------------------------
config-libcdk5-dev-stamp : config-libcdk5-stamp
touch $@
build-libcdk5-dev-stamp : build-libcdk5-stamp
touch $@
install-libcdk5-dev-stamp : install-libcdk5-stamp
$(LOG) "installing libcdk5-dev"
dh_testdir
dh_testroot
dh_prep $(verbose) -plibcdk5-dev
dh_installdirs $(verbose) -plibcdk5-dev
$(MAKE) -C $(P_NORM) DESTDIR=$(TARGET)/libcdk5-dev installCDKHeaderFiles installCDKLibrary
touch $@
#------------------------------------------------------------------------------
config-libcdk5-doc-stamp : config-libcdk5-stamp
touch $@
build-libcdk5-doc-stamp : build-libcdk5-stamp
touch $@
install-libcdk5-doc-stamp : install-libcdk5-stamp
$(LOG) "installing libcdk5-doc"
dh_testdir
dh_testroot
dh_prep $(verbose) -plibcdk5-doc
dh_installdirs $(verbose) -plibcdk5-doc
$(MAKE) -C $(P_NORM) DESTDIR=$(TARGET)/libcdk5-doc installCDKManPages
dh_installexamples $(verbose) -plibcdk5-doc examples demos
touch $@