[med-svn] r9487 - trunk/packages/gmod/chado/trunk/debian

Andreas Tille tille at alioth.debian.org
Sat Jan 28 19:01:46 UTC 2012


Author: tille
Date: 2012-01-28 19:01:46 +0000 (Sat, 28 Jan 2012)
New Revision: 9487

Modified:
   trunk/packages/gmod/chado/trunk/debian/rules
Log:
SOlve one remaining lintian issue about executable *.sql file; replace fixed name of package by calculated name from changelog which sounds more flexible


Modified: trunk/packages/gmod/chado/trunk/debian/rules
===================================================================
--- trunk/packages/gmod/chado/trunk/debian/rules	2012-01-28 18:59:38 UTC (rev 9486)
+++ trunk/packages/gmod/chado/trunk/debian/rules	2012-01-28 19:01:46 UTC (rev 9487)
@@ -1,8 +1,10 @@
 #!/usr/bin/make -f
 
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+
 #export GMOD_ROOT=/usr/share/gmod/chado
-export GMOD_ROOT=$(CURDIR)/debian/libchado-perl/usr/share/gmod/chado
-export CHAOS_HOME=$(CURDIR)/debian/libchado-perl/usr/share/gmod/chaos
+export GMOD_ROOT=$(CURDIR)/debian/$(pkg)/usr/share/gmod/chado
+export CHAOS_HOME=$(CURDIR)/debian/$(pkg)/usr/share/gmod/chaos
 export CHADO_DB_NAME=gmod-chado
 export PREFIX=/usr
 
@@ -10,41 +12,42 @@
 	dh $@ --buildsystem=perl_makemaker
 
 override_dh_auto_configure:
-	perl Makefile.PL INSTALL_BASE=/usr  DBNAME=$(CHADO_DB_NAME) DBUSER=chado DBPASS=chado DBHOST=localhost DBPORT=5432 GMOD_ROOT=$(GMOD_ROOT) DBDRIVER=PostgreSQL RECONFIGURE=1 SIMPLE=Y LOCAL_TMP=$(CURDIR)/debian/libchado-perl/tmp
+	perl Makefile.PL INSTALL_BASE=/usr  DBNAME=$(CHADO_DB_NAME) DBUSER=chado DBPASS=chado DBHOST=localhost DBPORT=5432 GMOD_ROOT=$(GMOD_ROOT) DBDRIVER=PostgreSQL RECONFIGURE=1 SIMPLE=Y LOCAL_TMP=$(CURDIR)/debian/$(pkg)/tmp
 
 override_dh_install:
 	dh_install -O--buildsystem=perl_makemaker
