Add databases/courier-authlib-sqlite port to install sqlite support

for courier-authlib

Suggested by:	Ewout Boks <ewout@boks.com>
This commit is contained in:
Guido Falsi 2020-11-15 12:31:00 +00:00
parent 14e8ae53d5
commit 4d0426bd4c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=555203
8 changed files with 95 additions and 22 deletions

View File

@ -46,6 +46,7 @@
SUBDIR += couchdb3
SUBDIR += courier-authlib-mysql
SUBDIR += courier-authlib-pgsql
SUBDIR += courier-authlib-sqlite
SUBDIR += courier-authlib-userdb
SUBDIR += courier-authlib-usergdbm
SUBDIR += cppdb

View File

@ -0,0 +1,12 @@
# Created by: Yarema <yds@CoolRat.org>
# $FreeBSD$
PORTREVISION= 0
PKGNAMESUFFIX= -sqlite
COMMENT= SQLite support for the Courier authentication library
CATEGORIES= databases mail
MASTERDIR= ${.CURDIR}/../../security/courier-authlib
.include "${MASTERDIR}/Makefile"

View File

@ -54,8 +54,7 @@ CONFIGURE_ARGS= --enable-unicode \
--with-mailgroup=${MAILGRP} \
--localstatedir=${LOCALSTATEDIR} \
--with-authdaemonvar=${AUTHDAEMONVAR} \
--cache-file=${WRKDIR}/courier-authlib.cache \
--without-authsqlite
--cache-file=${WRKDIR}/courier-authlib.cache
INSTALL_TARGET= install-strip
@ -142,6 +141,17 @@ CONFIGURE_ARGS+=--with-authpgsql
CONFIGURE_ARGS+=--without-authpgsql
.endif
.if ${AUTHMOD} == authsqlite
RUN_DEPENDS+= ${LOCALBASE}/share/sysconftool/sysconftool:devel/sysconftool
OPTIONS_DEFINE+= DOCS
DOCS= README.authsqlite.html
USES+= pkgconfig sqlite
CONFIGURE_ARGS+=--with-authsqlite
.else
CONFIGURE_ARGS+=--without-authsqlite
.endif
.if ${AUTHMOD} == authvchkpw
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:mail/vpopmail
CONFIGURE_ARGS+=--with-authvchkpw

View File

@ -19,6 +19,9 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthmysql.so:databases/couri
.if ${PORT_OPTIONS:MAUTH_PGSQL}
BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthpgsql.so:databases/courier-authlib-pgsql
.endif
.if ${PORT_OPTIONS:MAUTH_SQLITE}
BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthsqlite.so:databases/courier-authlib-sqlite
.endif
.if ${PORT_OPTIONS:MAUTH_USERDB}
.if ${PORT_OPTIONS:MGDBM}
BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthuserdb.so:databases/courier-authlib-usergdbm

View File

@ -10,9 +10,11 @@
# in your Makefile *after* any
#.include <bsd.port.pre.mk>
OPTIONS_DEFINE+= AUTH_LDAP AUTH_MYSQL AUTH_PGSQL AUTH_USERDB AUTH_VCHKPW DOCS
OPTIONS_DEFINE+= AUTH_LDAP AUTH_MYSQL AUTH_PGSQL AUTH_SQLITE \
AUTH_USERDB AUTH_VCHKPW DOCS
AUTH_LDAP_DESC= LDAP support
AUTH_MYSQL_DESC= MySQL support
AUTH_PGSQL_DESC= PostgreSQL support
AUTH_SQLITE_DESC= SQLite support
AUTH_USERDB_DESC= Userdb support
AUTH_VCHKPW_DESC= popmail/vchkpw support

View File

