summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules53
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..31ba897
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,53 @@
+#!/usr/bin/make -f
+#
+# Debhelper rules file for mdk-doc
+
+AUTOPOINT= intltoolize --automake --copy
+export AUTOPOINT
+
+p= mdk-doc
+d= ${CURDIR}
+t= $d/debian/$p
+doc= /usr/share/doc/mdk
+mhtml= ${doc}/mdk.html
+html= ${doc}/html
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+DEB_NODOC=0
+else
+DEB_NODOC=1
+endif
+
+override_dh_auto_configure:
+ifeq (${DEB_NODOC},0)
+ dh_auto_configure -- --docdir=${doc} --disable-gui --disable-nls \
+ --without-guile --without-readline
+endif
+
+override_dh_auto_build:
+ifeq (${DEB_NODOC},0)
+ dh_auto_build -- -C doc all html
+endif
+
+override_dh_auto_test:
+ # Nothing
+
+override_dh_auto_install:
+ifeq (${DEB_NODOC},0)
+ dh_auto_install -- -C doc install install-html
+
+ # Easier than messing with the internals of doc/Makefile.in
+ mv -v $t/${mhtml} $t/${html}
+endif
+
+ifeq (${DEB_NODOC},1)
+override_dh_install:
+ # Nothing
+endif
+
+override_dh_installchangelogs:
+ dh_installchangelogs
+ install -m 644 NEWS debian/mdk-doc/usr/share/doc/mdk-doc/
+
+%:
+ dh $@