File: rules

package info (click to toggle)
aria 1.0.0-14
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 580 kB
  • ctags: 5
  • sloc: makefile: 61
file content (84 lines) | stat: -rwxr-xr-x 1,733 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

TAR_DIR=aria-`dpkg-parsechangelog | grep urgency | cut -d" " -f3 | sed -e s/"("// | sed -e s/")"// | cut -d"-" -f1`

include /usr/share/dbs/dbs-build.mk

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	NOOPT=1
else
	NOOPT=0
endif
#NOOPT=1
CXX=g++
CC=gcc

configure: $(STAMP_DIR)/configure-stamp
$(STAMP_DIR)/configure-stamp: $(patched)
	dh_testdir
	
	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub \
		$(BUILD_TREE)
	cd $(BUILD_TREE) && CXX="$(CXX)" CC="$(CC)" \
		./configure --prefix=/usr

	touch $(BUILD_TREE)/Makefile
	touch $(STAMP_DIR)/configure-stamp
	

build: $(STAMP_DIR)/configure-stamp $(STAMP_DIR)/build-stamp

$(STAMP_DIR)/build-stamp:
	dh_testdir

	if [ "$(NOOPT)" = "1" ]; then \
		cat $(BUILD_TREE)/src/Makefile | sed -e s/-O2/-O0/ > out && \
		mv out $(BUILD_TREE)/src/Makefile; \
	fi
	cd $(BUILD_TREE) && $(MAKE)

	touch $(STAMP_DIR)/build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -rf $(STAMP_DIR) $(SOURCE_DIR)	

	dh_clean
	# somehow it isn't really cleaned..
	rm -rf debian/aria

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd $(BUILD_TREE) && $(MAKE) install prefix=$(CURDIR)/debian/aria/usr

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs $(BUILD_TREE)/ChangeLog
	dh_installdocs $(BUILD_TREE)/NEWS $(BUILD_TREE)/README \
		$(BUILD_TREE)/README.euc $(BUILD_TREE)/TODO \
		$(BUILD_TREE)/AUTHORS
	dh_installexamples
	dh_installmenu
	dh_installman debian/aria.1
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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