summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules35
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6b9f82f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+export VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w))
+
+CHDATE:=$(shell dpkg-parsechangelog --show-field=Date)
+B_DATE:=$(shell date -d "$(CHDATE)")
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ ./configure --prefix=/usr --libexec=/usr/lib --disable-schemas-compile
+
+override_dh_install:
+ dh_install
+ # touch temporary c files with date of d/changelog
+ # find -type f -name '*.c' -exec touch -r $(CURDIR)/debian/changelog {} \;
+ # install temporary c files for debuging
+ mkdir -p debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source
+ find -type f -name '*.c' -exec cp --parent '{}' debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source/ ';'
+ cd debian/shotwell-dbg/usr/share/doc/shotwell-dbg && \
+ find . -newermt '$(B_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(B_DATE)' && \
+ tar --mtime="$(B_DATE)" -cJf temp-source.tar.xz temp-source
+ rm -fr debian/shotwell-dbg/usr/share/doc/shotwell-dbg/temp-source
+
+override_dh_installchangelogs:
+ dh_installchangelogs NEWS
+
+override_dh_strip:
+ dh_strip --dbg-package=shotwell-dbg
+
+override_dh_compress:
+ dh_compress -X.tar.xz