Bug 54887 - [new port] mail/dbmail: An SQL database-based mail system (POP3 and IMAP)
Summary: [new port] mail/dbmail: An SQL database-based mail system (POP3 and IMAP)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-26 23:10 UTC by Clement Laforet
Modified: 2003-10-07 02:20 UTC (History)
1 user (show)

See Also:


Attachments
dbmail.shar (5.78 KB, text/plain)
2003-07-26 23:10 UTC, Clement Laforet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clement Laforet 2003-07-26 23:10:15 UTC
	(author description)
	The DBMAIL package replaces the normal UNIX mailing system. All emails and users data are 
	stored in a database. You can create an unlimited number of email accounts, which can 
	be checked using the POP3 or IMAP protocol. Users can maintain their own set of email 
	addresses. It is more scalable, more secure, and faster than traditional mail systems. 
	DBMAIL uses PostgreSQL or MySQL.

How-To-Repeat: 	N/A.
Comment 1 Clement Laforet 2003-07-31 13:45:33 UTC
misc cleanup to make "portlint -A" happy ;o)


diff -Nru dbmail.orig/Makefile dbmail/Makefile
--- dbmail.orig/Makefile	Thu Jul 31 14:42:41 2003
+++ dbmail/Makefile	Thu Jul 31 14:40:12 2003
@@ -9,6 +9,7 @@
 PORTVERSION=	1.1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.dbmail.org/tgz/
+PKGNAMESUFFIX=	-${DATABASE}
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	sheepkiller@cultdeadsheep.org
@@ -20,8 +21,8 @@
 
 # MySQL deps hack
 MYSQL323_LIBVER=10
-MYSQL40_LIBVER= 12
-MYSQL41_LIBVER= 14
+MYSQL40_LIBVER=	12
+MYSQL41_LIBVER=	14
 
 .include <bsd.port.pre.mk>
 
@@ -46,14 +47,13 @@
 PLIST_SUB+=		MYSQL="@comment "
 .else
 CONFIGURE_ARGS+=	--with-mysql
-LIB_DEPENDS+=   	mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
+LIB_DEPENDS+=		mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
 DATABASE=		mysql
 PLIST_SUB+=		MYSQL=""
 PLIST_SUB+=		PGSQL="@comment "
 .endif
 
 CONFIGURE_ENV+=		LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
-PKGNAMESUFFIX=		-${DATABASE}
 FILES_TO_PATCH=		imapd.c main.c maintenance.c pop3d.c user.c
 DOCS=			INSTALL README
 
@@ -71,9 +71,9 @@
 	@${ECHO} ""
 
 post-configure:
-.for file in ${FILES_TO_PATCH}
+.for FILE in ${FILES_TO_PATCH}
 	@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
-				${WRKSRC}/${file}
+				${WRKSRC}/${FILE}
 .endfor
 
 post-install:
diff -Nru dbmail.orig/pkg-plist dbmail/pkg-plist
--- dbmail.orig/pkg-plist	Thu Jul 31 14:42:41 2003
+++ dbmail/pkg-plist	Thu Jul 31 14:36:04 2003
@@ -32,7 +32,6 @@
 %%PGSQL%%share/dbmail/sql/update_encryption.pgsql
 %%PORTDOCS%%%%DOCSDIR%%/INSTALL
 %%PORTDOCS%%%%DOCSDIR%%/README
-@unexec rmdir %D/share/dbmail/sql
-@unexec rmdir %D/share/dbmail
-@unexec rmdir %D/%%DOCSDIR%%
-
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%
Comment 2 Clement Laforet 2003-08-27 10:43:52 UTC
Use new USE_MYSQL.


--- Makefile.old	Wed Aug 27 11:35:39 2003
+++ Makefile	Wed Aug 27 11:36:16 2003
@@ -19,26 +19,6 @@
 GNU_CONFIGURE=	YES
 USE_GMAKE=	YES
 
-# MySQL deps hack
-MYSQL323_LIBVER=10
-MYSQL40_LIBVER=	12
-MYSQL41_LIBVER=	14
-
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_MYSQL_VER)
-MYSQL_VER=	${WITH_MYSQL_VER}
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL_323_LIBVER})
-MYSQL_VER=	323
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL40_LIBVER})
-MYSQL_VER=	40
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL41_LIBVER})
-MYSQL_VER=	41
-.else
-# We consider that MySQL 4.0.x is now the default.
-MYSQL_VER=	40
-.endif
-
 .if defined(WITH_PGSQL)
 CONFIGURE_ARGS+=	--with-pgsql
 LIB_DEPENDS+=		pq:${PORTSDIR}/databases/postgresql7
