From 43da9ebf1e145721ef4fabb107269cb450b3063d Mon Sep 17 00:00:00 2001
From: Sojourner Truth <jon.w.wilkes@gmail.com>
Date: Sun, 19 Jun 2016 23:21:42 -0400
Subject: [PATCH] port agraef's commit from Pd-l2ork: debuild: sanitize file
 permissions. commit 22edd363ff166125578cf1465a297c417c4e3665

---
 debuild/debian/rules | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debuild/debian/rules b/debuild/debian/rules
index 5f9f94712..c00d2c2b6 100755
--- a/debuild/debian/rules
+++ b/debuild/debian/rules
@@ -27,6 +27,11 @@ override_dh_auto_install:
 	cd debian/pd-l2ork/usr && mv include/Gem include/pd-l2ork
 # Edit the Gem pkgconfig file accordingly and rename it.
 	cd debian/pd-l2ork/usr/lib/pkgconfig && sed -e 's?/include?/include/pd-l2ork?g' -e 's?/lib/pd/extra?/lib/pd-l2ork/extra?g' < Gem.pc > pd-l2ork-Gem.pc && rm -f Gem.pc
+# Sanitize permissions.
+	cd debian/pd-l2ork && chmod -R go-w * && chmod -R a+r * && chmod a-x usr/lib/pd-l2ork/default.settings
+	find debian/pd-l2ork -name '*.pd_linux' | xargs chmod a-x
+	find debian/pd-l2ork -name '*.pd' | xargs chmod a-x
+	find debian/pd-l2ork -type d | xargs chmod a+x
 
 # NOTE: Older systems use dh_pysupport instead of dh_python2. See
 # http://deb.li/dhs2p.
-- 
GitLab