-	sed -i 's/SQLFILE=\/.*\/libchado-perl/SQLFILE=/' debian/libchado-perl/usr/share/gmod/chado/conf/gmod-chado.conf
-	sed -i 's/TMP=\/.*\/tmp/CONF=\/tmp/' debian/libchado-perl/usr/share/gmod/chado/conf/gmod.conf
-	sed -i 's/CONF=.*\/conf/CONF=\/etc\/gmod/' debian/libchado-perl/usr/share/gmod/chado/conf/gmod.conf
-	mv $(GMOD_ROOT)/conf/* debian/libchado-perl/etc/gmod/
+	sed -i 's/SQLFILE=\/.*\/$(pkg)/SQLFILE=/' debian/$(pkg)/usr/share/gmod/chado/conf/gmod-chado.conf
+	sed -i 's/TMP=\/.*\/tmp/CONF=\/tmp/' debian/$(pkg)/usr/share/gmod/chado/conf/gmod.conf
+	sed -i 's/CONF=.*\/conf/CONF=\/etc\/gmod/' debian/$(pkg)/usr/share/gmod/chado/conf/gmod.conf
+	mv $(GMOD_ROOT)/conf/* debian/$(pkg)/etc/gmod/
 	# Give exexution rights to perl scripts
-	find debian/libchado-perl/ -name *.pl | xargs chmod 755
-	find debian/libchado-perl/ -name *.tmpl | xargs chmod 644 
-	find debian/libchado-perl/ -name *.pm | xargs chmod 644
-	find debian/libchado-perl/ -name *.pod | xargs rm -f
-	find debian/libchado-perl/ -name .packlist | xargs rm -f
-	chmod 755 debian/libchado-perl/usr/share/gmod/chado/soi/t/t_soi_parse_intersect
-	chmod 755 debian/libchado-perl/usr/share/gmod/chado/src/chado/modules/audit/make_audit_ddl
-	mv debian/tmp/usr/bin/test* debian/libchado-perl/usr/share/gmod/chado/bin/
-	mv debian/tmp/usr/bin/gmod_chado* debian/libchado-perl/usr/share/gmod/chado/bin/
-	mv debian/tmp/usr/bin/config* debian/libchado-perl/usr/share/gmod/chado/bin/
-	mv debian/tmp/usr/bin/Auto* debian/libchado-perl/usr/share/gmod/chado/bin/
+	find debian/$(pkg)/ -name *.pl		| xargs chmod 755
+	find debian/$(pkg)/ -name *.tmpl	| xargs chmod 644 
+	find debian/$(pkg)/ -name *.pm		| xargs chmod 644
+	find debian/$(pkg)/ -name *.pod		| xargs rm -f
+	find debian/$(pkg)/ -name .packlist 	| xargs rm -f
+	find debian/$(pkg)/ -name "*.sql"	| xargs chmod a-x
+	chmod 755 debian/$(pkg)/usr/share/gmod/chado/soi/t/t_soi_parse_intersect
+	chmod 755 debian/$(pkg)/usr/share/gmod/chado/src/chado/modules/audit/make_audit_ddl
+	mv debian/tmp/usr/bin/test* debian/$(pkg)/usr/share/gmod/chado/bin/
+	mv debian/tmp/usr/bin/gmod_chado* debian/$(pkg)/usr/share/gmod/chado/bin/
+	mv debian/tmp/usr/bin/config* debian/$(pkg)/usr/share/gmod/chado/bin/
+	mv debian/tmp/usr/bin/Auto* debian/$(pkg)/usr/share/gmod/chado/bin/
 	mv debian/tmp/usr/bin/* debian/chado-utils/usr/share/gmod/chado/bin/
-	mv debian/tmp/usr/lib/perl5/* debian/libchado-perl/usr/share/perl5/
-	rm -rf debian/libchado-perl/usr/lib/perl5
-	mv debian/tmp/usr/man/man3 debian/libchado-perl/usr/share/man/man3
+	mv debian/tmp/usr/lib/perl5/* debian/$(pkg)/usr/share/perl5/
+	rm -rf debian/$(pkg)/usr/lib/perl5
+	mv debian/tmp/usr/man/man3 debian/$(pkg)/usr/share/man/man3
 	mv debian/tmp/usr/man/man1 debian/chado-utils/usr/share/man/man1
-	cp debian/testdb.pl debian/libchado-perl/usr/share/gmod/chado/bin/
-	rm -rf debian/libchado-perl/usr/share/perl5/x86_64-linux-gnu-thread-multi
+	cp debian/testdb.pl debian/$(pkg)/usr/share/gmod/chado/bin/
+	rm -rf debian/$(pkg)/usr/share/perl5/x86_64-linux-gnu-thread-multi
 	# Needed for runtime configure
-	#rm -rf debian/libchado-perl/usr/share/gmod/chado/lib
-	rm -rf debian/libchado-perl/usr/bin
-	rm -rf debian/libchado-perl/usr/lib
-	rm -rf debian/libchado-perl/usr/share/gmod/chado/load/logs
-	rm -rf debian/libchado-perl/usr/share/gmod/chado/tmp
+	#rm -rf debian/$(pkg)/usr/share/gmod/chado/lib
+	rm -rf debian/$(pkg)/usr/bin
+	rm -rf debian/$(pkg)/usr/lib
+	rm -rf debian/$(pkg)/usr/share/gmod/chado/load/logs
+	rm -rf debian/$(pkg)/usr/share/gmod/chado/tmp
 	# Remove not required man pages for user (also contains pod2man errors and missing what-is)
-	rm -rf debian/libchado-perl/usr/share/man
+	rm -rf debian/$(pkg)/usr/share/man
 
 override_dh_auto_test:
 	echo "Skipping tests to avoid db access"




More information about the debian-med-commit mailing list