[Pkg-voip-commits] r9295 - /opensips/trunk/debian/rules
jump-guest at alioth.debian.org
jump-guest at alioth.debian.org
Thu Sep 29 21:18:01 UTC 2011
Author: jump-guest
Date: Thu Sep 29 21:18:01 2011
New Revision: 9295
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9295
Log:
Use tiny rules to simplify
Modified:
opensips/trunk/debian/rules
Modified: opensips/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/opensips/trunk/debian/rules?rev=9295&op=diff
==============================================================================
--- opensips/trunk/debian/rules (original)
+++ opensips/trunk/debian/rules Thu Sep 29 21:18:01 2011
@@ -1,6 +1,4 @@
#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
@@ -59,13 +57,8 @@
CC = gcc
endif
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
+# Get CFLAGS from dpkg-buildflags
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
# force lib (versus lib64) and SMP support all the time
VARS = LIBDIR=lib ISSMP=yes TLS=$(TLS)
@@ -74,52 +67,43 @@
INSTALL_PROGRAM += -s
endif
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- touch configure-stamp
+print-version:
+ @@echo "Debian version: $(DEBVERSION)"
+ @@echo "Upstream version: $(UPVERSION_FULL)"
+ @@echo "Upstream URL: $(URL)"
+
+get-orig-source:
+ @@dh_testdir
+ @@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+ @@echo Downloading $(FILENAME) from $(URL) ...
+ @@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
+%:
+ dh $@
- # Add here commands to compile the package.
+override_dh_auto_clean:
+ dh_auto_clean -- $(VARS) proper
+ rm -f cfg.tab.h
+ rm -f utils/opensipsunix/opensipsunix.o utils/opensipsunix/opensipsunix
+ rm -f utils/db_berkeley/bdb_recover.o utils/db_berkeley/bdb_recover
+
+override_dh_auto_build:
CC="$(CC)" CFLAGS="$(CFLAGS)" $(VARS) $(MAKE) all \
include_modules="$(INCLUDE_MODULES)" \
skip_modules="$(EXCLUDED_MODULES)" \
prefix=/usr \
cfg-target=/etc/opensips/
- touch build-stamp
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- if [ -r Makefile ]; then \
- $(MAKE) $(VARS) proper; \
- fi
- rm -f cfg.tab.h
- rm -f utils/opensipsunix/opensipsunix.o utils/opensipsunix/opensipsunix
- rm -f utils/db_berkeley/bdb_recover.o utils/db_berkeley/bdb_recover
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
+override_dh_auto_install:
# Add here commands to install the package into debian/opensips
# opensips base package
- CC="$(CC)" CFLAGS="$(CFLAGS)" $(VARS) $(MAKE) install skip_modules="$(EXCLUDED_MODULES)" \
+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(VARS) $(MAKE) install \
+ include_modules="$(INCLUDE_MODULES)" \
+ skip_modules="$(EXCLUDED_MODULES)" \
basedir=$(CURDIR)/debian/opensips \
prefix=/usr \
cfg-prefix=$(CURDIR)/debian/opensips \
@@ -138,49 +122,7 @@
rm $(CURDIR)/debian/opensips/usr/share/doc/opensips/INSTALL
-# This single target is used to build all the packages, all at once, or
-# one at a time. So keep in mind: any options passed to commands here will
-# affect _all_ packages. Anything you want to only affect one package
-# should be put in another target, such as the install target.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_install
- dh_installdocs
- dh_installexamples
-# dh_installlogrotate
- dh_installinit -popensips -- defaults 23
- dh_installcron
- dh_installman -p opensips opensipsdbctl.8
- dh_installman -p opensips-console osipsconsole.8
- dh_installman -p opensips-berkeley-module bdb_recover.8
- dh_installinfo
- dh_installchangelogs ChangeLog
- dh_link
+
+override_dh_strip:
dh_strip --dbg-package=opensips-dbg
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-# Build architecture-independent packages using the common target
-binary-indep: build install
-# We have nothing to do by default.
-
-binary: binary-indep binary-arch
-
-print-version:
- @@echo "Debian version: $(DEBVERSION)"
- @@echo "Upstream version: $(UPVERSION_FULL)"
- @@echo "Upstream URL: $(URL)"
-
-get-orig-source:
- @@dh_testdir
- @@[ -d ../tarballs/. ]||mkdir -p ../tarballs
- @@echo Downloading $(FILENAME) from $(URL) ...
- @@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
-
-.PHONY: build clean binary-indep binary-arch binary install configure
More information about the Pkg-voip-commits
mailing list