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/local/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 # Configure C and Tcl stuff
43 ##NO_TCL CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --enable-shared=yes --enable-static=yes --with-tcllib=$(tclconfigdir) --enable-local-libpng=yes --enable-local-zlib=yes
44 CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --enable-shared=yes --enable-static=yes --enable-local-libpng=yes --enable-local-zlib=yes
46 # Configure Perl stuff
47 cd bindings/perl-piped && \
49 perl Makefile.PL INSTALLDIRS=vendor
51 cd bindings/perl-shared && \
53 perl Makefile.PL INSTALLDIRS=vendor
58 build-stamp: configure-stamp
64 # We now build perl-piped and perl-shared separately
65 cd bindings/perl-piped && make OPTIMIZE="$(CFLAGS)"
66 cd bindings/perl-shared && make OPTIMIZE="$(CFLAGS)"
73 rm -f build-stamp configure-stamp
75 # Add here commands to clean up after the build process.
78 -rm bindings/perl*/Makefile.old bindings/perl*/Makefile
88 # Add here commands to install the package into debian/tmp.
89 ##NO_TCL $(MAKE) install site-tcl-install DESTDIR=$(tmp)
90 $(MAKE) install DESTDIR=$(tmp)
92 mkdir -p $(tmp)/usr/share/doc
93 mv $(tmp)/usr/doc $(tmp)/usr/share/doc/rrdtool
94 mkdir -p $(tmp)/usr/share/rrdtool
95 mv $(tmp)/usr/examples $(tmp)/usr/share/rrdtool
96 mv $(tmp)/usr/html $(tmp)/usr/share/rrdtool
99 mv $(tmp)/usr/man $(tmp)/usr/share
100 mkdir -p $(tmp)/usr/share/man/man3
101 mv $(tmp)/usr/share/man/man1/RRDs.1 $(tmp)/usr/share/man/man3/RRDs.3pm
102 mv $(tmp)/usr/share/man/man1/RRDp.1 $(tmp)/usr/share/man/man3/RRDp.3pm
103 mv $(tmp)/usr/lib/perl $(tmp)/usr/lib/perl5
107 # Build architecture-independent files here.
108 binary-indep: build install
113 # dh_installexamples -i
115 # dh_installemacsen -i
119 # dh_installmanpages -i
122 #LATER dh_installchangelogs -i ChangeLog
126 # You may want to make some executables suid here.
134 # Build architecture-dependent files here.
135 binary-arch: build install
140 # dh_installexamples -a
142 # dh_installemacsen -a
146 # dh_installmanpages -a
149 #LATER dh_installchangelogs -a ChangeLog
150 ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
154 dh_compress -a -Xexamples/
156 # You may want to make some executables suid here.
161 dh_shlibdeps -a -ldebian/librrd0/usr/lib
167 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
169 binary: binary-indep binary-arch
170 .PHONY: build clean binary-indep binary-arch binary install