mail-filter/sqlgrey: Upgrade to 1.8.0, EAPI=7, GLEP-81
authorPhilippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
Sun, 20 Oct 2019 11:47:54 +0000 (07:47 -0400)
committerMichał Górny <mgorny@gentoo.org>
Wed, 8 Jan 2020 13:58:05 +0000 (14:58 +0100)
Also removed pkg_config() - it's not worth the maint. overhead for a
package aimed at mail admins.

Closes: https://bugs.gentoo.org/354869
Closes: https://github.com/gentoo/gentoo/pull/13361
Bug: https://bugs.gentoo.org/696252
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
acct-group/sqlgrey/metadata.xml [new file with mode: 0644]
acct-group/sqlgrey/sqlgrey-0.ebuild [new file with mode: 0644]
acct-user/sqlgrey/metadata.xml [new file with mode: 0644]
acct-user/sqlgrey/sqlgrey-0.ebuild [new file with mode: 0644]
mail-filter/sqlgrey/Manifest
mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch [new file with mode: 0644]
mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild [new file with mode: 0644]

diff --git a/acct-group/sqlgrey/metadata.xml b/acct-group/sqlgrey/metadata.xml
new file mode 100644 (file)
index 0000000..265493e
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>gentoo_bugs_peep@parallaxshift.com</email>
+    <name>Philippe Chaintreuil</name>
+  </maintainer>
+
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+</pkgmetadata>
diff --git a/acct-group/sqlgrey/sqlgrey-0.ebuild b/acct-group/sqlgrey/sqlgrey-0.ebuild
new file mode 100644 (file)
index 0000000..10df6a2
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-group
+
+DESCRIPTION="Group for SQLGrey"
+ACCT_GROUP_ID=336
diff --git a/acct-user/sqlgrey/metadata.xml b/acct-user/sqlgrey/metadata.xml
new file mode 100644 (file)
index 0000000..265493e
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>gentoo_bugs_peep@parallaxshift.com</email>
+    <name>Philippe Chaintreuil</name>
+  </maintainer>
+
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+</pkgmetadata>
diff --git a/acct-user/sqlgrey/sqlgrey-0.ebuild b/acct-user/sqlgrey/sqlgrey-0.ebuild
new file mode 100644 (file)
index 0000000..a7c27f1
--- /dev/null
@@ -0,0 +1,14 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="User for SQLGrey"
+
+ACCT_USER_ID=336
+ACCT_USER_GROUPS=( sqlgrey )
+ACCT_USER_HOME="/var/spool/sqlgrey"
+
+acct-user_add_deps
index 60f690c39c18b24587a1f13b394dcde26c5411d5..a1d23dbdd3b628c9ababc2be5c202171c4214829 100644 (file)
@@ -1 +1,2 @@
 DIST sqlgrey-1.7.6.tar.bz2 63738 BLAKE2B 7835079f3f220c2894781cb1ba8d1cac66f46e9fad7f17bfc0f1f7e2cfe1b1b05664179abacb873acf1829114093c48764c34e1a0a3128503f8e3f134dd0772d SHA512 62822d808aa5991a8d29f455be933cf782c9d5232b63bd1f357093a06982474018fb7a02dedf29274d8b7e9f12525063e6af744efceecf420cd01e74f561aa81
+DIST sqlgrey-1.8.0.tar.gz 69476 BLAKE2B f48aa9e41a988338a817026fbf022e145922db0bad9983e4d7cde7bc621560ce6189e494cfba5dd5f48ba4ff30e47686c54298f9a006b8fcc2b27444e102b0d1 SHA512 97ab057bf7111159166a6963d5948c10468731730136ddca6449d2d629f39235c09d00497a52408bb87057905c1bf43bc064571ee6302d7f1f8c6408af82d044
diff --git a/mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch b/mail-filter/sqlgrey/files/sqlgrey-1.8.0-init-openrc.patch
new file mode 100644 (file)
index 0000000..aa15605
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/init/sqlgrey.gentoo      2007-05-12 11:12:12.000000000 +0200
++++ b/init/sqlgrey.gentoo      2007-05-12 12:05:52.491468250 +0200
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2004 Lionel Bouton
+ # Distributed under the terms of the GNU General Public License v2
diff --git a/mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild b/mail-filter/sqlgrey/sqlgrey-1.8.0.ebuild
new file mode 100644 (file)
index 0000000..958ff32
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="A postfix policy service implementing a grey-listing policy"
+HOMEPAGE="http://sqlgrey.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/sqlgrey/sqlgrey-1.8%20%28stable%29/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~sparc ~x86"
+IUSE="mysql postgres +sqlite"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+RDEPEND="acct-user/sqlgrey
+       dev-lang/perl
+       dev-perl/DBI
+       dev-perl/Date-Calc
+       dev-perl/Net-Server
+       virtual/mailx
+       mysql? ( dev-perl/DBD-mysql )
+       postgres? ( dev-perl/DBD-Pg )
+       sqlite? ( dev-perl/DBD-SQLite )"
+DEPEND="${RDEPEND}
+       sys-apps/sed"
+
+DOCS=( HOWTO FAQ README README.OPTINOUT README.PERF TODO Changelog )
+PATCHES=(
+       "${FILESDIR}/sqlgrey-1.8.0-init-openrc.patch"
+)
+
+src_install () {
+       emake gentoo-install ROOTDIR="${D}"
+       einstalldocs
+
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+       elog "To make use of greylisting, please update your postfix config."
+       elog
+       elog "Put something like this in ${ROOT}/etc/postfix/main.cf:"
+       elog "    smtpd_recipient_restrictions ="
+       elog "           ..."
+       elog "           check_policy_service inet:127.0.0.1:2501"
+       elog
+       elog "Remember to restart Postfix after that change. Also remember"
+       elog "to make the daemon start durig boot:"
+       elog "  rc-update add sqlgrey default"
+       elog
+       ewarn "Read the documentation for more info (perldoc sqlgrey) or the"
+       ewarn "included HOWTO in ${ROOT}/usr/share/doc/${PF}/"
+       ewarn
+       ewarn "If you are using MySQL >= 4.1 use \"latin1\" as charset for"
+       ewarn "the SQLgrey db"
+}