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 125
|
#!/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}')
DEV_DPKG_VERSION1 := $(shell dpkg -s apache-dev | awk '/Version:/ {print $2}')
DEV_VERSION1 := $(shell echo $(DEV_DPKG_VERSION1) | sed "s/^Version: \(.*\)-.*$$/\1/")
# (From the egcs packaging)
NEXTVERNO1 := $(shell echo $(DEV_VERSION1) | 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
DEB_DESTDIR_APACHE1 = $(pwd)/debian/libapache-mod-ruby
# This is the debhelper compatability version to use.
export DH_COMPAT=4
build: build-stamp
build-stamp: build-stamp-apache1 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
build-stamp-apache1:
dh_testdir
# Add here commands to compile the package.
rm -rf build-apache1
mkdir build-apache1
cd build-apache1; \
ruby1.8 ../configure.rb --with-apxs=/usr/bin/apxs; \
$(MAKE)
# dh_testroot
# dh_clean -k -plibapache-mod-ruby
# dh_installdirs -plibapache-mod-ruby
# $(MAKE) install DESTDIR=$(DEB_DESTDIR_APACHE1)
touch build-stamp-apache1
clean:
dh_testdir
dh_testroot
rm -f build-stamp-apache2 build-stamp-apache1 build-stamp
# Add here commands to clean up after the build process.
rm -rf build-apache1
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
cd build-apache1; \
$(MAKE) install-shared DESTDIR=$(DEB_DESTDIR_APACHE1)
install -m644 $(CURDIR)/debian/700mod_ruby.info $(DEB_DESTDIR_APACHE1)/usr/lib/apache/1.3
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_gencontrol -plibapache-mod-ruby -- -VTHISDEV="$(DEV_VERSION1)" \
-VNEXTDEV="$(NEXTVERNO1)"
# 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
|