Code

Build lua extension in debian/rules.
[pkg-rrdtool.git] / debian / rules
index 7cac8f60b4ade2f57fcdffd3fdb3d8908854795d..86d0382479b7b494a855b1970da2832f53152879 100755 (executable)
@@ -18,6 +18,7 @@ PY_VERS := $(shell pyversions -vr)
 TCL_VERS := $(shell dpkg -s tcl-dev | grep '^Depends' \
        | sed 's,.*\<tcl\([0-9.]*\)-dev\>.*,\1,')
 
+LUA = /usr/bin/lua5.1
 
 #let's help configure to figure out our host/build system
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -42,6 +43,9 @@ CONFFLAGS += --with-perl-options=INSTALLDIRS=vendor
 #path to tcl
 CONFFLAGS += --with-tcllib=/usr/lib/tcl$(TCL_VERS)
 
+#enable lua installation
+CONFFLAGS += --enable-lua-site-install
+
 #let's take care of optimization + debug builds
 CFLAGS += -Wall -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -69,6 +73,7 @@ endif
        LDFLAGS="$(LINKER_FLAGS)" \
        CFLAGS="$(CFLAGS)" \
        RRDDOCDIR=/usr/share/doc/rrdtool \
+       LUA=$(LUA) \
          ./configure $(CONFFLAGS)
 
 build: build-arch build-indep 
@@ -144,6 +149,10 @@ install-common-stamp: build-arch-stamp
        # we don't want .txt and .pod documentation in the package
        rm -rf debian/tmp/usr/share/doc/rrdtool/txt
        dh_install --sourcedir=$(CURDIR)/debian/tmp --fail-missing
+       # remove duplicates
+       rm debian/rrdtool/usr/bin/rrdcached
+       rm debian/rrdtool/usr/share/man/man1/rrdcached.1
+       rm debian/rrdtool/usr/share/doc/rrdtool/html/rrdcached.html
 
        touch $@
 
@@ -160,7 +169,7 @@ install-arch: install-common-stamp $(PY_VERS:%=install-python%)
        done
 
        dh_installexamples -s
-       chmod 644 debian/rrdtool/usr/share/doc/rrdtool/examples/rrdcached/RRDCached.pm
+       chmod 644 debian/rrdcached/usr/share/doc/rrdcached/examples/RRDCached.pm
 
 install-python%: install-common-stamp
        dh_testdir