Rip out the configure script parts that try to modify the destination dir.
Let the user override the MySQL username, password and db at build time. Let the user override the vchkpw gid and the vpopmail uid. Bump PORTREVISION. Approved by: nbm (maintainer)
This commit is contained in:
parent
f02cdd3208
commit
0aa41aea19
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=44751
12 changed files with 267 additions and 9 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= vpopmail
|
||||
PORTVERSION= 4.9.10
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.inter7.com/vpopmail/
|
||||
|
||||
|
@ -45,6 +45,11 @@ CONFIGURE_ARGS= --enable-qmail-dir=${QMAIL_DIR} \
|
|||
# APOPFILE - location of apop secrets file
|
||||
# QMAIL_DIR - location of qmail directory
|
||||
# PREFIX - installation area for vpopmail (see comment below)
|
||||
# WITH_MYSQL_USER - the username for connecting to the MySQL server (root)
|
||||
# WITH_MYSQL_PASSWD - the password for connecting to the MySQL server (gipgap)
|
||||
# WITH_MYSQL_DB - the name of the MySQL database to use (vpopmail)
|
||||
# VCHKPW_GID - the group ID of the new vchkpw group (89)
|
||||
# VPOPMAIL_UID - the user ID of the new vpopmail user (89)
|
||||
#
|
||||
|
||||
HARDQUOTA?= 10000000
|
||||
|
@ -112,5 +117,16 @@ CONFIGURE_ARGS+= --enable-default-domain=${DEFAULT_DOMAIN}
|
|||
|
||||
pre-configure:
|
||||
@PKG_PREFIX=${PREFIX}/vpopmail ${PERL5} ${PKGINSTALL}
|
||||
.if defined(WITH_MYSQL)
|
||||
.if defined(WITH_MYSQL_USER)
|
||||
${PERL} -pi -e "s/(#define MYSQL_USER.*)root(.*)/\$$1${WITH_MYSQL_USER}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_PASSWD)
|
||||
${PERL} -pi -e "s/(#define MYSQL_PASSWD.*)gipgap(.*)/\$$1${WITH_MYSQL_PASSWD}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_DB)
|
||||
${PERL} -pi -e "s/(#define MYSQL_DATABASE.*)vpopmail(.*)/\$$1${WITH_MYSQL_DB}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
50
mail/vpopmail-devel/files/patch-configure
Normal file
50
mail/vpopmail-devel/files/patch-configure
Normal file
|
@ -0,0 +1,50 @@
|
|||
--- configure.old Wed Jul 4 17:14:16 2001
|
||||
+++ configure Wed Jul 4 17:14:54 2001
|
||||
@@ -1613,16 +1613,6 @@
|
||||
rm -f vpopusername
|
||||
|
||||
|
||||
-if test ! -d $vpopmaildir/etc
|
||||
-then
|
||||
- mkdir $vpopmaildir/etc
|
||||
- chown $vpopmailuid "$vpopmaildir"/etc
|
||||
- chgrp $vpopmailgid "$vpopmaildir"/etc
|
||||
- chmod 755 "$vpopmaildir"/etc
|
||||
- echo "configure: warning: making a vpopmail etc directory " 1>&2
|
||||
-fi
|
||||
-
|
||||
-
|
||||
open_smtp_cur="$vpopmaildir/etc/open-smtp"
|
||||
open_smtp_tmp="$vpopmaildir/etc/open-smtp.tmp"
|
||||
open_smtp_lok="$vpopmaildir/etc/open-smtp.lock"
|
||||
@@ -1658,7 +1648,6 @@
|
||||
|
||||
if test "$tcpserver_file" = ""
|
||||
then
|
||||
- echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
|
||||
tcpserver_file="$vpopmaildir"/etc/tcp.smtp
|
||||
|
||||
echo "configure: warning: Unable to find your tcpserver relay file." 1>&2
|
||||
@@ -1873,7 +1862,6 @@
|
||||
fi
|
||||
auth_libs="-L$sqllibdir -lmysqlclient -lz"
|
||||
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail -L$sqllibdir -lmysqlclient -lz" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
@@ -2007,14 +1995,12 @@
|
||||
authlib=
|
||||
|
||||
auth_inc="-Icdb"
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
-echo "-I$vpopmaildir/include" > $vpopmaildir/etc/inc_deps
|
||||
|
||||
# Check whether --enable-roaming-users or --disable-roaming-users was given.
|
||||
if test "${enable_roaming_users+set}" = set; then
|
|
@ -8,10 +8,32 @@
|
|||
%gids = ("vchkpw", 89);
|
||||
%uids = ('vpopmail', 89);
|
||||
|
||||
sub checkenv () {
|
||||
my ($u, $g);
|
||||
|
||||
# Users
|
||||
foreach $u (keys %users) {
|
||||
$var = uc($u)."_UID";
|
||||
if (defined($ENV{$var})) {
|
||||
$uids{$u} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
|
||||
# Groups
|
||||
foreach $g (@groups) {
|
||||
$var = uc($g)."_GID";
|
||||
if (defined($ENV{$var})) {
|
||||
$gids{$g} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") {
|
||||
$doguid=1; # Make sure we get the assigned guids.
|
||||
}
|
||||
|
||||
checkenv();
|
||||
|
||||
foreach $group (@groups) {
|
||||
if (! getgrnam ($group)) {
|
||||
do checkrpw; # May exit
|
||||
|
|
|
@ -29,8 +29,6 @@ vpopmail/doc/man_html/vdeluser.html
|
|||
vpopmail/doc/man_html/vpasswd.html
|
||||
vpopmail/doc/man_html/vpopbull.html
|
||||
vpopmail/doc/man_html/vsetuserquota.html
|
||||
vpopmail/etc/inc_deps
|
||||
vpopmail/etc/lib_deps
|
||||
vpopmail/include/config.h
|
||||
vpopmail/include/vauth.h
|
||||
vpopmail/include/vpopmail.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= vpopmail
|
||||
PORTVERSION= 4.9.10
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.inter7.com/vpopmail/
|
||||
|
||||
|
@ -45,6 +45,11 @@ CONFIGURE_ARGS= --enable-qmail-dir=${QMAIL_DIR} \
|
|||
# APOPFILE - location of apop secrets file
|
||||
# QMAIL_DIR - location of qmail directory
|
||||
# PREFIX - installation area for vpopmail (see comment below)
|
||||
# WITH_MYSQL_USER - the username for connecting to the MySQL server (root)
|
||||
# WITH_MYSQL_PASSWD - the password for connecting to the MySQL server (gipgap)
|
||||
# WITH_MYSQL_DB - the name of the MySQL database to use (vpopmail)
|
||||
# VCHKPW_GID - the group ID of the new vchkpw group (89)
|
||||
# VPOPMAIL_UID - the user ID of the new vpopmail user (89)
|
||||
#
|
||||
|
||||
HARDQUOTA?= 10000000
|
||||
|
@ -112,5 +117,16 @@ CONFIGURE_ARGS+= --enable-default-domain=${DEFAULT_DOMAIN}
|
|||
|
||||
pre-configure:
|
||||
@PKG_PREFIX=${PREFIX}/vpopmail ${PERL5} ${PKGINSTALL}
|
||||
.if defined(WITH_MYSQL)
|
||||
.if defined(WITH_MYSQL_USER)
|
||||
${PERL} -pi -e "s/(#define MYSQL_USER.*)root(.*)/\$$1${WITH_MYSQL_USER}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_PASSWD)
|
||||
${PERL} -pi -e "s/(#define MYSQL_PASSWD.*)gipgap(.*)/\$$1${WITH_MYSQL_PASSWD}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_DB)
|
||||
${PERL} -pi -e "s/(#define MYSQL_DATABASE.*)vpopmail(.*)/\$$1${WITH_MYSQL_DB}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
50
mail/vpopmail-stable/files/patch-configure
Normal file
50
mail/vpopmail-stable/files/patch-configure
Normal file
|
@ -0,0 +1,50 @@
|
|||
--- configure.old Wed Jul 4 17:14:16 2001
|
||||
+++ configure Wed Jul 4 17:14:54 2001
|
||||
@@ -1613,16 +1613,6 @@
|
||||
rm -f vpopusername
|
||||
|
||||
|
||||
-if test ! -d $vpopmaildir/etc
|
||||
-then
|
||||
- mkdir $vpopmaildir/etc
|
||||
- chown $vpopmailuid "$vpopmaildir"/etc
|
||||
- chgrp $vpopmailgid "$vpopmaildir"/etc
|
||||
- chmod 755 "$vpopmaildir"/etc
|
||||
- echo "configure: warning: making a vpopmail etc directory " 1>&2
|
||||
-fi
|
||||
-
|
||||
-
|
||||
open_smtp_cur="$vpopmaildir/etc/open-smtp"
|
||||
open_smtp_tmp="$vpopmaildir/etc/open-smtp.tmp"
|
||||
open_smtp_lok="$vpopmaildir/etc/open-smtp.lock"
|
||||
@@ -1658,7 +1648,6 @@
|
||||
|
||||
if test "$tcpserver_file" = ""
|
||||
then
|
||||
- echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
|
||||
tcpserver_file="$vpopmaildir"/etc/tcp.smtp
|
||||
|
||||
echo "configure: warning: Unable to find your tcpserver relay file." 1>&2
|
||||
@@ -1873,7 +1862,6 @@
|
||||
fi
|
||||
auth_libs="-L$sqllibdir -lmysqlclient -lz"
|
||||
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail -L$sqllibdir -lmysqlclient -lz" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
@@ -2007,14 +1995,12 @@
|
||||
authlib=
|
||||
|
||||
auth_inc="-Icdb"
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
-echo "-I$vpopmaildir/include" > $vpopmaildir/etc/inc_deps
|
||||
|
||||
# Check whether --enable-roaming-users or --disable-roaming-users was given.
|
||||
if test "${enable_roaming_users+set}" = set; then
|
|
@ -8,10 +8,32 @@
|
|||
%gids = ("vchkpw", 89);
|
||||
%uids = ('vpopmail', 89);
|
||||
|
||||
sub checkenv () {
|
||||
my ($u, $g);
|
||||
|
||||
# Users
|
||||
foreach $u (keys %users) {
|
||||
$var = uc($u)."_UID";
|
||||
if (defined($ENV{$var})) {
|
||||
$uids{$u} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
|
||||
# Groups
|
||||
foreach $g (@groups) {
|
||||
$var = uc($g)."_GID";
|
||||
if (defined($ENV{$var})) {
|
||||
$gids{$g} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") {
|
||||
$doguid=1; # Make sure we get the assigned guids.
|
||||
}
|
||||
|
||||
checkenv();
|
||||
|
||||
foreach $group (@groups) {
|
||||
if (! getgrnam ($group)) {
|
||||
do checkrpw; # May exit
|
||||
|
|
|
@ -29,8 +29,6 @@ vpopmail/doc/man_html/vdeluser.html
|
|||
vpopmail/doc/man_html/vpasswd.html
|
||||
vpopmail/doc/man_html/vpopbull.html
|
||||
vpopmail/doc/man_html/vsetuserquota.html
|
||||
vpopmail/etc/inc_deps
|
||||
vpopmail/etc/lib_deps
|
||||
vpopmail/include/config.h
|
||||
vpopmail/include/vauth.h
|
||||
vpopmail/include/vpopmail.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= vpopmail
|
||||
PORTVERSION= 4.9.10
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.inter7.com/vpopmail/
|
||||
|
||||
|
@ -45,6 +45,11 @@ CONFIGURE_ARGS= --enable-qmail-dir=${QMAIL_DIR} \
|
|||
# APOPFILE - location of apop secrets file
|
||||
# QMAIL_DIR - location of qmail directory
|
||||
# PREFIX - installation area for vpopmail (see comment below)
|
||||
# WITH_MYSQL_USER - the username for connecting to the MySQL server (root)
|
||||
# WITH_MYSQL_PASSWD - the password for connecting to the MySQL server (gipgap)
|
||||
# WITH_MYSQL_DB - the name of the MySQL database to use (vpopmail)
|
||||
# VCHKPW_GID - the group ID of the new vchkpw group (89)
|
||||
# VPOPMAIL_UID - the user ID of the new vpopmail user (89)
|
||||
#
|
||||
|
||||
HARDQUOTA?= 10000000
|
||||
|
@ -112,5 +117,16 @@ CONFIGURE_ARGS+= --enable-default-domain=${DEFAULT_DOMAIN}
|
|||
|
||||
pre-configure:
|
||||
@PKG_PREFIX=${PREFIX}/vpopmail ${PERL5} ${PKGINSTALL}
|
||||
.if defined(WITH_MYSQL)
|
||||
.if defined(WITH_MYSQL_USER)
|
||||
${PERL} -pi -e "s/(#define MYSQL_USER.*)root(.*)/\$$1${WITH_MYSQL_USER}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_PASSWD)
|
||||
${PERL} -pi -e "s/(#define MYSQL_PASSWD.*)gipgap(.*)/\$$1${WITH_MYSQL_PASSWD}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.if defined(WITH_MYSQL_DB)
|
||||
${PERL} -pi -e "s/(#define MYSQL_DATABASE.*)vpopmail(.*)/\$$1${WITH_MYSQL_DB}\$$2/" ${WRKSRC}/vmysql.h
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
50
mail/vpopmail/files/patch-configure
Normal file
50
mail/vpopmail/files/patch-configure
Normal file
|
@ -0,0 +1,50 @@
|
|||
--- configure.old Wed Jul 4 17:14:16 2001
|
||||
+++ configure Wed Jul 4 17:14:54 2001
|
||||
@@ -1613,16 +1613,6 @@
|
||||
rm -f vpopusername
|
||||
|
||||
|
||||
-if test ! -d $vpopmaildir/etc
|
||||
-then
|
||||
- mkdir $vpopmaildir/etc
|
||||
- chown $vpopmailuid "$vpopmaildir"/etc
|
||||
- chgrp $vpopmailgid "$vpopmaildir"/etc
|
||||
- chmod 755 "$vpopmaildir"/etc
|
||||
- echo "configure: warning: making a vpopmail etc directory " 1>&2
|
||||
-fi
|
||||
-
|
||||
-
|
||||
open_smtp_cur="$vpopmaildir/etc/open-smtp"
|
||||
open_smtp_tmp="$vpopmaildir/etc/open-smtp.tmp"
|
||||
open_smtp_lok="$vpopmaildir/etc/open-smtp.lock"
|
||||
@@ -1658,7 +1648,6 @@
|
||||
|
||||
if test "$tcpserver_file" = ""
|
||||
then
|
||||
- echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
|
||||
tcpserver_file="$vpopmaildir"/etc/tcp.smtp
|
||||
|
||||
echo "configure: warning: Unable to find your tcpserver relay file." 1>&2
|
||||
@@ -1873,7 +1862,6 @@
|
||||
fi
|
||||
auth_libs="-L$sqllibdir -lmysqlclient -lz"
|
||||
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail -L$sqllibdir -lmysqlclient -lz" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
@@ -2007,14 +1995,12 @@
|
||||
authlib=
|
||||
|
||||
auth_inc="-Icdb"
|
||||
- echo "-L$vpopmaildir/lib -lvpopmail" > $vpopmaildir/etc/lib_deps
|
||||
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
-echo "-I$vpopmaildir/include" > $vpopmaildir/etc/inc_deps
|
||||
|
||||
# Check whether --enable-roaming-users or --disable-roaming-users was given.
|
||||
if test "${enable_roaming_users+set}" = set; then
|
|
@ -8,10 +8,32 @@
|
|||
%gids = ("vchkpw", 89);
|
||||
%uids = ('vpopmail', 89);
|
||||
|
||||
sub checkenv () {
|
||||
my ($u, $g);
|
||||
|
||||
# Users
|
||||
foreach $u (keys %users) {
|
||||
$var = uc($u)."_UID";
|
||||
if (defined($ENV{$var})) {
|
||||
$uids{$u} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
|
||||
# Groups
|
||||
foreach $g (@groups) {
|
||||
$var = uc($g)."_GID";
|
||||
if (defined($ENV{$var})) {
|
||||
$gids{$g} = $ENV{$var};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") {
|
||||
$doguid=1; # Make sure we get the assigned guids.
|
||||
}
|
||||
|
||||
checkenv();
|
||||
|
||||
foreach $group (@groups) {
|
||||
if (! getgrnam ($group)) {
|
||||
do checkrpw; # May exit
|
||||
|
|
|
@ -29,8 +29,6 @@ vpopmail/doc/man_html/vdeluser.html
|
|||
vpopmail/doc/man_html/vpasswd.html
|
||||
vpopmail/doc/man_html/vpopbull.html
|
||||
vpopmail/doc/man_html/vsetuserquota.html
|
||||
vpopmail/etc/inc_deps
|
||||
vpopmail/etc/lib_deps
|
||||
vpopmail/include/config.h
|
||||
vpopmail/include/vauth.h
|
||||
vpopmail/include/vpopmail.h
|
||||
|
|
Loading…
Reference in a new issue