1 |
commit: f3ab3bb6a36ea856741f7cd294beefcb4b04b1d1 |
2 |
Author: Chris Mayo <aklhfex <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 23 16:22:40 2016 +0000 |
4 |
Commit: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 25 21:32:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3ab3bb6 |
7 |
|
8 |
net-mail/dbmail: Migrate to /run and EAPI 6 |
9 |
|
10 |
Also: |
11 |
- Install man pages |
12 |
- Remove sqlite USE flag |
13 |
- Minor repoman fixes and other tidy-ups |
14 |
|
15 |
Gentoo-Bug: https://bugs.gentoo.org/529504 |
16 |
Gentoo-Bug: https://bugs.gentoo.org/529506 |
17 |
|
18 |
Signed-off-by: Thomas Raschbacher <lordvan <AT> gentoo.org> |
19 |
|
20 |
net-mail/dbmail/dbmail-3.2.3-r1.ebuild | 137 +++++++++++++++++++++++++++++++++ |
21 |
1 file changed, 137 insertions(+) |
22 |
|
23 |
diff --git a/net-mail/dbmail/dbmail-3.2.3-r1.ebuild b/net-mail/dbmail/dbmail-3.2.3-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000..9e5eb8f |
26 |
--- /dev/null |
27 |
+++ b/net-mail/dbmail/dbmail-3.2.3-r1.ebuild |
28 |
@@ -0,0 +1,137 @@ |
29 |
+# Copyright 1999-2016 Gentoo Foundation |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+# $Id$ |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+inherit versionator user |
36 |
+ |
37 |
+DESCRIPTION="Enables storage of mail messages in a relational database" |
38 |
+HOMEPAGE="http://www.dbmail.org/" |
39 |
+SRC_URI="http://www.dbmail.org/download/$(get_version_component_range 1-2)/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
+IUSE="ldap sieve ssl static" |
45 |
+ |
46 |
+DEPEND="dev-db/libzdb |
47 |
+ sieve? ( >=mail-filter/libsieve-2.2.1 ) |
48 |
+ ldap? ( >=net-nds/openldap-2.3.33 ) |
49 |
+ app-text/asciidoc |
50 |
+ app-text/xmlto |
51 |
+ app-crypt/mhash |
52 |
+ sys-libs/zlib |
53 |
+ dev-libs/gmime:2.6 |
54 |
+ >=dev-libs/glib-2.16 |
55 |
+ dev-libs/libevent |
56 |
+ ssl? ( dev-libs/openssl )" |
57 |
+RDEPEND="${DEPEND}" |
58 |
+ |
59 |
+DOCS="AUTHORS README.md INSTALL THANKS UPGRADING" |
60 |
+ |
61 |
+pkg_setup() { |
62 |
+ enewgroup dbmail |
63 |
+ enewuser dbmail -1 -1 /var/lib/dbmail dbmail |
64 |
+} |
65 |
+ |
66 |
+src_configure() { |
67 |
+ local myconf="" |
68 |
+ use ldap && myconf=${myconf}" --with-auth-ldap" |
69 |
+ |
70 |
+ econf \ |
71 |
+ --enable-manpages \ |
72 |
+ --sysconfdir=/etc/dbmail \ |
73 |
+ $(use_enable static) \ |
74 |
+ $(use_with sieve) \ |
75 |
+ ${myconf} |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ default |
80 |
+ |
81 |
+ docompress -x /usr/share/doc/${PF}/sql |
82 |
+ dodoc -r sql |
83 |
+ dodoc -r test-scripts |
84 |
+ dodoc -r contrib |
85 |
+ ## TODO: install other contrib stuff |
86 |
+ |
87 |
+ sed -i -e "s:nobody:dbmail:" dbmail.conf || die |
88 |
+ sed -i -e "s:nogroup:dbmail:" dbmail.conf || die |
89 |
+ sed -i -e "s:/var/run:/run/dbmail:" dbmail.conf || die |
90 |
+ |
91 |
+ insinto /etc/dbmail |
92 |
+ newins dbmail.conf dbmail.conf.dist |
93 |
+ |
94 |
+ # change config path to our default and use the conf.d and init.d files from the contrib dir |
95 |
+ sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
96 |
+ #sed -i -e "s:exit 0:return 1:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
97 |
+ #sed -i -e "s:/var/run:/var/run/dbmail:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
98 |
+ #newconfd contrib/startup-scripts/gentoo/conf.d-dbmail dbmail |
99 |
+ #newinitd contrib/startup-scripts/gentoo/init.d-dbmail dbmail |
100 |
+ # use custom init scripts until updated in upstream contrib |
101 |
+ newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd |
102 |
+ newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd |
103 |
+ newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d |
104 |
+ newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved |
105 |
+ sed -i -e "s:/var/run:/run:" "${D}"/etc/init.d/dbmail-* || die |
106 |
+ |
107 |
+ dobin contrib/mailbox2dbmail/mailbox2dbmail |
108 |
+ doman contrib/mailbox2dbmail/mailbox2dbmail.1 |
109 |
+ |
110 |
+ # ldap schema |
111 |
+ if use ldap; then |
112 |
+ insinto /etc/openldap/schema |
113 |
+ doins "${S}/dbmail.schema" |
114 |
+ fi |
115 |
+ |
116 |
+ keepdir /var/lib/dbmail |
117 |
+ fperms 750 /var/lib/dbmail |
118 |
+ fowners dbmail:dbmail /var/lib/dbmail |
119 |
+ # create this through init-scripts instead of at install time (bug #455002) |
120 |
+ #keepdir /run/dbmail |
121 |
+ #fowners dbmail:dbmail /run/dbmail |
122 |
+} |
123 |
+ |
124 |
+pkg_postinst() { |
125 |
+ elog "Please read the INSTALL file in /usr/share/doc/${PF}/" |
126 |
+ elog "for remaining instructions on setting up dbmail users and " |
127 |
+ elog "for finishing configuration to connect to your MTA and " |
128 |
+ elog "to connect to your db." |
129 |
+ echo |
130 |
+ elog "DBMail requires either SQLite, PostgreSQL or MySQL." |
131 |
+ elog "Database schemes can be found in /usr/share/doc/${PF}/" |
132 |
+ elog "You will also want to follow the installation instructions" |
133 |
+ elog "on setting up the maintenance program to delete old messages." |
134 |
+ elog "Don't forget to edit /etc/dbmail/dbmail.conf as well." |
135 |
+ echo |
136 |
+ elog "For regular maintenance, add this to crontab:" |
137 |
+ elog "0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1" |
138 |
+ echo |
139 |
+ elog "Please make sure to run etc-update." |
140 |
+ elog "If you get an error message about plugins not found" |
141 |
+ elog "please add the library_directory configuration switch to" |
142 |
+ elog "dbmail.conf and set it to the correct path" |
143 |
+ elog "(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)" |
144 |
+ elog "A sample can be found in dbmail.conf.dist after etc-update." |
145 |
+ echo |
146 |
+ elog "We are now using the init script from upstream." |
147 |
+ elog "Please edit /etc/conf.d/dbmail to set which services to start" |
148 |
+ elog "and delete /etc/init.d/dbmail-* when you are done. (don't" |
149 |
+ elog "forget to rc-update del dbmail-* first)" |
150 |
+ echo |
151 |
+ elog "Changed pid directory to /run/dbmail (see" |
152 |
+ elog "http://www.dbmail.org/mantis/view.php?id=949 for details)" |
153 |
+ echo |
154 |
+ ewarn "The database config has changed to support libzdb db URI" |
155 |
+ ewarn "Please check the documentation (or Bug #479664)" |
156 |
+ echo |
157 |
+ ewarn "The database schema has changed since 3.0.x make sure" |
158 |
+ ewarn "to run the migration script" |
159 |
+ echo |
160 |
+ ewarn "Please be aware, that the single init-script for all services" |
161 |
+ ewarn "has been replaced with seperate init scripts for the individual services." |
162 |
+ ewarn "Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update" |
163 |
+ ewarn "and remove dbmail if you want to take advantage of this change." |
164 |
+ echo |
165 |
+} |