Dash:
[t2-trunk.git] / package / mail / ezmlm / ezmlm.conf
blob63725f85cbe991ec31e22d18ffd8c1b3ccbb7a54
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/ezmlm/ezmlm.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 ezmlm_idx_prepatch() {
13         pkg_idx_ver=`echo $ver | sed -n 's,.*idx-\(.*\),\1,p'`
14         pkg_idx_src=`match_source_file -p ezmlm-idx-$pkg_idx_ver ezmlm`
16         # tempdir
17         pkg_idx_tempdir=`mktemp -d`
19         # extract ezmlm-idx sources to temp directory
20         tar -C $pkg_idx_tempdir $taropt $pkg_idx_src
22         # directory name of extracted sources
23         pkg_idx_tempsrc="$pkg_idx_tempdir/ezmlm-idx-$pkg_idx_ver"
24         # original idx patch distributed with the sources
25         pkg_idx_srcpatch="$pkg_idx_tempsrc/idx.patch"
26         # patch file we'll include
27         pkg_idx_patch="$pkg_idx_tempdir/ezmlm-idx.patch"
29         # fix original idx.patch and include it as ezmlm-idx.patch
30         cat $pkg_idx_srcpatch | sed \
31                 -e "/^diff/d" \
32                 -e "s/^\(---\|+++\) /\1 \.\//g" > $pkg_idx_patch
34         var_append patchfiles ' ' "$pkg_idx_patch"
36         # copy content of ezmlm-idx tarball to ezmlm builddir
37         cp -av $pkg_idx_tempsrc/* $builddir/$xsrcdir
40 ezmlm_idx_sub_db_conf() {
41         echo_status "Configuring ezmlm to use $SDECFG_PKG_EZMLM_SUB for storing subscribers"
42         echo "-I$root$sub_incdir" > sub_$sub_db/conf-sqlcc
43         echo "-L$root$sub_libdir $sub_db_ld" > sub_$sub_db/conf-sqlld
44         sed -i "s/^std/$sub_db/" conf-sub
47 ezmlm_conf() {
48         pkgprefix -t qmail
50         echo $bindir > conf-bin
51         echo $mandir > conf-man
53         echo /$( pkgprefix qmail ) > conf-qmail
56 case "$SDECFG_PKG_EZMLM_SUB" in
57         postgresql)     
58                 pkgprefix -t postgresql
59                 sub_db="pgsql"
60                 sub_db_ld="-lpq"
61                 sub_incdir="$( pkgprefix includedir postgresql )"
62                 sub_libdir="$( pkgprefix libdir postgresql )"
63                 hook_add preconf 5 "ezmlm_idx_sub_db_conf"
64                 ;;
65         mysql)
66                 pkgprefix -t mysql
67                 sub_db="mysql"
68                 sub_db_ld="-lmysqlclient"
69                 sub_incdir="$( pkgprefix includedir mysql )/mysql"
70                 sub_libdir="$( pkgprefix libdir mysql )/mysql"
71                 hook_add preconf 5 "ezmlm_idx_sub_db_conf"
72                 ;;
73 esac
75 hook_add prepatch 5 "ezmlm_idx_prepatch"
76 hook_add preconf 5 'ezmlm_conf'
78 makeinstopt="$makeopt setup"