@@ -46,8 +26,8 @@
 PLIST_SUB+=		PGSQL=""
 PLIST_SUB+=		MYSQL="@comment "
 .else
+USE_MYSQL=		YES
 CONFIGURE_ARGS+=	--with-mysql
-LIB_DEPENDS+=		mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
 DATABASE=		mysql
 PLIST_SUB+=		MYSQL=""
 PLIST_SUB+=		PGSQL="@comment "
@@ -61,11 +41,6 @@
 	@${ECHO} ""
 	@${ECHO} "You may use the following build options:"
 	@${ECHO} "   By default dbmail uses MySQL backend database."
-	@${ECHO} ""
-	@${ECHO} "      WITH_MYSQL_VER=323   Enable MySQL 3.23 support"
-	@${ECHO} "      WITH_MYSQL_VER=40    Enable MySQL 4.0 support (default)"
-	@${ECHO} "      WITH_MYSQL_VER=41    Enable MySQL 4.1 support"
-	@${ECHO} ""
 	@${ECHO} "   To build dbmail with PostgreSQL as backend database,"
 	@${ECHO} "	define WITH_PGSQL"
 	@${ECHO} ""
@@ -87,4 +62,4 @@
 .endfor
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Comment 3 Clement Laforet 2003-08-27 10:43:52 UTC
Use new USE_MYSQL.


--- Makefile.old	Wed Aug 27 11:35:39 2003
+++ Makefile	Wed Aug 27 11:36:16 2003
@@ -19,26 +19,6 @@
 GNU_CONFIGURE=	YES
 USE_GMAKE=	YES
 
-# MySQL deps hack
-MYSQL323_LIBVER=10
-MYSQL40_LIBVER=	12
-MYSQL41_LIBVER=	14
-
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_MYSQL_VER)
-MYSQL_VER=	${WITH_MYSQL_VER}
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL_323_LIBVER})
-MYSQL_VER=	323
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL40_LIBVER})
-MYSQL_VER=	40
-.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL41_LIBVER})
-MYSQL_VER=	41
-.else
-# We consider that MySQL 4.0.x is now the default.
-MYSQL_VER=	40
-.endif
-
 .if defined(WITH_PGSQL)
 CONFIGURE_ARGS+=	--with-pgsql
 LIB_DEPENDS+=		pq:${PORTSDIR}/databases/postgresql7
@@ -46,8 +26,8 @@
 PLIST_SUB+=		PGSQL=""
 PLIST_SUB+=		MYSQL="@comment "
 .else
+USE_MYSQL=		YES
 CONFIGURE_ARGS+=	--with-mysql
-LIB_DEPENDS+=		mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
 DATABASE=		mysql
 PLIST_SUB+=		MYSQL=""
 PLIST_SUB+=		PGSQL="@comment "
@@ -61,11 +41,6 @@
 	@${ECHO} ""
 	@${ECHO} "You may use the following build options:"
 	@${ECHO} "   By default dbmail uses MySQL backend database."
-	@${ECHO} ""
-	@${ECHO} "      WITH_MYSQL_VER=323   Enable MySQL 3.23 support"
-	@${ECHO} "      WITH_MYSQL_VER=40    Enable MySQL 4.0 support (default)"
-	@${ECHO} "      WITH_MYSQL_VER=41    Enable MySQL 4.1 support"
-	@${ECHO} ""
 	@${ECHO} "   To build dbmail with PostgreSQL as backend database,"
 	@${ECHO} "	define WITH_PGSQL"
 	@${ECHO} ""
@@ -87,4 +62,4 @@
 .endfor
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2003-10-07 01:16:29 UTC
State Changed
From-To: open->feedback

configure doesn't work properly for it: 

checking for ranlib... ranlib 
checking for mysql.h... no 
configure: error:  
Unable to locate mysql.h, try specifying with --with-mysql 
===>  Script "configure" failed unexpectedly. 

Same thing for WITH_PGSQL.
Comment 5 Clement Laforet 2003-10-07 01:30:21 UTC
Hi Edwin !
> 
> 	checking for ranlib... ranlib
> 	checking for mysql.h... no
> 	configure: error: 
> 	  Unable to locate mysql.h, try specifying with --with-mysql
> 	===>  Script "configure" failed unexpectedly.

It's work perfectly for me...
On -current with mysql-3.23.xx
On -stable with mysql-4.0.xx
I'll give a try in a jail

