File: rules

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (69 lines) | stat: -rwxr-xr-x 1,346 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
#!/usr/bin/make -f


ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

build: build-stamp
build-stamp:
	dh_testdir
	./autogen.sh
	$(MAKE) prefix=/usr
	touch build-stamp

# this is really not part of debian package build, but just for convinience

clean: checkroot
	$(checkdir)
	make superclean
	rm -f build-stamp
	dh_clean

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

# Build architecture-dependent files here.
install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	$(MAKE) prefix="$(CURDIR)/debian/scratchbox2/usr" install
	# make lintian happy
	rm -f debian/scratchbox2/usr/share/scratchbox2/host_usr
	ln -sf ../.. debian/scratchbox2/usr/share/scratchbox2/host_usr
	mv debian/scratchbox2/usr/lib* debian/libsb2/usr/

binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a README
	dh_installchangelogs -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	# FIXME, do in postinst
	dh_installdeb -a
	dh_shlibdeps -Llibsb2 -l/usr/lib/libsb2
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-arch

.PHONY: build clean binary-indep binary-arch binary checkroot prebuild

define checkdir
	dh_testdir
endef

checkroot:
	$(checkdir)
	dh_testroot