[med-svn] r11577 - trunk/packages/fis-gtm/trunk/debian

Luis Ibanez luisibanez-guest at alioth.debian.org
Fri Jul 6 00:34:56 UTC 2012


Author: luisibanez-guest
Date: 2012-07-06 00:34:56 +0000 (Fri, 06 Jul 2012)
New Revision: 11577

Modified:
   trunk/packages/fis-gtm/trunk/debian/rules
Log:
Moving chmods to dh_fixperms and introducing LOCAL_GTM_INSTALL_DIR helper variable.



Modified: trunk/packages/fis-gtm/trunk/debian/rules
===================================================================
--- trunk/packages/fis-gtm/trunk/debian/rules	2012-07-05 20:55:33 UTC (rev 11576)
+++ trunk/packages/fis-gtm/trunk/debian/rules	2012-07-06 00:34:56 UTC (rev 11577)
@@ -16,6 +16,7 @@
 SRCPKG := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
 BINPKG := $(shell awk '/Package:.*[0-9]/{print $$2;}' debian/control)
 GTM_INSTALL_DIR := lib/fis-gtm/$(UAPIDIR)
+LOCAL_GTM_INSTALL_DIR := $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)
 
 # Set up some global environment variables needed for correct locale support
 export LOCPATH=$(CURDIR)/debian/tmp/locale
@@ -31,28 +32,34 @@
 	dh_auto_configure -- -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGTM_INSTALL_DIR=$(GTM_INSTALL_DIR)
 
 override_dh_auto_install:
+	echo "umask is: "
+	umask
 	dh_auto_install --destdir=debian/$(BINPKG)-stage1 $@
 	cd debian/$(BINPKG)-stage1/usr/$(GTM_INSTALL_DIR) && \
 		gtm_destdir=$(CURDIR)/debian/$(BINPKG) \
 		./gtminstall --utf8 default --user root --group root --verbose \
 			--distrib . \
-			--installdir $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)
-	@echo "I: Fixing up permissions for removed write rights -- we aren't done yet!"
-	chmod +w -R $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)
-	@echo "I: Fixing up permissions for setuid rights -- we aren't done yet!"
+			--installdir $(LOCAL_GTM_INSTALL_DIR)
 	@echo "I: Removing redundant license file. One is already available."
-	rm    $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/COPYING
+	rm    $(LOCAL_GTM_INSTALL_DIR)/COPYING
 
 override_dh_fixperms:
+	echo "umask is: "
+	umask
 	dh_fixperms
 	echo "overriding dh_fixperms"
-	echo "Restoring setuid"
-	chmod u+s $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmsecshr
+	echo "I: Fixing up permissions for removed write rights -- we aren't done yet!"
+	chmod +w -R $(LOCAL_GTM_INSTALL_DIR)
+	chmod +w -R $(LOCAL_GTM_INSTALL_DIR)/utf8
+	echo "I: Fixing up permissions for setuid rights -- we aren't done yet!"
+	chmod u+s $(LOCAL_GTM_INSTALL_DIR)/gtmsecshr
 	echo "changing permissions to 644 for files that will be sourced"
-	chmod 0644 $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmprofile
-	chmod 0644 $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmprofile_preV54000
-	chmod 0644 $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtcm_slist
-	chmod 0644 $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmcshrc
+	chmod 0644 $(LOCAL_GTM_INSTALL_DIR)/gtmprofile
+	chmod 0644 $(LOCAL_GTM_INSTALL_DIR)/gtmprofile_preV54000
+	chmod 0644 $(LOCAL_GTM_INSTALL_DIR)/gtcm_slist
+	chmod 0644 $(LOCAL_GTM_INSTALL_DIR)/gtmcshrc
+	echo "I: Final permissions after dh_fixperms"
+	ls -l $(LOCAL_GTM_INSTALL_DIR)
 
 # yoh: although it might sound to remove write permissions for the
 # deployed materials, as far as I see it, it is useless, since the
@@ -93,7 +100,7 @@
 # FIXME: there should be some more elegant solution like this
 override_dh_strip:
 	dh_strip
-	if [ -d $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR) ] ; then \
-	    cd $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR) ; \
+	if [ -d $(LOCAL_GTM_INSTALL_DIR) ] ; then \
+	    cd $(LOCAL_GTM_INSTALL_DIR) ; \
 	    strip dse gtcm_gnp_server gtcm_play gtcm_server gtcm_shmclean lke mupip ; \
 	fi




More information about the debian-med-commit mailing list