File: rules

package info (click to toggle)
libchado-perl 1.31-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 44,716 kB
  • sloc: sql: 282,721; xml: 192,553; perl: 25,524; sh: 101; python: 73; makefile: 56
file content (72 lines) | stat: -rwxr-xr-x 3,507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

#export GMOD_ROOT=/usr/share/gmod/chado
export GMOD_ROOT=$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/gmod/chado
export CHAOS_HOME=$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/gmod/chaos
export CHADO_DB_NAME=gmod-chado
export PREFIX=/usr

%:
	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/$(DEB_SOURCE)/tmp

override_dh_install:
	dh_install -O--buildsystem=perl_makemaker
	rm -f debian/$(DEB_SOURCE)/usr/share/gmod/chado/load/etc/load.conf
	sed -i 's/SQLFILE=\/.*\/$(DEB_SOURCE)/SQLFILE=/' debian/$(DEB_SOURCE)/usr/share/gmod/chado/conf/gmod-chado.conf
	sed -i 's/TMP=\/.*\/tmp/CONF=\/tmp/' debian/$(DEB_SOURCE)/usr/share/gmod/chado/conf/gmod.conf
	sed -i 's/CONF=.*\/conf/CONF=\/etc\/gmod/' debian/$(DEB_SOURCE)/usr/share/gmod/chado/conf/gmod.conf
	mv $(GMOD_ROOT)/conf/* debian/$(DEB_SOURCE)/etc/gmod/
	# Give exexution rights to perl scripts
	find debian/$(DEB_SOURCE)/ -name *.pl		| xargs chmod 755
	find debian/$(DEB_SOURCE)/ -name *.tmpl	| xargs chmod 644 
	find debian/$(DEB_SOURCE)/ -name *.pm		| xargs chmod 644
	find debian/$(DEB_SOURCE)/ -name *.pod		| xargs rm -f
	find debian/$(DEB_SOURCE)/ -name .packlist 	| xargs rm -f
	find debian/$(DEB_SOURCE)/ -name "*.sql"	| xargs chmod a-x
	chmod 755 debian/$(DEB_SOURCE)/usr/share/gmod/chado/soi/t/t_soi_parse_intersect
	chmod 755 debian/$(DEB_SOURCE)/usr/share/gmod/chado/src/chado/modules/audit/make_audit_ddl
	mv debian/tmp/usr/bin/test* debian/$(DEB_SOURCE)/usr/share/gmod/chado/bin/
	mv debian/tmp/usr/bin/gmod_chado* debian/$(DEB_SOURCE)/usr/share/gmod/chado/bin/
	mv debian/tmp/usr/bin/config* debian/$(DEB_SOURCE)/usr/share/gmod/chado/bin/
	mv debian/tmp/usr/bin/Auto* debian/$(DEB_SOURCE)/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/$(DEB_SOURCE)/usr/share/perl5/
	rm -rf debian/$(DEB_SOURCE)/usr/lib/perl5
	mv debian/tmp/usr/man/man3 debian/$(DEB_SOURCE)/usr/share/man
	mv debian/tmp/usr/man/man1 debian/chado-utils/usr/share/man
	cp debian/testdb.pl debian/$(DEB_SOURCE)/usr/share/gmod/chado/bin/
	rm -rf debian/$(DEB_SOURCE)/usr/share/perl5/x86_64-linux-gnu-thread-multi
	# Needed for runtime configure
	rm -rf debian/$(DEB_SOURCE)/usr/share/gmod/chado/lib
	rm -rf debian/$(DEB_SOURCE)/usr/bin
	rm -rf debian/$(DEB_SOURCE)/usr/lib
	rm -rf debian/$(DEB_SOURCE)/usr/share/gmod/chado/load/logs
	rm -rf debian/$(DEB_SOURCE)/usr/share/gmod/chado/tmp
	# Remove not required man pages for user (also contains pod2man errors and missing what-is)
	rm -rf debian/$(DEB_SOURCE)/usr/share/man
	# Fix perl interpreter path
	for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done

override_dh_installdocs:
	dh_installdocs
	# remove installation doc
	find debian -name "INSTALL.Chado*" -delete

override_dh_auto_test:
	echo "Skipping tests to avoid db access"

override_dh_fixperms:
	dh_fixperms
	chmod 644 debian/$(DEB_SOURCE)/etc/gmod/gmod-chado.conf
	find debian -name create_so_bridge_command -exec chmod 644 \{\} \;
	find debian -name Skip_tables.pm -exec chmod 644 \{\} \;
	find debian -name "*.tt2" -exec chmod 644 \{\} \;
	find debian -name "*.tmpl" -exec chmod 644 \{\} \;