File: rules

package info (click to toggle)
mmass 5.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,396 kB
  • sloc: python: 33,183; xml: 7,925; ansic: 1,722; makefile: 83; sh: 2
file content (121 lines) | stat: -rwxr-xr-x 3,020 bytes parent folder | download | duplicates (2)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/make -f
# Based on the initial work of Joey Hess and Craig Small.


# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

PACKAGE=mmass
VERSION="4.0.0"
PYVERS=$(shell pyversions -r)
INSTALLDIR=$(CURDIR)/debian/$(PACKAGE)

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Using the flag below confirms the protection works fine.
# But we need not use it. Cf Debian wiki. 
# Thus setting a lintian override.
# CFLAGS += -fstack-protector-all

######################### clean #########################
.PHONY: clean
clean: 
	dh_testdir
	dh_testroot

	rm -f debian/mmass.xpm

	rm -rf $(INSTALLDIR)
	rm -rf mspy/plot/build	

	dh_clean 


######################### build #########################
build-arch-stamp: 
	dh_testdir
	dh_prep -a

	convert gui/images/gtk/icon_32.png debian/mmass.xpm

	# This will create the "calculations.so" shared object in
	# mspy/plot/build/lib.linux-i686-2.6. This shared object will
	# have to be installed as
	# /usr/lib/mmass/mspy/plot/calculations.so. Note that because
	# the build path changes according to the platform, the
	# mmass.install file has a '*' wildcard in the directory name.
	cd mspy && python setup.py build

	touch build-arch-stamp

.PHONY: build-indep
build-indep: 

.PHONY: build-arch
build-arch: build-arch-stamp

.PHONY: build
build: build-indep build-arch


######################### binary #########################
.PHONY: binary-arch
binary-arch: build-arch
	dh_testdir -a
	dh_testroot -a
	dh_installdirs -a
	dh_lintian -a
	dh_installchangelogs -a
	dh_installdocs -a
	dh_install -a
	dh_installmenu -a
	dh_python2 -a
	dh_installman -a
	dh_compress  -a
	dh_shlibdeps -a
	dh_fixperms -a
	dh_strip -a
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

.PHONY: binary-indep
binary-indep: 
	dh_testdir -i
	dh_testroot -i
	dh_prep  -i
	dh_installdirs -i
	dh_lintian -i
	cp debian/start-script $(INSTALLDIR)/usr/bin/mmass -i
	dh_installchangelogs  -i
	dh_installdocs -i
	dh_install -i
	dh_installman -i
	dh_compress  -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

.PHONY: binary
binary: binary-indep binary-arch

get-orig-source:
	wget http://mmass.org/download/files/mmass_v$(VERSION)_source.zip
	unzip mmass_v$(VERSION)_source.zip
	rm -r mmass_v$(VERSION)_source.zip
	mv mMass mmass-upstream-$(VERSION).orig
	find mmass-upstream-$(VERSION).orig -name "mmass.tmproj" -delete
	find mmass-upstream-$(VERSION).orig -name "*.pyc" -delete
	find mmass-upstream-$(VERSION).orig -name "*.pyd" -delete
	find mmass-upstream-$(VERSION).orig -name "*.so" -delete
	rm "mmass-upstream-$(VERSION).orig/User Guide.pdf"
	rm -rf mmass-upstream-$(VERSION).orig/mspy/plot/build
	find mmass-upstream-$(VERSION).orig -type f -executable -exec chmod a-x '{}' \;
	rm -rf mmass-upstream-$(VERSION).orig/gui/images/mac/
	rm -rf mmass-upstream-$(VERSION).orig/gui/images/msw/
	tar cf - mmass-upstream-$(VERSION).orig | gzip --best > mmass_$(VERSION).orig.tar.gz
	rm -rf mmass-upstream-$(VERSION).orig