summaryrefslogtreecommitdiff
path: root/packages/mail-filter
diff options
context:
space:
mode:
Diffstat (limited to 'packages/mail-filter')
-rw-r--r--packages/mail-filter/dcc/dcc.exlib75
1 files changed, 36 insertions, 39 deletions
diff --git a/packages/mail-filter/dcc/dcc.exlib b/packages/mail-filter/dcc/dcc.exlib
index 895a34a..e644730 100644
--- a/packages/mail-filter/dcc/dcc.exlib
+++ b/packages/mail-filter/dcc/dcc.exlib
@@ -8,59 +8,56 @@ DOWNLOADS="http://www.rhyolite.com/anti-spam/dcc/source/old/${PNV}.tar.Z"
LICENCES="DCC GPL-2"
SLOT="0"
+export_exlib_phases src_configure src_prepare src_install
+
MYOPTIONS="
cgi
milter
"
DEPENDENCIES="
- build:
- sys-apps/sed
build+run:
milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
"
-DEFAULT_SRC_CONFIGURE_PARAMS=(
- --hates=build
- --hates=host
- --hates=prefix
- --hates=sbindir
- --hates=libdir
- --hates=datadir
- --hates=datarootdir
- --hates=docdir
- --hates=infodir
- --hates=sysconfdir
- --hates=localstatedir
- --hates=disable-dependency-tracking
- --hates=disable-silent-rules
- --hates=enable-fast-install
- --homedir=/var/dcc
- --mandir=/usr/share/man
- --with-updatedcc_pfile=/var/dcc/updatecc.pfile
- --with-DDC-MD5
- --with-uid=root
- --enable-server
- --enable-dccifd
- --with-rundir=/var/run/dcc
- --with-db-memory=64
- --with-max-db-mem=128
- --with-max-log-size=0
- --enable-ipv6
-)
-
-DEFAULT_SRC_CONFIGURE_OPTION_WITHS=(
- 'cgi cgibin /var/www/localhost/cgi-bin/dcc'
- 'milter sendmail'
-)
-
-DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=(
- 'milter dccm'
-)
+dcc_src_prepare(){
+ default
+ edo sed -e "s/\/usr\/local\/bin/usr\/$(exhost --target)\/bin/g" -i "${WORK}"/configure
+ edo sed -e "s/exec_prefix=NONE/exec_prefix=\/usr\/$(exhost --target)/g" -i "${WORK}"/configure
+ edo sed -e "s/libexecdir='${exec_prefix}\/libexec'/libexecdir='\/usr\/$(exhost --target)\/libexec'/g" -i "${WORK}"/configure
+}
+
+dcc_src_configure(){
+ local params=(
+ "--homedir=${IMAGE}/var/dcc"
+ "--mandir=${IMAGE}/usr/share/man"
+ "--bindir=${IMAGE}/usr/$(exhost --target)/bin"
+ "--libexecdir=${IMAGE}/usr/$(exhost --target)/libexec"
+ "--with-updatedcc_pfile=${IMAGE}/var/dcc/updatecc.pfile"
+ "--with-DDC-MD5"
+ "--with-uid=root"
+ "--enable-server"
+ "--enable-dccifd"
+ "--with-rundir=${IMAGE}/var/run/dcc"
+ "--with-db-memory=64"
+ "--with-max-db-mem=128"
+ "--with-max-log-size=0"
+ "--enable-ipv6"
+ )
+ option cgi && params+=("--with-cgibin=${IMAGE}/var/www/localhost/cgi-bin/dcc") || params+=("--without-cgibin")
+ option milter && params+=("--with-sendmail" "--enable-dccm") || params+=("--without-sendmail" "--disable-dccm")
+ DCC_MANDIR="${IMAGE}"/usr/share/man DCC_HOMEDIR="${IMAGE}"/var/dcc ./configure "${params[@]}"
+}
DEFAULT_SRC_COMPILE_PARAMS=(
DESTDIR="${IMAGE}"
DCC_BINDIR="${IMAGE}"/usr/$(exhost --target)/bin
MANDIR="${IMAGE}"/usr/share/man
+ DCC_MANDIR="${IMAGE}"/usr/share/man
DCC_HOMEDIR="${IMAGE}"/var/dcc
)
+
+dcc_src_install(){
+ default
+ keepdir /var/dcc/log
+}