--- /dev/null
+# Maintainer: Vincent Dahmen <wahrwolf[ät]wolfpit[dot]net>
+
+pkgname=opensmtpd-extras
+pkgver=opensmtpd.extras.201601072302.r224.g5bffdb3
+pkgrel=1
+pkgdesc="EXPERIMENTAL filters, tables, queues, etc. for OpenSMTPd"
+arch=('i686' 'x86_64')
+url="https://github.com/OpenSMTPD/OpenSMTPD-extras"
+arch=('any')
+depends=('opensmtpd')
+makedepends=('python' 'python2' 'lua' 'perl' 'libmariadbclient' 'postgresql-libs' 'hiredis' 'sqlite' 'libasr' 'openssl')
+optdepends=('python2: python support for filters, tables, scheduler, and queues'
+ 'clamav: clamav filters'
+ 'lua: lua support for filters'
+ 'perl: perl support for filters'
+ 'spamassassin: spamassassin filters'
+ 'libmariadbclient: mysql support for tables'
+ 'postgresql-libs: postgresql support for tables'
+ 'hiredis: redis support for tables'
+ 'sqlite: sqlite support for tables')
+source=(${pkgname}::git+https://github.com/OpenSMTPD/OpenSMTPD-extras)
+sha256sums=('SKIP')
+
+prepare() {
+#
+ cd "$pkgname"
+
+ # Fix for python2
+# sed -i 's/python-config/python2-config/g' configure.ac
+
+ # Fix config file locations
+# sed -i 's;/etc/mail/filter-regex.conf;/etc/smtpd/filter-regex.conf;g' "extras/wip/filters/filter-regex/filter_regex.c"
+
+}
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+
+}
+
+check() {
+ cd "$pkgname"
+ make check
+}
+
+
+build(){
+ cd ${pkgname}
+ sh bootstrap
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/smtpd \
+ --libexecdir=/usr/lib/smtpd \
+ --with-queue-null \
+ --with-table-mysql \
+ --with-table-passwd \
+ --with-table-postgres \
+ --with-table-redis \
+ --with-table-socketmap \
+ --with-table-sqlite \
+ --with-filter-regex \
+ --with-filter-python
+# --with-table-python
+# --with-queue-python \
+# --with-scheduler-python \
+ make
+}
+
+package() {
+ cd "$pkgname"
+ make DESTDIR="$pkgdir/" install
+
+# install -Dm644 "extras/wip/filters/filter-regex/filter-regex.conf" "$pkgdir/etc/smtpd/filter-regex.conf"
+# install -Dm644 "extras/wip/queues/queue-python/scripts/queue_ram.py" "$pkgdir/usr/share/opensmtpd/queues/queue-python/scripts/queue_ram.py"
+}
+
+
+# vim: ts=2 sw=2 et: