File: rules

package info (click to toggle)
hydrogen 1.2.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,860 kB
  • sloc: xml: 75,490; cpp: 75,443; sh: 871; python: 238; ruby: 219; makefile: 158; javascript: 130; php: 90; ansic: 26
file content (107 lines) | stat: -rwxr-xr-x 2,287 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/make -f

# Debian 'rules' file for the Hydrogen Drum Machine.
#
# To make the build more verbose, uncomment the following line:
#export DH_VERBOSE=1
#
# To enable scons PARALLEL BUILDS (e.g. -j 4), run like this:
#     $ H2_PARALLEL=4 dpkg-buildpackage -rfakeroot
# ...or uncomment the following line:
H2_PARALLEL=4
# ...or invoke dpkg-buildpackage like this:
#     $ dpkg-buildpackage -j4 -rfakeroot
# However, the -j4 here will run more than gcc in parallel.

# Check for parallel builds.
# NUMJOBS script goodie courtesy of http://lists.debian.org/debian-policy/2007/08/msg00005.html

NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(subst $(,), ,$(DEB_BUILD_OPTIONS))))
ifneq ("$(H2_PARALLEL)","")
	H2_PARALLEL_BUILDS=-j $(H2_PARALLEL)
else
	ifneq ("$(NUMJOBS)","")
		H2_PARALLEL_BUILDS=-j $(NUMJOBS)
	endif
endif


configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.
	mkdir ../builddebian
	cd ../builddebian; cmake .. -DCMAKE_INSTALL_PREFIX=/usr
	
	touch configure-stamp


build: build-stamp
build-stamp: configure-stamp
	dh_testdir

        # Add here commands to compile the package.
	cd ../builddebian; $(MAKE) $(H2_PARALLEL_BUILDS)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-find . -name '*.py[co]' | xargs rm -f

	# Add here commands to clean up after the build process.
	rm -rf ../builddebian;
	dh_clean


install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	mkdir -p $(CURDIR)/debian/hydrogen/usr/bin

	cd ../builddebian; $(MAKE) install DESTDIR=../linux/debian/hydrogen
	#remove not used .git dirs 
	find $(CURDIR)/debian/hydrogen/ -name '.git' | xargs rm -rf 

docs:


docs_install:



# Build architecture-independent files here.
binary-indep: build install docs docs_install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install
	dh_installchangelogs
	dh_installdocs
	dh_installman
	dh_link
	dh_compress
	dh_compress -X.py
	dh_fixperms
	dh_strip
	#dh_python
	dh_makeshlibs
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb




binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure