File: rules

package info (click to toggle)
scgi 1.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 156 kB
  • ctags: 160
  • sloc: ansic: 1,119; python: 333; makefile: 82
file content (102 lines) | stat: -rwxr-xr-x 2,051 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
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
#!/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

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif


# sanitize path to avoid using locally installed versions
export PATH=/bin:/usr/bin

PYTHON=python2.3
PYTHON_SCGI=debian/$(PYTHON)-scgi
APACHE_SCGI=debian/libapache-mod-scgi
APACHE2_SCGI=debian/libapache2-mod-scgi


build: build-stamp

build-stamp:
	dh_testdir

	(cd apache1 && $(MAKE) mod_scgi.so)
	(cd apache2 && $(MAKE) all)
	$(PYTHON) setup.py build

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -rf build-stamp build

	-(cd apache1 && $(MAKE) clean)
	-(cd apache2 && $(MAKE) clean)

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	(cd apache1 && $(MAKE) install DESTDIR=../$(APACHE_SCGI))
	install -m 0644 debian/150mod_scgi.info \
		$(APACHE_SCGI)/usr/lib/apache/1.3/

	install -m 0755 -d $(APACHE2_SCGI)/usr/lib/apache2/modules
	install -m 644 apache2/.libs/mod_scgi.so \
		$(APACHE2_SCGI)/usr/lib/apache2/modules
	install -m 0755 -d $(APACHE2_SCGI)/etc/apache2/mods-available
	install -m 644 debian/scgi.load \
		$(APACHE2_SCGI)/etc/apache2/mods-available

	$(PYTHON) setup.py install --prefix=$(PYTHON_SCGI)/usr


# Build architecture-independent files
binary-indep: build install
	

# Build architecture-dependent files
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples -p$(PYTHON)-scgi
#	dh_installmenu
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
	dh_installman
#	dh_installinfo
#	dh_undocumented
	dh_installchangelogs CHANGES
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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