3 # Made with the aid of dh_make, by Craig Small
4 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
5 # This version is for a hypothetical package that builds an
6 # architecture-dependant package, as well as an architecture-independant
11 top_srcdir:=$(shell pwd)
12 tmp:=$(top_srcdir)/debian/tmp
14 # TCL installation stuff (must match tcl/Makefile.am)
15 tclconfigdir = /usr/lib/tcl8.4
17 # Uncomment this to turn on verbose mode.
20 # This is the debhelper compatability version to use.
26 # Handle DEB_BUILD_OPTIONS
27 ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
31 # Whack the flags to compile additional dependent pieces
32 CFLAGS += -I/usr/include/libart-2.0 -I/usr/include/freetype2
34 ##NO_TCL CFLAGS += -I/usr/include/tcl8.4
36 configure: configure-stamp
39 # Make sure we can find tcl stuff (configure won't fail)
40 test -f $(tclconfigdir)/tclConfig.sh
42 # match the configure script to the build environment, as needed
47 # Configure C and Tcl stuff
48 ##NO_TCL CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --enable-shared=yes --enable-static=yes --with-tcllib=$(tclconfigdir) --enable-local-libpng=yes --enable-local-zlib=yes
49 CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --enable-shared=yes --enable-static=yes --enable-local-libpng=yes --enable-local-zlib=yes
51 # Configure Perl stuff
52 cd bindings/perl-piped && \
54 perl Makefile.PL INSTALLDIRS=vendor
56 cd bindings/perl-shared && \
58 perl Makefile.PL INSTALLDIRS=vendor
63 build-stamp: configure-stamp
69 # We now build perl-piped and perl-shared separately
70 cd bindings/perl-piped && make OPTIMIZE="$(CFLAGS)"
71 cd bindings/perl-shared && make OPTIMIZE="$(CFLAGS)"
78 rm -f build-stamp configure-stamp
80 # Add here commands to clean up after the build process.
83 -rm bindings/perl*/Makefile.old bindings/perl*/Makefile
93 # Add here commands to install the package into debian/tmp.
94 ##NO_TCL $(MAKE) install site-tcl-install DESTDIR=$(tmp)
95 $(MAKE) install DESTDIR=$(tmp)
97 mkdir -p $(tmp)/usr/share/doc
98 mv $(tmp)/usr/doc $(tmp)/usr/share/doc/rrdtool
99 mkdir -p $(tmp)/usr/share/rrdtool
100 mv $(tmp)/usr/examples $(tmp)/usr/share/rrdtool
101 mv $(tmp)/usr/html $(tmp)/usr/share/rrdtool
103 ## touch-up perl docs
104 mv $(tmp)/usr/man $(tmp)/usr/share
105 mkdir -p $(tmp)/usr/share/man/man3
106 mv $(tmp)/usr/share/man/man1/RRDs.1 $(tmp)/usr/share/man/man3/RRDs.3pm
107 mv $(tmp)/usr/share/man/man1/RRDp.1 $(tmp)/usr/share/man/man3/RRDp.3pm
108 mv $(tmp)/usr/lib/perl $(tmp)/usr/lib/perl5
110 ## trim off the doc sources
111 find $(tmp) -name "*.pod" | xargs rm -f
115 # Build architecture-independent files here.
116 binary-indep: build install
121 # dh_installexamples -i
123 # dh_installemacsen -i
127 # dh_installmanpages -i
130 #LATER dh_installchangelogs -i ChangeLog
134 # You may want to make some executables suid here.
142 # Build architecture-dependent files here.
143 binary-arch: build install
148 # dh_installexamples -a
150 # dh_installemacsen -a
154 # dh_installmanpages -a
157 #LATER dh_installchangelogs -a ChangeLog
158 ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
162 dh_compress -a -Xexamples/
164 # You may want to make some executables suid here.
169 dh_shlibdeps -a -ldebian/librrd0/usr/lib
175 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
177 binary: binary-indep binary-arch
178 .PHONY: build clean binary-indep binary-arch binary install