File: rules

package info (click to toggle)
httrack 3.40.4-3.1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,252 kB
  • ctags: 3,034
  • sloc: ansic: 38,848; sh: 8,626; makefile: 257
file content (124 lines) | stat: -rwxr-xr-x 3,413 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
122
123
124
#!/usr/bin/make -f

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

# This is the debhelper compatibility version to use.
export DH_COMPAT=3

# *** Patch for s390, mips, hppa..
# It seems that htscore.c can not compile on several archs, due to compiler
# capacity limits. These lines shall be removed when gcc is upgraded.
# See discussions on 'Assembler messages: Branch out of range'
# Addition (04/2004): gcc-3.3 on arm fcks up with htscoremain.c and -O3 (..)
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),s390 mips mipsel hppa m68k arm))
	CFLAGS += -DNOSTRDEBUG
endif

# DEB_BUILD_OPTIONS flags
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g3 -O0
else
	CFLAGS += -g -O3
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

configure: configure-stamp
configure-stamp:
	dh_testdir

	./configure \
		--prefix=/usr \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--mandir=\$${prefix}/share/man \
		--sysconfdir=/etc \
		CFLAGS="$(CFLAGS)"

	touch configure-stamp

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

	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	[ ! -f Makefile ] || $(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=$(CURDIR)/debian/httrack

	mkdir -p $(CURDIR)/debian/httrack/usr/lib/httrack/
	mv $(CURDIR)/debian/httrack/usr/bin/htsserver \
		$(CURDIR)/debian/httrack/usr/lib/httrack/
	rm -f $(CURDIR)/debian/httrack/usr/lib/httrack/*.a
	rm -f $(CURDIR)/debian/httrack/usr/lib/httrack/*.la
	mv $(CURDIR)/debian/httrack/usr/lib/httrack/lib* \
		$(CURDIR)/debian/httrack/usr/share/httrack/libtest/
	mkdir -p $(CURDIR)/debian/httrack/usr/lib/httrack/libtest
	mv $(CURDIR)/debian/httrack/usr/share/httrack/libtest/lib* \
		$(CURDIR)/debian/httrack/usr/lib/httrack/libtest
	ln -s ../../../share/httrack/libtest/readme.txt \
		 $(CURDIR)/debian/httrack/usr/lib/httrack/libtest/readme.txt
	# Duplicate entry for legacy /usr/share/applications support
	# to be removed soon
	mkdir -p $(CURDIR)/debian/httrack/usr/share/gnome/apps/Internet
	ln -s ../../../applications/WebHTTrack.desktop \
		$(CURDIR)/debian/httrack/usr/share/gnome/apps/Internet/
	ln -s ../../../applications/WebHTTrack-Websites.desktop \
		$(CURDIR)/debian/httrack/usr/share/gnome/apps/Internet/
	dh_movefiles --sourcedir=debian/httrack
	# don't move history file to httrack-doc
	mv $(CURDIR)/debian/httrack-doc/usr/share/doc/httrack/history.txt $(CURDIR)/debian/httrack/usr/share/doc/httrack/
	find debian -type d | xargs rmdir -p --ignore-fail-on-non-empty

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installchangelogs -i history.txt
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installmenu -a
	dh_installchangelogs -a history.txt
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_shlibdeps -a -ldebian/libhttrack1/usr/lib
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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