[tokyocabinet] Updated (1.2.6 -> 1.2.7)
[opensde-package-nopast.git] / mail / ezmlm / ezmlm.conf
blobb2bd1b6f4e727281a99f6ec079e75f7bf98e8204
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../ezmlm/ezmlm.conf
5 # Copyright (C) 2007 The OpenSDE Project
6 # Copyright (C) 2004 - 2006 The T2 SDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 ezmlm_idx_prepatch() {
17         pkg_idx_ver=`echo $ver | sed -n 's,.*idx-\(.*\),\1,p'`
18         pkg_idx_src=`match_source_file -p ezmlm-idx-$pkg_idx_ver ezmlm`
20         # tempdir
21         pkg_idx_tempdir=`mktemp -d`
23         # extract ezmlm-idx sources to temp directory
24         tar -C $pkg_idx_tempdir $taropt $pkg_idx_src
26         # directory name of extracted sources
27         pkg_idx_tempsrc="$pkg_idx_tempdir/ezmlm-idx-$pkg_idx_ver"
28         # original idx patch distributed with the sources
29         pkg_idx_srcpatch="$pkg_idx_tempsrc/idx.patch"
30         # patch file we'll include
31         pkg_idx_patch="$pkg_idx_tempdir/ezmlm-idx.patch"
33         # fix original idx.patch and include it as ezmlm-idx.patch
34         cat $pkg_idx_srcpatch | sed \
35                 -e "/^diff/d" \
36                 -e "s/^\(---\|+++\) /\1 \.\//g" > $pkg_idx_patch
38         var_append patchfiles ' ' "$pkg_idx_patch"
40         # copy content of ezmlm-idx tarball to ezmlm builddir
41         cp -av $pkg_idx_tempsrc/* $builddir/$xsrcdir
44 ezmlm_idx_sub_db_conf() {
45         echo_status "Configuring ezmlm to use $SDECFG_PKG_EZMLM_SUB for storing subscribers"
46         echo "-I$root/$sub_incdir" > sub_$sub_db/conf-sqlcc
47         echo "-L$root/$sub_libdir $sub_db_ld" > sub_$sub_db/conf-sqlld
48         sed -i "s/^std/$sub_db/" conf-sub
52 ezmlm_conf() {
53         pkgprefix -t qmail
55         echo $bindir > conf-bin
56         echo $mandir > conf-man
58         echo /$( pkgprefix qmail ) > conf-qmail
62 case "$SDECFG_PKG_EZMLM_SUB" in
63         postgresql)
64                 pkgprefix -t postgresql
65                 sub_db="pgsql"
66                 sub_db_ld="-lpq"
67                 sub_incdir="$( pkgprefix includedir postgresql )"
68                 sub_libdir="$( pkgprefix libdir postgresql )"
69                 hook_add preconf 5 "ezmlm_idx_sub_db_conf"
70                 ;;
71         mysql)
72                 pkgprefix -t mysql
73                 sub_db="mysql"
74                 sub_db_ld="-lmysqlclient"
75                 sub_incdir="$( pkgprefix includedir mysql )/mysql"
76                 sub_libdir="$( pkgprefix libdir mysql )/mysql"
77                 hook_add preconf 5 "ezmlm_idx_sub_db_conf"
78                 ;;
79 esac
82 hook_add prepatch 5 "ezmlm_idx_prepatch"
83 hook_add preconf 5 'ezmlm_conf'
85 makeinstopt="$makeopt setup"