diff --git a/debian/rules b/debian/rules
index 7ccd1118e89e76aa0483bfe134f1a3435519e5b2..7561da1e2b24de274bbe0dc1ceaceff52b76635b 100755 (executable)
--- a/debian/rules
+++ b/debian/rules
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-Makefile.am:librrd_la_LDFLAGS = -version-info 2:12:0
-Makefile.am:librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info 2:11:0
-
+#we use quilt
+include /usr/share/quilt/quilt.make
#library versions
LIB_version := $(shell grep '^librrd_la_LDFLAGS' src/Makefile.am | \
- sed 's,^[^0-9]*,,g;s,:,.,g')
+ sed 's,^[^0-9]*,,g;s,\([0-9]*\):\([0-9]*\):\([0-9]*\),\1.\3.\2,g')
LIB_major := $(shell echo $(LIB_version) | sed 's,\..*,,g')
LIB_TH_version := $(shell grep '^librrd_th_la_LDFLAGS' src/Makefile.am | \
- sed 's,^[^0-9]*,,g;s,:,.,g')
-LIB_major := $(shell echo $(LIB_th_version) | sed 's,\..*,,g')
+ sed 's,^[^0-9]*,,g;s,\([0-9]*\):\([0-9]*\):\([0-9]*\),\1.\3.\2,g')
+LIB_TH_major := $(shell echo $(LIB_TH_version) | sed 's,\..*,,g')
LDFLAGS="-Wl,-z,defs"
configure: config.status
-config.status:
+config.status: $(QUILT_STAMPFN)
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
touch $@
build-python%: build-arch-stamp
- cd bindings/python && env BUILDLIBDIR=../../src/.libs LIBDIR=../../src/.libs python$* setup.py build
+ set -e ;\
+ cd bindings/python ;\
+ BUILDLIBDIR=../../src/.libs LIBDIR=../../src/.libs python$* setup.py build
touch $@
build-indep: build-indep-stamp
build-indep-stamp: config.status
-clean: $(PY_VERS:%=clean-python%)
+clean: clean-patched
+clean-patched: unpatch $(PY_VERS:%=clean-python%)
dh_testdir
dh_testroot
-
- #sanity check if debian/control lists the right package name
- grep -q '^Package: librrd$(LIB_major)' debian/control
+ #sanity check if debian/control lists the right package name
+ grep -q '^Package: librrd$(LIB_major)' debian/control
[ ! -f Makefile ] || make distclean
rm -f config.guess
endif
rm -f build-arch-stamp build-indep-stamp config.status
-
find . -name \*.pyc | xargs rm -f
+ rm -rf bindings/python/build
+
+ #clean what the Makefiles do not clean....
+ rm -rf bindings/perl-piped/blib bindings/perl-shared/blib \
+ bindings/perl-piped/Makefile.old bindings/perl-shared/Makefile.old
+ rm -f bindings/tcl/pkgIndex.tcl bindings/tcl/tclrrd*.so
+ rm -f examples/cgi-demo.cgi
dh_clean
-clean-python%:
- cd bindings/python && python$* setup.py clean
+clean-python%: unpatch
+ set -e ;\
+ cd bindings/python ;\
+ python$* setup.py clean
rm -f build-python$*
-install: install-indep install-arch
-install-indep:
- dh_testdir
- dh_testroot
- dh_clean -k -s
- dh_installdirs -s
-
-
- dh_install -s
+install: install-arch
install-arch: $(PY_VERS:%=install-python%)
dh_testdir
dh_testroot
- dh_clean -k -s
+ dh_clean -k -s -Npython-rrd
dh_installdirs -s
make install DESTDIR=$(CURDIR)/debian/tmp
make distclean ;\
done
+ dh_install -s --sourcedir=$(CURDIR)/debian/tmp
+ dh_installexamples -s
+
install-python%:
- cd bindings/python && python$* setup.py install --root=$(CURDIR)/debian/python-rrd
+ dh_testdir
+ dh_testroot
+ set -e ;\
+ cd bindings/python ;\
+ python$* setup.py install --root=$(CURDIR)/debian/python-rrd
binary-indep:
dh_testdir
dh_testroot
- echo 'rubydefault:Depends=librrd-ruby$(RUBY_DEFAULT_VERS)' >> debian/librrd-ruby.substvars
+ dh_clean -k -i
dh_link -plibrrd-ruby /usr/share/doc/librrd-ruby$(RUBY_DEFAULT_VERS) /usr/share/doc/librrd-ruby
+ dh_link -plibrrd2-dev /usr/share/doc/librrd-dev /usr/share/doc/librrd2-dev
dh_installchangelogs
- dh_installdocs -s -Nlibrrd-ruby
- dh_link -s -Nlibrrd-ruby
- dh_perl -s
- dh_compress -s
- dh_fixperms -s
- dh_installdeb -s
- dh_gencontrol -s
- dh_md5sums -s
- dh_builddeb -s
+ dh_installdocs -i -Nlibrrd-ruby -Nlibrrd2-dev
+ dh_link -i -Nlibrrd-ruby -Nlibrrd2-dev
+ dh_perl -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
binary-arch: build-arch install-arch
dh_pysupport -ppython-rrd
dh_perl -a
dh_installman -a
+ echo 'rubydefault:Depends=librrd-ruby$(RUBY_DEFAULT_VERS)' >> debian/librrd-ruby.substvars
+ dh_link -plibrrd-dev /usr/lib/librrd.so.$(LIB_version) /usr/lib/librrd.so
+ dh_link -plibrrd-dev /usr/lib/librrd_th.so.$(LIB_TH_version) /usr/lib/librrd_th.so
+ dh_link -plibrrd$(LIB_major) /usr/lib/librrd.so.$(LIB_version) /usr/lib/librrd.so.$(LIB_major)
+ dh_link -plibrrd$(LIB_major) /usr/lib/librrd_th.so.$(LIB_TH_version) /usr/lib/librrd_th.so.$(LIB_TH_major)
dh_link -a
dh_strip -a
dh_compress -a
binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-arch install-indep configure install-python% clean-python%
+.PHONY: build clean configure \
+ binary-indep binary-arch binary \
+ install install-arch \
+ install-python% clean-python% unpatch