File: rules

package info (click to toggle)
mod-ruby 1.2.6-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 704 kB
  • ctags: 978
  • sloc: ansic: 6,779; ruby: 1,954; makefile: 77; sh: 16
file content (96 lines) | stat: -rwxr-xr-x 2,727 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
#!/usr/bin/make -f
# MAde with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

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

##DEV_DPKG_VERSION2 := $(shell dpkg -s apache2-dev | awk '/Version:/ {print $2}')
DEV_DPKG_VERSION2 := $(shell dpkg -s apache2-threaded-dev apache2-prefork-dev | awk '/Version:/ {print $2}')
DEV_VERSION2 := $(shell echo $(DEV_DPKG_VERSION2) | sed "s/^Version: \(.*\)-.*$$/\1/")
# (From the egcs packaging)
NEXTVERNO2 := $(shell echo $(DEV_VERSION2) | awk -F. '{OFS="."; $$NF = $$NF + 1; print}')

pwd := $(shell pwd)
DEB_DESTDIR_LIBAPACHE_RUBY = $(pwd)/debian/libapache-ruby1.8
DEB_DESTDIR_APACHE2 = $(pwd)/debian/libapache2-mod-ruby

# This is the debhelper compatability version to use.
export DH_COMPAT=4

build: build-stamp
build-stamp: build-stamp-apache2
build-stamp-apache2:
	dh_testdir

	# Add here commands to compile the package.
	rm -rf build-apache2
	mkdir build-apache2
	cd build-apache2; \
		ruby1.8 ../configure.rb --with-apr-includes=/usr/include/apr-1.0 --with-apxs=/usr/bin/apxs2; \
		$(MAKE)

#	dh_testroot
#	dh_clean -k -plibapache2-mod-ruby
#	dh_installdirs -plibapache2-mod-ruby
#	$(MAKE) install DESTDIR=$(DEB_DESTDIR_APACHE2)

	touch build-stamp-apache2

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp-apache2 build-stamp
	# Add here commands to clean up after the build process.
	rm -rf build-apache2
	#-$(MAKE) distclean

	dh_clean

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

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd build-apache2; \
		$(MAKE) install-ruby DESTDIR=$(DEB_DESTDIR_LIBAPACHE_RUBY)

#	dh_clean -k -plibapache2-mod-ruby
#	dh_installdirs -plibapache2-mod-ruby
	cd build-apache2; \
		$(MAKE) install-shared DESTDIR=$(DEB_DESTDIR_APACHE2)
	install -m644 $(CURDIR)/debian/ruby.load $(DEB_DESTDIR_APACHE2)/etc/apache2/mods-available

#	dh_clean -k -plibapache-mod-ruby
#	dh_installdirs -plibapache-mod-ruby

	dh_installdocs
	dh_installexamples
#	dh_installinit
#	dh_installman
#	dh_undocumented
	dh_installchangelogs ChangeLog
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol -plibapache-ruby1.8
	dh_gencontrol -plibapache2-mod-ruby -- -VTHISDEV="$(DEV_VERSION2)" \
		-VNEXTDEV="$(NEXTVERNO2)"
#	dh_makeshlibs
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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