@ -1,4 +1,4 @@
--- configure.orig 2017-07-02 14:41:39 UTC
--- configure.orig 2020-06-18 01:05:21 UTC
+++ configure
@@ -642,6 +642,10 @@ ltdl_LIBOBJS
am__EXEEXT_FALSE
@ -9,9 +9,9 @@
+HAVE_USERDB_TRUE
+HAVE_USERDB_FALSE
LIBOBJS
HAVE_SGML_FALSE
HAVE_SGML_TRUE
@@ -676,6 +680,9 @@ LIBAUTHPGSQL
VERSION_INFO
courierauth_ldflags
@@ -678,6 +682,9 @@ LIBAUTHPGSQL
PGSQL_LIBS
PG_CONFIG
authpgsqlrc
@ -21,7 +21,7 @@
LIBAUTHPWD
LIBAUTHSHADOW
SHADOWLIBS
@@ -1563,6 +1570,7 @@ Optional Packages:
@@ -1565,6 +1572,7 @@ Optional Packages:
--with-authldaprc=filename Expect to find authldaprc here
--without-authpwd Do not include the authpwd module
--without-authshadow Do not include the authshadow module
@ -29,7 +29,7 @@
--with-authpgsqlrc=filename Expect to find authpgsql here
--without-authpgsql Do not include the authpgsql module
--with-pgsql-libs=DIR Look for pgsql libs in this dir
@@ -2938,7 +2946,7 @@ else
@@ -2940,7 +2948,7 @@ else
fi
fi
@ -38,7 +38,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
@@ -18097,8 +18105,12 @@ fi
@@ -18276,8 +18284,12 @@ fi
if test "$doauthuserdb" = "no"
then
@ -51,7 +51,7 @@
AUTHUSERDB="authuserdb"
LIBAUTHUSERDB="libauthuserdb.la"
@@ -18556,7 +18568,21 @@ else
@@ -18735,7 +18747,21 @@ else
fi
@ -73,16 +73,10 @@
if test "$HAVE_LDAP" = 1; then
HAVE_LDAP_TRUE=
HAVE_LDAP_FALSE='#'
@@ -18768,6 +18794,256 @@ if test "$HAVE_PWD" = 1
then
LIBAUTHPWD="libauthpwd.la"
fi
+
+
+
+
+
+
@@ -18953,6 +18979,256 @@ fi
+
+vpopmail_home=`$PERL -e '@a=getpwnam("vpopmail"); print "$a[7]";'`
+
@ -327,6 +321,45 @@
+ LIBS=$_SAVE_LIBS
+fi
+
+
+
+
+
+
+
# Check whether --with-authpgsqlrc was given.
if test "${with_authpgsqlrc+set}" = set; then :
withval=$with_authpgsqlrc; authpgsqlrc="$withval"
@@ -19278,8 +19554,9 @@ then
SQLITE_LIBS="`pkg-config --libs sqlite3 2>/dev/null`"
saveLIBS="$LIBS"
LIBS="$SQLITE_LIBS $LIBS"
- ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
-if test "x$ac_cv_func_sqlite3_version" = xyes; then :
+echo $LIBS
+# ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
+if test -n $SQLITE_LIBS; then :
doauthsqlite="yes"
fi
@@ -19296,13 +19573,13 @@ then
else
saveLIBS="$LIBS"
LIBS="$SQLITE_LIBS $LIBS"
- ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
-if test "x$ac_cv_func_sqlite3_version" = xyes; then :
- :
-else
- as_fn_error $? "Cannot link with $SQLITE_LIBS" "$LINENO" 5
-
-fi
+# ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
+#if test "x$ac_cv_func_sqlite3_version" = xyes; then :
+# :
+#else
+# as_fn_error $? "Cannot link with $SQLITE_LIBS" "$LINENO" 5
+#
+#fi
LIBS="$saveLIBS"
HAVE_AUTHSQLITE=1

View File

@ -0,0 +1,5 @@
This package installs SQLite support for the Courier authentication library
to read the list of mail accounts and passwords from a table in a SQLite
database.
WWW: http://www.Courier-MTA.org/authlib/

View File

@ -0,0 +1,7 @@
@preunexec if cmp -s %D/etc/authlib/authsqliterc.dist %D/etc/authlib/authsqliterc; then rm -f %D/etc/authlib/authsqliterc; fi
@(%%MAILOWN%%,%%MAILGRP%%,660) etc/authlib/authsqliterc.dist
@postexec %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/authlib/authsqliterc
lib/courier-authlib/libauthsqlite.so
lib/courier-authlib/libauthsqlite.so.0
lib/courier-authlib/libauthsqlite.so.0.0.0
%%PORTDOCS%%%%DOCSDIR%%/README.authsqlite.html