Package: cyrus-sasl2
Version: 2.1.22.dfsg1-8
Priority: wishlist

Hi
  I am bootstrapping a new Debian arch, and have implemented two
DEB_BUILD_OPTION flags to be able to do this: no-sql and no-ldap

no-sql is not absolutely necessary, but no-ldap is, since cyrus-sasl2
and openldap2 both build-depend on each other, and both are
required/essential packages.  If you add this to the mainline Debian
package, it will be useful to bootstrap future ports. The patch for
both flags is attached.

   M
# Patch to implement DEB_BUILD_OPTIONS="no-sql no-ldap"
# no-sql is a luxury, but no-ldap is vital since openldap2 and cyrus-sasl2
# both build-depend on each other and both are essential/required packages.
# Martin Guy <[EMAIL PROTECTED]>, December 2006

--- debian/rules.orig	2006-12-22 17:05:49.000000000 +0000
+++ debian/rules	2006-12-22 17:26:32.000000000 +0000
@@ -18,6 +18,23 @@
   include $(SCRIPT_DIR)/dpkg-arch.mk
 endif
 
+# Bootstrapping package-building options
+ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS))
+  SASL_SQL=yes
+  CONFIGURE_SQL=--enable-sql
+else
+  SASL_SQL=no
+  CONFIGURE_SQL=--disable-sql
+endif
+
+ifeq (,$(findstring no-ldap,$(DEB_BUILD_OPTIONS))
+  SASL_LDAP=yes
+  CONFIGURE_LDAP=--with-ldap
+else
+  SASL_LDAP=no
+  CONFIGURE_LDAP=--without-ldap
+endif
+
 
 AUTOTOOLS=rm -f acinclude.m4 aclocal.m4 config/config.sub \
 	config/config.guess config/ltmain.sh config/libtool.m4; \
@@ -35,7 +52,9 @@
 	dh_testdir
 	dh_movefiles -plibsasl2
 	dh_movefiles -plibsasl2-modules-gssapi-heimdal
+ifeq ($(SASL_SQL),yes)
 	dh_movefiles -plibsasl2-modules-sql
+endif
 	dh_movefiles
 	touch $@
 
@@ -92,8 +111,7 @@
 	cd saslauthd; \
 	$(AUTOTOOLS); \
 	cd ..; \
-	./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-saslauthd=/var/run/saslauthd --enable-login  --enable-auth-sasldb --with-ldap --enable-sql --enable-ntlm --enable-static --enable-alwaystrue)
-
+	./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-saslauthd=/var/run/saslauthd --enable-login  --enable-auth-sasldb $(CONFIGURE_LDAP) $(CONFIGURE_SQL) --enable-ntlm --enable-static --enable-alwaystrue)
 	touch $@
 
 install: $(STAMP_DIR)/install-stamp

Reply via email to