===>  Configuring for dbmail-postgresql-1.1
creating cache ./config.cache

This is dbmail's GNU configure script.
It's going to run a bunch of strange tests to hopefully
make your compile work without much twiddling.

checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking whether gmake sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for ranlib... ranlib
checking for libpq-fe.h... /usr/local/include/libpq-fe.h
checking for PQconnectdb in -lpq... yes
checking for gcc... cc
checking whether the C compiler (cc -O -pipe -march=pentium3 -L/usr/local/lib/ -L/usr/local/lib/postgresql) works... yes
checking whether the C compiler (cc -O -pipe -march=pentium3 -L/usr/local/lib/ -L/usr/local/lib/postgresql) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for working const... yes
checking for inline... inline
updating cache ./config.cache
creating ./config.status
creating Makefile
creating mysql/Makefile
creating pgsql/Makefile

===>  Configuring for dbmail-mysql-1.1
creating cache ./config.cache

This is dbmail's GNU configure script.
It's going to run a bunch of strange tests to hopefully
make your compile work without much twiddling.

checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking whether gmake sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for ranlib... ranlib
checking for mysql.h... /usr/local/include/mysql/mysql.h
checking for mysql_real_connect in -lmysqlclient... yes
checking for gcc... cc
checking whether the C compiler (cc -O -pipe -march=pentium3 -L/usr/local/lib/ -L/usr/local/lib/mysql) works... yes
checking whether the C compiler (cc -O -pipe -march=pentium3 -L/usr/local/lib/ -L/usr/local/lib/mysql) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for working const... yes
checking for inline... inline
updating cache ./config.cache
creating ./config.status
creating Makefile
creating mysql/Makefile
creating pgsql/Makefile
Comment 6 edwin 2003-10-07 01:44:21 UTC
On Tue, Oct 07, 2003 at 02:30:21AM +0200, Clement Laforet wrote:
> Hi Edwin !
> > 
> > 	checking for ranlib... ranlib
> > 	checking for mysql.h... no
> > 	configure: error: 
> > 	  Unable to locate mysql.h, try specifying with --with-mysql
> > 	===>  Script "configure" failed unexpectedly.
> 
> It's work perfectly for me...
> On -current with mysql-3.23.xx
> On -stable with mysql-4.0.xx
> I'll give a try in a jail

It could be because my /usr/local isn't /usr/local but /home/edwin/local.
But if the port respects PREFIX and CFLAGS/LDFLAGS it would go fine.

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |    Weblog: http://www.mavetju.org/weblog/weblog.php
Comment 7 Clement Laforet 2003-10-07 01:57:56 UTC
> > I'll give a try in a jail
> 
> It could be because my /usr/local isn't /usr/local but /home/edwin/local.
> But if the port respects PREFIX and CFLAGS/LDFLAGS it would go fine.

Can you try with this patch please ? (put it in files/patch-configure)

--- configure.orig	Fri Feb  7 20:54:10 2003
+++ configure	Tue Oct  7 02:53:20 2003
@@ -842,19 +842,23 @@
 
 
 mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
-               /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
+               /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
+		$LOCALBASE/lib $PREFIX/lib"
+
 mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
                   /usr/local/include /usr/freeware/include/mysql \
                   /usr/freeware/include $HOME/include $HOME/mysql/include \
-                  $HOME"
+                  $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
 
 pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
-               /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
+               /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
+		$LOCALBASE/lib $PREFIX/lib"
 
 pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
                   /usr/local/include /usr/freeware/include/pgsql \
                   /usr/freeware/include $HOME/include $HOME/pgsql/include \
-		  /usr/local/pgsql/include $HOME"
+		  /usr/local/pgsql/include $HOME \
+		  $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
 
 # Check whether --with-mysql or --without-mysql was given.
 if test "${with_mysql+set}" = set; then
Comment 8 Edwin Groothuis freebsd_committer freebsd_triage 2003-10-07 02:18:00 UTC
State Changed
From-To: feedback->closed

Commited, thanks!
Comment 9 edwin 2003-10-07 02:18:21 UTC
On Tue, Oct 07, 2003 at 02:57:56AM +0200, Clement Laforet wrote:
> 
> > > I'll give a try in a jail
> > 
> > It could be because my /usr/local isn't /usr/local but /home/edwin/local.
> > But if the port respects PREFIX and CFLAGS/LDFLAGS it would go fine.
> 
> Can you try with this patch please ? (put it in files/patch-configure)

Works better!

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |    Weblog: http://www.mavetju.org/weblog/weblog.php