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)
23 IRTCLDIR?=$(shell pwd)
25 # Local library path for linking with right dependencies
26 LOCAL_LINK=-ldebian/ir-tcl/usr/lib
28 configure: configure.in
31 stamp-configure: configure
34 ./configure $(CONFIG_FLAGS) --with-build-root=$(IRTCLDIR)/debian/tmp
38 stamp-build: stamp-configure
41 # Add here commands to compile the package.
43 cd doc; $(MAKE) $(MCFLAGS)
51 rm -f *.o *.so *.a config.* irclient
54 -rm -rf debian/ir-tcl debian/*.debhelper debian/substvars
56 install: stamp-install
57 stamp-install: stamp-build
63 # Add here commands to install the package into debian/tmp.
64 -mkdirhier debian/tmp/usr
66 # $(MAKE) install prefix=`pwd`/debian/tmp/usr
70 # Build architecture-independent files here.
71 binary-indep: build install
74 dh_installdocs -p ir-tcl-doc doc/*.html doc/*.txt doc/*.ps
75 dh_installchangelogs -p ir-tcl-doc
77 dh_strip -p ir-tcl-doc
78 dh_compress -p ir-tcl-doc
79 dh_fixperms -p ir-tcl-doc
80 dh_gencontrol -p ir-tcl-doc
81 dh_md5sums -p ir-tcl-doc
83 dh_builddeb -p ir-tcl-doc
85 # Build architecture-dependent files here.
86 binary-arch: build install
89 dh_movefiles -p ir-tcl usr/lib/irtcl usr/bin
92 cp LICENSE debian/copyright
93 dh_installdocs --all README changelog debian/copyright
101 dh_installdeb -p ir-tcl
102 for i in doc/*.n; do \
103 m=`echo $$i|sed 's/\.n/.3tcl/g'`; \
106 dh_installman -p ir-tcl doc/*.3tcl
107 dh_shlibdeps -p ir-tcl
109 dh_gencontrol -p ir-tcl
112 # Go kill those CVS-dirs before build
113 -find debian/tmp -type d -name CVS | xargs rm -rf
114 # For some reason it is necessary to remove empty-dirs in doc
115 -rm -rf debian/tmp/usr/include debian/tmp/usr/lib debian/tmp/usr/bin
117 dh_builddeb -p ir-tcl
119 binary: binary-indep binary-arch
120 .PHONY: build clean binary-indep binary-arch binary install install-stamp configure