ports/79062: [PATCH] courier-authlib linting
Jose M Rodriguez
josemi at freebsd.jazztel.es
Sun Mar 20 21:00:08 UTC 2005
>Number: 79062
>Category: ports
>Synopsis: [PATCH] courier-authlib linting
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Mar 20 21:00:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Jose M Rodriguez
>Release: FreeBSD 5.4-PRERELEASE i386
>Organization:
Redes JM
>Environment:
System: FreeBSD orion.redesjm.local 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Sat Mar 19 12:40:13 CET 2005 root at orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386
>Description:
- Makefile linting
- Merge sysconfdir and userdb configurable from courier-imap
- Make the port conflicts with mail/courier
>How-To-Repeat:
>Fix:
attached patch
--- patch-courier-authlib begins here ---
diff -Nru /usr/HEAD/ports/mail/courier-authlib/Makefile mail/courier-authlib/Makefile
--- /usr/HEAD/ports/mail/courier-authlib/Makefile Tue Mar 15 21:16:05 2005
+++ mail/courier-authlib/Makefile Sun Mar 20 21:40:26 2005
@@ -5,24 +5,26 @@
# $FreeBSD: ports/mail/courier-authlib/Makefile,v 1.12 2005/03/15 19:41:40 oliver Exp $
#
-PORTNAME= courier-authlib
-PORTVERSION= 0.55
-PORTREVISION= 1
-CATEGORIES= mail
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+PORTNAME= courier-authlib
+PORTVERSION= 0.55
+PORTREVISION= 1
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
MAINTAINER= oliver at FreeBSD.org
COMMENT= Authentication library used by courier ports
-USE_BZIP2= yes
-USE_REINPLACE= yes
-USE_PERL5= yes
-GNU_CONFIGURE= yes
-USE_GMAKE= yes
-USE_RC_SUBR= yes
-USE_LIBTOOL_VER=15
-USE_LIBLTDL= yes
+CONFLICTS= courier-0.*
+
+USE_BZIP2= yes
+USE_REINPLACE= yes
+USE_PERL5= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_RC_SUBR= yes
+USE_LIBTOOL_VER= 15
+USE_LIBLTDL= yes
#
# options available:
@@ -40,16 +42,21 @@
GDBM "Use gdbm files instead of bdb" off \
AUTHUSERDB "Build with authuserdb" on
-VPOPMAILDIR?= ${LOCALBASE}/vpopmail
-WITH_MAILUSER?= daemon
-WITH_MAILGROUP?=daemon
+VPOPMAILDIR?= ${LOCALBASE}/vpopmail
+WITH_MAILUSER?= daemon
+WITH_MAILGROUP?= daemon
+CONFDIR?= ${PREFIX}/etc
+USERDB?= ${PREFIX}/etc/userdb
+
+PLIST_SUB= CONFDIR=${CONFDIR:S,^${PREFIX}/,,} \
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LIBS="${LDFLAGS} -L${LOCALBASE}/lib"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ARGS= --without-authshadow \
+CONFIGURE_ARGS= --sysconfdir=${CONFDIR} \
+ --without-authshadow \
--without-authcustom \
--enable-unicode \
--enable-ltdl-install=no \
@@ -60,69 +67,71 @@
.include <bsd.port.pre.mk>
.if defined(WITH_SYSLOG_FACILITY)
-CONFIGURE_ARGS+=--with-syslog=${WITH_SYSLOG_FACILITY}
+CONFIGURE_ARGS+= --with-syslog=${WITH_SYSLOG_FACILITY}
.endif
.if defined(WITH_GDBM)
-LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
-CONFIGURE_ARGS+=--with-db=gdbm
+LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
+CONFIGURE_ARGS+= --with-db=gdbm
.else
-CONFIGURE_ARGS+=--with-db=db
+CONFIGURE_ARGS+= --with-db=db
.endif
.if !defined(WITH_VPOPMAIL)
-CONFIGURE_ARGS+=--without-authvchkpw
-PLIST_SUB+= VPOPMAILFLAG="@comment "
+CONFIGURE_ARGS+= --without-authvchkpw
+PLIST_SUB+= VPOPMAILFLAG="@comment "
.else
-CONFIGURE_ARGS+=--with-authvchkpw
+CONFIGURE_ARGS+= --with-authvchkpw
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
PLIST_SUB+= VPOPMAILFLAG=""
.endif
.if defined(WITH_LDAP)
-USE_OPENLDAP= yes
-CONFIGURE_ARGS+=--with-authldap
-PLIST_SUB+= LDAPFLAG=""
+USE_OPENLDAP= yes
+CONFIGURE_ARGS+= --with-authldap
+PLIST_SUB+= LDAPFLAG=""
.else
-CONFIGURE_ARGS+=--without-authldap
-PLIST_SUB+= LDAPFLAG="@comment "
+CONFIGURE_ARGS+= --without-authldap
+PLIST_SUB+= LDAPFLAG="@comment "
.endif
.if !defined(WITH_MYSQL)
-CONFIGURE_ARGS+=--without-authmysql
-PLIST_SUB+= MYSQLFLAG="@comment "
+CONFIGURE_ARGS+= --without-authmysql
+PLIST_SUB+= MYSQLFLAG="@comment "
.else
-USE_MYSQL= YES
-PLIST_SUB+= MYSQLFLAG=""
-CONFIGURE_ARGS+=--with-authmysql \
- --with-mysql-libs=${LOCALBASE}/lib/mysql \
- --with-mysql-includes=${LOCALBASE}/include/mysql
+USE_MYSQL= YES
+PLIST_SUB+= MYSQLFLAG=""
+CONFIGURE_ARGS+= --with-authmysql \
+ --with-mysql-libs=${LOCALBASE}/lib/mysql \
+ --with-mysql-includes=${LOCALBASE}/include/mysql
.endif
.if !defined(WITH_POSTGRESQL)
-CONFIGURE_ARGS+=--without-authpgsql
-PLIST_SUB+= PGSQLFLAG="@comment "
+CONFIGURE_ARGS+= --without-authpgsql
+PLIST_SUB+= PGSQLFLAG="@comment "
.else
-USE_PGSQL= YES
-PLIST_SUB+= PGSQLFLAG=""
+USE_PGSQL= YES
+PLIST_SUB+= PGSQLFLAG=""
.endif
.if !defined(WITHOUT_PAM)
-CONFIGURE_ARGS+=--with-authpam
-PLIST_SUB+= PAMFLAG=""
+CONFIGURE_ARGS+= --with-authpam
+PLIST_SUB+= PAMFLAG=""
.else
-CONFIGURE_ARGS+=--without-authpam
-PLIST_SUB+= PAMFLAG="@comment "
+CONFIGURE_ARGS+= --without-authpam
+PLIST_SUB+= PAMFLAG="@comment "
.endif
.if defined(WITHOUT_AUTHUSERDB)
-CONFIGURE_ARGS+=--without-authuserdb
-PLIST_SUB+= AUTHUSERDBFLAG="@comment "
+CONFIGURE_ARGS+= --without-authuserdb
+PLIST_SUB+= AUTHUSERDBFLAG="@comment "
.else
-PLIST_SUB+= AUTHUSERDBFLAG=""
+CONFIGURE_ARGS+= --with-userdb=${USERDB}
+PLIST_SUB+= AUTHUSERDBFLAG=""
+PLIST_SUB+= USERDB=${USERDB:S,^${PREFIX}/,,}
.endif
-RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP}
MAN1= courierlogger.1
diff -Nru /usr/HEAD/ports/mail/courier-authlib/pkg-plist mail/courier-authlib/pkg-plist
--- /usr/HEAD/ports/mail/courier-authlib/pkg-plist Tue Mar 15 21:16:05 2005
+++ mail/courier-authlib/pkg-plist Sun Mar 20 19:08:13 2005
@@ -1,11 +1,11 @@
@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true
bin/courierauthconfig
etc/rc.d/courier-authdaemond.sh
-%%MYSQLFLAG%%etc/authlib/authmysqlrc.dist
-%%PGSQLFLAG%%etc/authlib/authpgsqlrc.dist
-%%LDAPFLAG%%etc/authlib/authldaprc.dist
- at unexec if cmp -s %D/etc/authlib/authdaemonrc.dist %D/etc/authlib/authdaemonrc; then rm -f %D/etc/authlib/authdaemonrc; fi
-etc/authlib/authdaemonrc.dist
+%%MYSQLFLAG%%%%CONFDIR%%/authlib/authmysqlrc.dist
+%%PGSQLFLAG%%%%CONFDIR%%/authlib/authpgsqlrc.dist
+%%LDAPFLAG%%%%CONFDIR%%/authlib/authldaprc.dist
+ at unexec if cmp -s %D/%%CONFDIR%%/authlib/authdaemonrc.dist %D/%%CONFDIR%%/authlib/authdaemonrc; then rm -f %D/%%CONFDIR%%/authlib/authdaemonrc; fi
+%%CONFDIR%%/authlib/authdaemonrc.dist
include/courier_auth_config.h
include/courierauth.h
include/courierauthsasl.h
@@ -62,6 +62,6 @@
%%PORTDOCS%%%%DOCSDIR%%/README_authlib.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@unexec rmdir /var/run/authdaemond 2>/dev/null || true
- at unexec rmdir %D/etc/authlib 2>/dev/null || true
+ at unexec rmdir %D/%%CONFDIR%%/authlib 2>/dev/null || true
@dirrm lib/courier-authlib
@dirrm libexec/courier-authlib
--- patch-courier-authlib ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list