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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
#!/usr/bin/make -f
package = libtabe
SHELL = /bin/bash
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
build: build-stamp
build-stamp: build-begin build-shared build-static build-basic
# make -f debian/rules build-begin build-shared build-static build-basic
touch build-stamp
build-begin: build-begin-stamp
build-begin-stamp:
dh_testdir
./configure --prefix=/usr --enable-shared
touch build-begin-stamp
# Build the basic programs in the directories src/{supports/bims,util,tsi-src}
build-basic: build-basic-stamp build-doc-stamp
build-basic-stamp:
$(MAKE) -C src subsys
# make -f debian/rules build-doc
touch build-basic-stamp
# Build documents
build-doc-stamp: doc/libtabe.html doc/libtabe.txt
touch build-doc-stamp
doc/libtabe.html: doc/libtabe.sgml
cd doc; bg5sgml2html libtabe.sgml
doc/libtabe.txt: doc/libtabe.sgml
cd doc; bg5sgml2txt libtabe.sgml
# Build shared library
build-shared: build-shared-stamp
build-shared-stamp:
$(MAKE) -C src shared
$(MAKE) -C src/supports/bims shared
touch build-shared-stamp
# Build static library
build-static: build-static-stamp
build-static-stamp:
$(MAKE) -C src unshared
$(MAKE) -C src/supports/bims unshared
touch build-static-stamp
clean:
dh_testdir
dh_testroot
rm -rf build-stamp build-{begin,shared,static,basic,doc}-stamp install-stamp debian/build
# Add here commands to clean up after the build process.
-$(MAKE) distclean
# clean documents in doc/
rm -f doc/libtabe.{html,txt}
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs usr/share/doc/libtabe{-db,0,0-dev}
# dh_installdirs usr/share/doc/libtabe{-db,0,0-dev} \
# usr/lib/xcin/tab/zh_TW.Big5/
$(MAKE) install prefix=`pwd`/debian/tmp/usr
# don't install symlinks as suggested by foka.
# ( cd debian/tmp/usr/lib/xcin/tab/zh_TW.Big5; \
# ln -s ../../../../share/tabe/tsiyin/tsi.db \
# ../../../../share/tabe/tsiyin/yin.db . )
# install docs and examples
cp -a doc/* src/tsi-src/README debian/tmp/usr/share/doc/libtabe-db/
cp -a src/supports/bims/{README,examples} \
debian/tmp/usr/share/doc/libtabe0-dev/
cp -a src/supports/GTKTsi src/examples/* \
debian/tmp/usr/share/doc/libtabe0-dev/examples/
# dh_movefiles
touch install-stamp
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep:
# Build architecture dependant packages using the common target.
binary-arch: binary-libtabe-db binary-libtabe0 binary-libtabe0-dev
# Any other binary targets build just one binary package at a time.
binary-%: build install
make -f debian/rules binary-common package=$* \
DH_OPTIONS="-p$* -P`pwd`/debian/build/$*"
# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-common:
# Need this version of debhelper for DH_OPTIONS to work.
dh_testversion 1.1.17
dh_testdir
dh_testroot
dh_movefiles
dh_installdocs
# dh_installexamples
# dh_installmenu
# dh_installmanpages
# if [ "$(package)" = "libtabe-db" ]; then \
# dh_undocumented tsiadd.1 tsidel.1 tsidump.1 tsiyindump.1; \
# dh_link usr/share/doc/libtabe-db/Changes \
# usr/share/doc/libtabe-db/changelog; \
# fi
dh_installchangelogs -k doc/Changes
dh_strip
dh_compress -X".c" # don't compress C programs
dh_fixperms
dh_installdeb
if [ "$(package)" = "libtabe0" ]; then \
dh_makeshlibs -m0.1 -V; \
fi
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|