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
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for libcdk
export DH_COMPAT=3
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
package := $(firstword $(shell dh_listpackages))
prefix := $(PWD)/debian/$(package)/usr
share := $(prefix)/share
get_misc_file = test -f /usr/share/misc/$(1) && cp /usr/share/misc/$(1) $(1)
update_config_sub := $(call get_misc_file,config.sub)
update_config_guess := $(call get_misc_file,config.guess)
config: config-stamp
config-stamp:
dh_testdir
./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
--prefix=/usr
# Patch the generated libtool to avoid passing -rpath when linking,
# and to explicitly link libraries against the libraries they depend
# on. (thanks Richard Braakman <dark@xs4all.nl>)
sed < libtool > libtool-2 \
-e 's/^\(hardcode_libdir_flag_spec\).*$$/\1=" -D__LIBTOOL_IS_A_FOOL__ "/' \
-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
mv libtool-2 libtool
chmod 755 libtool
touch $@
build: config build-stamp
build-stamp:
$(MAKE)
touch $@
clean: checkroot
rm -f *-stamp
-$(MAKE) distclean
-$(update_config_sub)
-$(update_config_guess)
dh_clean
binary-indep: checkroot build
binary-arch: checkroot build
dh_clean
dh_installdirs
$(MAKE) install \
prefix=$(prefix) \
mandir=$(share)/man \
infodir=$(share)/info \
includedir=$(prefix)/include/cdk
dh_movefiles --sourcedir=debian/$(package) -plibcdk-dev
dh_installexamples -plibcdk-dev examples/. demos
find debian/libcdk-dev -name Makefile.in -print0|xargs -0r rm -f
dh_installman -plibcdk-dev debian/man/*
dh_installchangelogs CHANGES
dh_installdocs -A README TODO NOTES
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
checkroot:
dh_testdir
dh_testroot
.PHONY: binary binary-indep binary-arch clean checkroot build config
|