File: rules

package info (click to toggle)
viewmol 2.4.1-24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,720 kB
  • ctags: 2,284
  • sloc: ansic: 30,727; python: 1,849; sh: 943; awk: 433; makefile: 176
file content (57 lines) | stat: -rwxr-xr-x 2,100 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
#!/usr/bin/make -f

DESTDIR=$(CURDIR)/debian/viewmol

%:
	dh $@ --with python2

override_dh_auto_build:
	$(MAKE) -C source

override_dh_auto_clean:
	[ ! -f source/Makefile ] || $(MAKE) -C source clean
	# viewmol's make clean does not clean out the '$$(os)' directory, so do it here.
	-rm -r source/Linux source/.config.Linux

override_dh_auto_install:
	# install the package into debian/viewmol.
	cd source; ./install $(DESTDIR)/usr

	# put arch-independent files into /usr/share/viewmol (make FHS compliant)
	mv $(DESTDIR)/usr/lib/viewmol/viewmolrc  $(DESTDIR)/etc/viewmol
	cd $(DESTDIR)/usr/lib/viewmol; mv readdmol readgulp readpqs writecar \
	    writegauss.py writemol writetm readdmol.awk \
	    $(DESTDIR)/usr/share/viewmol
	cd $(DESTDIR)/usr/lib/viewmol; mv examples locale scripts tests \
	    $(DESTDIR)/usr/share/viewmol
	# viewmol has no standard English, so change en_US to en
	# or else other English locales fail
	cd $(DESTDIR)/usr/share/viewmol/locale; mv en_US en

	# localised Viewmol settings may be user-configurable 
	# (conffiles go in /etc)
	for i in $(DESTDIR)/usr/share/viewmol/locale/*; do \
	    mkdir $(DESTDIR)/etc/viewmol/locale/`basename $${i}` ; \
	    mv $${i}/Viewmol $(DESTDIR)/etc/viewmol/locale/`basename $${i}` ; \
	    ln -s /etc/viewmol/locale/`basename $${i}`/Viewmol  $${i}/Viewmol ; \
	done
	
	
	# Viewmol scripts heavily depend on VIEWMOLPATH, without
	# distinguishing between ../share and ../lib, so make a symlink.
	for i in $(DESTDIR)/usr/share/viewmol/*; do \
	    ln -s /usr/share/viewmol/`basename $${i}` $(DESTDIR)/usr/lib/viewmol/`basename $${i}` ; \
	done
	
	# install KDE (and generic Desktop) support files
	cd kde; KDEDIR=$(DESTDIR)/usr ./install
	ln -s /usr/share/icons/crystalsvg/128x128/apps/viewmol.png $(DESTDIR)/usr/share/pixmaps

override_dh_installdocs:
	dh_installdocs $(DESTDIR)/usr/lib/viewmol/doc/*
	rm -r $(DESTDIR)/usr/lib/viewmol/doc
	# don't want to compress examples, so don't use dh_installexamples
	ln -s /usr/share/viewmol/examples/ $(DESTDIR)/usr/share/doc/viewmol

override_dh_installman:
	dh_installman debian/viewmol.1