3 # Script for building Zebra from source to .deb-packages.
5 # Created by Adam Dickmeiss, based on script by
6 # Morten Hendriksen <mgh@dbc.dk> and from Joey Hess.
8 # Uncomment this to turn on verbose mode.
11 # This is the debhelper compatability version to use.
14 CONFIG_FLAGS=--with-tclconfig=/usr/lib/tcl8.3 --with-yazconfig=/usr/bin --prefix=/usr
16 # Enable parallel builds if CONCURRENCY_LEVEL is set
17 ifdef CONCURRENCY_LEVEL
18 MCFLAGS=-j$(CONCURRENCY_LEVEL)
24 IRTCLDIR?=$(shell pwd)
25 # If this is not IndexData's release, then it is a cvs-checkout. Go cheat!
26 # YAZ_VERSION:=$(YAZ_VERSION)-$(shell date -r$(YAZSRCDIR)/CVS +"CVS%Y%m%d")
29 # Local library path for linking with right dependencies
30 LOCAL_LINK=-ldebian/ir-tcl/usr/lib
32 configure: configure.in
35 stamp-configure: configure
38 ./configure $(CONFIG_FLAGS) --with-build-root=$(IRTCLDIR)/debian/tmp
42 stamp-build: stamp-configure
45 # Add here commands to compile the package.
47 cd doc; $(MAKE) $(MCFLAGS)
55 rm -f *.o *.so *.a config.* irclient
58 -rm -rf debian/ir-tcl debian/*.debhelper debian/substvars
60 install: stamp-install
61 stamp-install: stamp-build
67 # Add here commands to install the package into debian/tmp.
68 -mkdirhier debian/tmp/usr
70 # $(MAKE) install prefix=`pwd`/debian/tmp/usr
74 # Build architecture-independent files here.
75 binary-indep: build install
78 dh_installdocs -p ir-tcl-doc doc/*.html doc/*.txt doc/*.ps
79 dh_installchangelogs -p ir-tcl-doc
81 dh_strip -p ir-tcl-doc
82 dh_compress -p ir-tcl-doc
83 dh_fixperms -p ir-tcl-doc
84 dh_gencontrol -p ir-tcl-doc
85 dh_md5sums -p ir-tcl-doc
87 dh_builddeb -p ir-tcl-doc
89 # Build architecture-dependent files here.
90 binary-arch: build install
93 dh_movefiles -p ir-tcl usr/lib/ir-tcl usr/bin
95 cp CHANGELOG changelog
96 cp LICENSE debian/copyright
97 dh_installdocs --all README changelog debian/copyright
105 dh_installdeb -p ir-tcl
106 for i in doc/*.n; do \
107 m=`echo $$i|sed 's/\.n/.3tcl/g'`; \
110 dh_installman -p ir-tcl doc/*.3tcl
111 dh_shlibdeps -p ir-tcl
113 dh_gencontrol -p ir-tcl
116 # Go kill those CVS-dirs before build
117 -find debian/tmp -type d -name CVS | xargs rm -rf
118 # For some reason it is necessary to remove empty-dirs in doc
119 -rm -rf debian/tmp/usr/include debian/tmp/usr/lib debian/tmp/usr/bin \
120 debian/tmp/usr/lib/ir-tcl
122 dh_builddeb -p ir-tcl
124 binary: binary-indep binary-arch
125 .PHONY: build clean binary-indep binary-arch binary install install-stamp configure