summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules52
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..f1fe1f8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+export DH_OPTIONS
+
+#
+# Hardening
+#
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+#
+# Get the number of cpus
+#
+NO_CPUS=$(shell nproc)
+ifeq ($(NO_CPUS),0)
+NO_CPUS=1
+endif
+
+export verbose=1
+
+%:
+ dh $@ --with autotools-dev --parallel
+
+override_dh_auto_build:
+ make -j$(NO_CPUS)
+
+override_dh_auto_test:
+ make -j$(NO_CPUS) test
+
+override_dh_clean:
+ rm -f $(CURDIR)/libcult/build/system/configuration-dynamic.make
+ make xsd_clean_gen=n clean
+ dh_clean
+
+override_dh_auto_install:
+ MAKEFLAGS="$$MAKEFLAGS install_prefix=$(CURDIR)/debian/xsdcxx/usr" $(MAKE) -C $(CURDIR)/ -f makefile install
+ mv $(CURDIR)/debian/xsdcxx/usr/share/doc/xsd $(CURDIR)/debian/xsdcxx/usr/share/doc/xsdcxx
+ mv $(CURDIR)/debian/xsdcxx/usr/bin/xsd $(CURDIR)/debian/xsdcxx/usr/bin/xsdcxx
+ mv $(CURDIR)/debian/xsdcxx/usr/share/man/man1/xsd.1 $(CURDIR)/debian/xsdcxx/usr/share/man/man1/xsdcxx.1
+ rm -rf $(CURDIR)/debian/xsdcxx/usr/share/doc/libxsd
+ find $(CURDIR)/debian/xsdcxx \( -name "COPYRIGHT*" -o -name "FLOSSE*" -o -name "LICENSE*" -o -name "GPL*" \) -exec rm -v {} \;
+
+override_dh_install:
+ dh_install
+ install -D -m 644 debian/ubuntu/apport-hook.py $(CURDIR)/debian/xsdcxx/usr/share/apport/package-hooks/source_xsdcxx.py