1 |
eras 13/03/01 10:28:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: courier-authlib-0.65.0-r3.ebuild |
5 |
Log: |
6 |
Fix building with -sqlite mysql - bug #459772 |
7 |
|
8 |
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F) |
9 |
|
10 |
Revision Changes Path |
11 |
1.145 net-libs/courier-authlib/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/courier-authlib/ChangeLog?rev=1.145&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/courier-authlib/ChangeLog?rev=1.145&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/courier-authlib/ChangeLog?r1=1.144&r2=1.145 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v |
20 |
retrieving revision 1.144 |
21 |
retrieving revision 1.145 |
22 |
diff -u -r1.144 -r1.145 |
23 |
--- ChangeLog 25 Feb 2013 10:53:32 -0000 1.144 |
24 |
+++ ChangeLog 1 Mar 2013 10:28:40 -0000 1.145 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-libs/courier-authlib |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.144 2013/02/25 10:53:32 eras Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.145 2013/03/01 10:28:40 eras Exp $ |
30 |
+ |
31 |
+*courier-authlib-0.65.0-r3 (01 Mar 2013) |
32 |
+ |
33 |
+ 01 Mar 2013; Eray Aslan <eras@g.o> +courier-authlib-0.65.0-r3.ebuild, |
34 |
+ files/courier-authlib-0.65.0-sqlite.patch: |
35 |
+ Fix building with -sqlite mysql - bug #459772 |
36 |
|
37 |
25 Feb 2013; Eray Aslan <eras@g.o> courier-authlib-0.65.0-r2.ebuild: |
38 |
Do not require mysql for sqlite |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-libs/courier-authlib/courier-authlib-0.65.0-r3.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.65.0-r3.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.65.0-r3.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: courier-authlib-0.65.0-r3.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2013 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.65.0-r3.ebuild,v 1.1 2013/03/01 10:28:40 eras Exp $ |
52 |
|
53 |
EAPI=4 |
54 |
inherit autotools eutils flag-o-matic multilib user |
55 |
|
56 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
57 |
|
58 |
DESCRIPTION="Courier authentication library." |
59 |
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
60 |
HOMEPAGE="http://www.courier-mta.org/" |
61 |
LICENSE="GPL-3" |
62 |
SLOT="0" |
63 |
IUSE="berkdb crypt debug gdbm ldap mysql pam postgres sqlite static-libs vpopmail" |
64 |
|
65 |
RESTRICT="userpriv |
66 |
!berkdb? ( test )" |
67 |
|
68 |
RDEPEND="gdbm? ( sys-libs/gdbm ) |
69 |
!gdbm? ( sys-libs/db )" |
70 |
|
71 |
DEPEND="${RDEPEND} |
72 |
>=dev-libs/openssl-0.9.6 |
73 |
ldap? ( >=net-nds/openldap-1.2.11 ) |
74 |
mysql? ( virtual/mysql ) |
75 |
pam? ( virtual/pam ) |
76 |
postgres? ( >=dev-db/postgresql-base-8.4 ) |
77 |
sqlite? ( dev-db/sqlite:3 )" |
78 |
|
79 |
# vpopmail support removed upstream |
80 |
REQUIRED_USE="( !vpopmail )" |
81 |
|
82 |
pkg_setup() { |
83 |
enewuser mail -1 -1 /var/spool/mail |
84 |
|
85 |
if ! has_version 'dev-tcltk/expect' ; then |
86 |
ewarn 'The dev-tcltk/expect package is not installed.' |
87 |
ewarn 'Without it, you will not be able to change system login passwords.' |
88 |
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' |
89 |
ewarn 'and others) will work just fine.' |
90 |
fi |
91 |
} |
92 |
|
93 |
src_prepare() { |
94 |
# move local macro to m4 and run eautoreconf |
95 |
mkdir "${S}/m4" || die |
96 |
sed -n -e '/# AC_PROG_SYSCONFTOOL/,+33 p' "${S}"/aclocal.m4 > \ |
97 |
m4/sysconftool.m4 || die |
98 |
sed -i -e '/^SUBDIRS/i ACLOCAL_AMFLAGS = -I m4' "${S}"/Makefile.am || die |
99 |
epatch "${FILESDIR}/${P}-sqlite.patch" |
100 |
eautoreconf |
101 |
} |
102 |
|
103 |
src_configure() { |
104 |
filter-flags -fomit-frame-pointer |
105 |
local myconf |
106 |
if use berkdb ; then |
107 |
if use gdbm ; then |
108 |
ewarn "Both gdbm and berkdb selected. Using gdbm." |
109 |
else |
110 |
myconf="--with-db=db" |
111 |
fi |
112 |
fi |
113 |
use gdbm && myconf="--with-db=gdbm" |
114 |
use debug && myconf+=" debug=true" |
115 |
use sqlite && myconf+=" --with-sqlite-libs" |
116 |
|
117 |
econf \ |
118 |
--sysconfdir=/etc/courier \ |
119 |
--datadir=/usr/share/courier \ |
120 |
--libexecdir=/usr/$(get_libdir)/courier \ |
121 |
--localstatedir=/var/lib/courier \ |
122 |
--sharedstatedir=/var/lib/courier/com \ |
123 |
--with-authdaemonvar=/var/lib/courier/authdaemon \ |
124 |
--with-authshadow \ |
125 |
--without-redhat \ |
126 |
--with-mailuser=mail \ |
127 |
--with-mailgroup=mail \ |
128 |
--cache-file="${S}/configuring.cache" \ |
129 |
$(use_with pam authpam) \ |
130 |
$(use_with ldap authldap) \ |
131 |
$(use_with mysql authmysql) \ |
132 |
$(use_with postgres authpgsql) \ |
133 |
$(use_with sqlite authsqlite) \ |
134 |
${myconf} |
135 |
} |
136 |
|
137 |
orderfirst() { |
138 |
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" |
139 |
if [[ -e "${file}" ]] ; then |
140 |
orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" |
141 |
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" |
142 |
sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die |
143 |
fi |
144 |
} |
145 |
|
146 |
finduserdb() { |
147 |
for dir in \ |
148 |
/etc/courier/authlib /etc/courier /etc/courier-imap \ |
149 |
/usr/lib/courier/etc /usr/lib/courier-imap/etc \ |
150 |
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ |
151 |
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ |
152 |
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do |
153 |
if [[ -e "${dir}/userdb" ]] ; then |
154 |
einfo "Found userdb at: ${dir}/userdb" |
155 |
cp -f "${dir}/userdb" "${D}/etc/courier/authlib/" || die |
156 |
chmod go-rwx "${D}/etc/courier/authlib/userdb" || die |
157 |
continue |
158 |
fi |
159 |
done |
160 |
} |
161 |
|
162 |
src_install() { |
163 |
diropts -o mail -g mail |
164 |
dodir /etc/courier |
165 |
keepdir /var/lib/courier/authdaemon |
166 |
keepdir /etc/courier/authlib |
167 |
emake DESTDIR="${D}" install |
168 |
[[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb |
169 |
emake DESTDIR="${D}" install-configure |
170 |
rm -f "${D}"/etc/courier/authlib/*.bak |
171 |
chown mail:mail "${D}"/etc/courier/authlib/* || die |
172 |
for y in "${D}"/etc/courier/authlib/*.dist ; do |
173 |
[[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" |
174 |
done |
175 |
use pam && orderfirst authdaemonrc authmodulelist authpam |
176 |
use ldap && orderfirst authdaemonrc authmodulelist authldap |
177 |
use sqlite && orderfirst authdaemonrc authmodulelist authsqlite |
178 |
use postgres && orderfirst authdaemonrc authmodulelist authpgsql |
179 |
use mysql && orderfirst authdaemonrc authmodulelist authmysql |
180 |
dodoc AUTHORS ChangeLog* INSTALL NEWS README |
181 |
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html |
182 |
if use mysql ; then |
183 |
dodoc README.authmysql.myownquery |
184 |
dohtml README.authmysql.html |
185 |
fi |
186 |
if use postgres ; then |
187 |
dohtml README.authpostgres.html README.authmysql.html |
188 |
fi |
189 |
if use ldap ; then |
190 |
dodoc README.ldap |
191 |
dodir /etc/openldap/schema |
192 |
cp -f authldap.schema "${D}/etc/openldap/schema/" || die |
193 |
fi |
194 |
if use sqlite ; then |
195 |
dohtml README.authsqlite.html README.authmysql.html |
196 |
fi |
197 |
newinitd "${FILESDIR}/${PN}-r1" "${PN}" |
198 |
|
199 |
use static-libs || find "${D}" -name "*.a" -delete |
200 |
} |
201 |
|
202 |
pkg_postinst() { |
203 |
if [[ -e /etc/courier/authlib/userdb ]] ; then |
204 |
einfo "Running makeuserdb ..." |
205 |
chmod go-rwx /etc/courier/authlib/userdb || die |
206 |
makeuserdb |
207 |
fi |
208 |
|
209 |
# Suggest cleaning out the following old files |
210 |
list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")" |
211 |
if [[ ! -z "${list}" ]] ; then |
212 |
ewarn "Courier authentication files are now in /etc/courier/authlib/" |
213 |
elog "The following files are no longer needed and can likely be removed:" |
214 |
elog " rm $(echo \"${list}\")" |
215 |
fi |
216 |
} |