[go: up one dir, main page]

File: rules

package info (click to toggle)
specter 1.4-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 736 kB
  • ctags: 542
  • sloc: ansic: 5,060; sh: 320; makefile: 239; perl: 169
file content (81 lines) | stat: -rwxr-xr-x 1,982 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
#!/usr/bin/make -f

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

include /usr/share/dpatch/dpatch.make

CONFIG_specter = --prefix=/usr --mandir=\$${prefix}/share/man \
 --sysconfdir=/etc --host=$(DEB_HOST_GNU_TYPE) \
 --build=$(DEB_BUILD_GNU_TYPE) --with-sharedlib \
 --with-mysql --with-pgsql


CFLAGS = -Wall -g

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


build: patch-stamp build-stamp
build-stamp:
	dh_testdir
	mkdir -p $(CURDIR)/debian/tmp
	./configure $(CONFIG_specter)
	$(MAKE)
	touch build-stamp
				

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp* install-stamp*
		if test -e Makefile; then $(MAKE) distclean; fi;
	dh_clean

	
install: install-stamp build
	dh_testdir
	dh_installdirs
install-stamp:
	dh_testdir
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
	install -D -c -m 755 contrib/ulogd2specter.pl \
		debian/tmp/usr/share/doc/specter/contrib/ulogd2specter.pl
	touch install-stamp


# Build architecture-independent files here.
binary-indep: build install
	@echo "Nothing to do."
	
# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -pspecter Changes
	dh_installdocs -pspecter
	dh_installexamples -pspecter
	dh_installlogrotate -pspecter -P./
#	dh_installdebconf	
	dh_installinit -pspecter
	dh_installman -pspecter doc/specter.8 doc/specter.conf.5
	dh_install --sourcedir=debian/tmp
	dh_link -pspecter usr/lib/libipulog.so usr/lib/libipulog.so.0
	dh_link -pspecter-mysql usr/share/doc/specter /usr/share/doc/specter-mysql
	dh_link -pspecter-pgsql usr/share/doc/specter /usr/share/doc/specter-pgsql
	dh_strip
	dh_compress -Xpgsql.table
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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