diff options
Diffstat (limited to 'packaging/Debian/debian/rules')
-rwxr-xr-x | packaging/Debian/debian/rules | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian/rules index 79be52a044..0539484089 100755 --- a/packaging/Debian/debian/rules +++ b/packaging/Debian/debian/rules @@ -4,14 +4,13 @@ # solve build problems) introduced in Samba 2.2.1a-5. These # modification were made by Steve Langasek <vorlon@netexpress.net>. # -# $Id: rules,v 1.3 2003/06/01 07:12:51 peloy Exp $ # # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=2 +export DH_COMPAT=4 # This has to be exported to make some magic below work. export DH_OPTIONS @@ -24,6 +23,22 @@ DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) export DEB_HOST_GNU_TYPE export DEB_BUILD_GNU_TYPE + +# Support the DEB_BUILD_OPTIONS variable +CFLAGS = -gstabs -Wall +INSTALL = install + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL += -s +endif + + DESTDIR=`pwd`/debian/tmp SWATDIR=`pwd`/debian/swat SAMBABOOK=`pwd`/debian/swat @@ -33,7 +48,7 @@ IVARS = BASEDIR=$(DESTDIR)/usr \ BINDIR=$(DESTDIR)/usr/bin \ SBINDIR=$(DESTDIR)/usr/sbin \ MANDIR=$(DESTDIR)/usr/share/man \ - LIBDIR=$(DESTDIR)/etc/samba \ + LIBDIR=$(DESTDIR)/usr/lib/samba \ VARDIR=$(DESTDIR)/var \ INCLUDEDIR=$(DESTDIR)/usr/include \ SWATDIR=$(SWATDIR)/usr/share/samba/swat \ @@ -61,7 +76,7 @@ configure-stamp: cp -f debian/config.cache source/config.cache; \ fi - [ -f source/Makefile ] || (cd source && ./configure \ + [ -f source/Makefile ] || (cd source && CFLAGS="$(CFLAGS)" ./configure \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --cache-file=./config.cache \ @@ -260,7 +275,7 @@ binary-arch: build install fi # dh_installemacsen # dh_installpam - DH_OPTIONS= dh_installinit -psamba -n + DH_OPTIONS= dh_installinit -psamba -- "defaults 20 19" DH_OPTIONS= dh_installinit -pwinbind dh_installcron # dh_installmanpages |