diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-11-06 00:16:44 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-11-18 17:52:49 +0100 |
commit | 4da0572b38c6d5e103331bae95044b42c110ff6e (patch) | |
tree | 0c608a3f09335d63c80ee0632a8fd01f1ae4f53f /unmaintained/clapf | |
parent | d6a4bfc706ea00416c5b7e03bfa9555559d5c7a0 (diff) | |
download | aports-4da0572b38c6d5e103331bae95044b42c110ff6e.tar.bz2 aports-4da0572b38c6d5e103331bae95044b42c110ff6e.tar.xz |
unmaintained/clapf: move from testing
Diffstat (limited to 'unmaintained/clapf')
-rw-r--r-- | unmaintained/clapf/APKBUILD | 101 | ||||
-rw-r--r-- | unmaintained/clapf/clapf.confd | 6 | ||||
-rw-r--r-- | unmaintained/clapf/clapf.initd | 27 | ||||
-rw-r--r-- | unmaintained/clapf/clapf.pre-install | 6 | ||||
-rw-r--r-- | unmaintained/clapf/def__user.patch | 23 | ||||
-rw-r--r-- | unmaintained/clapf/gsl-libs.patch | 14 | ||||
-rw-r--r-- | unmaintained/clapf/ldflags.patch | 38 |
7 files changed, 215 insertions, 0 deletions
diff --git a/unmaintained/clapf/APKBUILD b/unmaintained/clapf/APKBUILD new file mode 100644 index 0000000000..60607ac52b --- /dev/null +++ b/unmaintained/clapf/APKBUILD @@ -0,0 +1,101 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=clapf +pkgver=0.4.7.4 +pkgrel=4 +pkgdesc="clapf is an open source email content filter application" +url="http://clapf.org" +arch="all" +license="AS-IS" +depends="clamav-db" +depends_dev="gsl-dev mysql-dev clamav-dev zlib-dev bzip2-dev" +makedepends="$depends_dev autoconf automake" +install="$pkgname.pre-install" +options="suid" +CLAPF_USER="clapf" +CLAPF_GROUP="clapf" +pkgusers="$CLAPF_USER" +pkggroups="$CLAPF_GROUP" +subpackages="$pkgname-dev" +# * 31d2ce87967e released 0.4.7.4 +COMMIT=31d2ce87967e +source="$pkgname-$pkgver-g$COMMIT.tar.gz::https://bitbucket.org/jsuto/$pkgname/get/$COMMIT.tar.gz + gsl-libs.patch + def__user.patch + ldflags.patch + clapf.confd + clapf.initd" + +builddir="$srcdir/jsuto-$pkgname-$COMMIT" + +prepare() { + default_prepare || return 1 + aclocal && autoconf +} + +build() { + cd "$builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --enable-libclamav \ + --with-tokendb=mysql \ + --enable-lmtp \ + --with-store=fs \ + --enable-blackhole \ + --enable-rbl \ + --enable-policy \ + --enable-whitelist \ + --enable-blackhole \ + --with-clapf-user=$CLAPF_USER \ + --enable-language-detection \ + --enable-memcached \ + --enable-spamsum + + make || return 1 +} + +package() { + cd "$builddir" + make -j1 DESTDIR="$pkgdir" install \ + || return 1 + install -D -m 755 \ + "$srcdir"/clapf.initd \ + "$pkgdir"/etc/init.d/clapf \ + || return 1 + install -D -m 644 \ + "$srcdir"/clapf.confd \ + "$pkgdir"/etc/conf.d/clapf \ + || return 1 + install -d -o $CLAPF_USER -g $CLAPF_GROUP \ + "$pkgdir"/var/run/$pkgname \ + || return 1 + mkdir -p \ + "$pkgdir"/var/spool/clapf/tmp \ + || return 1 + chown -R $CLAPF_USER:$CLAPF_GROUP \ + "$pkgdir"/var/lib/clapf \ + "$pkgdir"/var/spool/clapf \ + || return 1 +} + +md5sums="0a38f56f717b170d8b6e5f780cd2281d clapf-0.4.7.4-g31d2ce87967e.tar.gz +7f480d5a8d0da4863b682deddfe47eff gsl-libs.patch +ba31f71c066f3f6159548808d2e26d8b def__user.patch +967743d70cdf21dd929117865c7053c0 ldflags.patch +1e3786f78bbdfaba1f2d414f9fa19907 clapf.confd +3ab39ee86b80ba8e19e8f41686d35bc6 clapf.initd" +sha256sums="84b1e15462985531e865b5700200d1f0fc09289e5cce00f3d8ab0fdefe4b51cc clapf-0.4.7.4-g31d2ce87967e.tar.gz +4b4bb8530ac740a5279e0fdd959c6b706b3635792030f6b242e282f8d923202c gsl-libs.patch +0523e889808f6aa3ec71a34846cbdfc9d1b185463583dcd7239673d098402346 def__user.patch +d9b5fdbc6ca3118a3e382bcdca383ccca4cdac660303d39a7221bc6475f4eaac ldflags.patch +429a4a6f832cb00f5fcfa0218656bcefa68d80f1f6d2f21ee4dfe1dceef15f69 clapf.confd +bafcb80e5f142f9680a7b8a94c848d84a6940d6c807122d0ed10f004c035faf9 clapf.initd" +sha512sums="f13428be93cd170e24c70e608d15ef7d6054fa1d57dc9dae4efc4b78c464a1ab3102d99114ddfa3fe011e0a6b6ae2076ee46d5d64561604d0b758fae947d22da clapf-0.4.7.4-g31d2ce87967e.tar.gz +096ed4afe1b0fad569a172d6af952f1590d230dd38f6f0c4c0b1e7f29a1515fd887f1c099267aa926ce698864b75cb50626a9b7f49914549748d22ba7058a31d gsl-libs.patch +18b8bf55f20e86e05958f2b4a8bdea8bedeb712bc91bb9a6a67faa2928b545707d3391671ab843415fe11703fef4683594571136cf9b2ec87aa41b0875d34588 def__user.patch +f391663c74ce55b33446bbca9cde61201147d8704f514a266ea1371a43231e34800a8dc6e9f3843849ac000aa49ec2cffc023795696b6127bb404df83493f10f ldflags.patch +f9d931f59710ca5ffae2d08d95d12d090dbbd932f8aa0ebb15e925704563834249e475e7ae8e845fb0f57396cdc11492b54efa0f5c228222f04a0e0c0e92caa5 clapf.confd +c4dff1a3627f9de640dbe6c9a7c69f0e8357f9c63a3fb41f3c6c1e7ee6caec431be6f473002847f1fd2c6c41f7d2730ae134a5b04c9df77502b0905657f524e8 clapf.initd" diff --git a/unmaintained/clapf/clapf.confd b/unmaintained/clapf/clapf.confd new file mode 100644 index 0000000000..8edf00cfb2 --- /dev/null +++ b/unmaintained/clapf/clapf.confd @@ -0,0 +1,6 @@ +# /etc/conf.d/clapf: config file for /etc/init.d/clapf + +#CLAPF_USER=clapf +#CLAPF_GROUP=clapf +#CLAPF_CONF=/etc/clapf.conf +#CLAPF_OPTS="-c $CLAPF_CONF" diff --git a/unmaintained/clapf/clapf.initd b/unmaintained/clapf/clapf.initd new file mode 100644 index 0000000000..b3e6c6dd90 --- /dev/null +++ b/unmaintained/clapf/clapf.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run + +description="Email content filter" +extra_started_commands="reload" + +command="/usr/sbin/clapf" +pidfile="/var/run/clapf/clapf.pid" +CLAPF_CONF="${CLAPF_CONF:-/etc/clapf.conf}" +CLAPF_USER="${CLAPF_USER:-clapf}" +CLAPF_GROUP="${CLAPF_GROUP:-clapf}" +command_user="$CLAPF_USER${CLAPF_GROUP:+:}$CLAPF_GROUP" +command_args="${CLAPF_OPTS:--c $CLAPF_CONF}" +command_background="YES" + +depend() { + need net + use logger + before mta +} + +reload() { + ebegin "Reloading ${name:-$RC_SVCNAME}" + start-stop-daemon --signal HUP \ + ${command:+--exec} $command \ + ${pidfile:+--pidfile} $pidfile + eend $? +} diff --git a/unmaintained/clapf/clapf.pre-install b/unmaintained/clapf/clapf.pre-install new file mode 100644 index 0000000000..b2207408ad --- /dev/null +++ b/unmaintained/clapf/clapf.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S clapf 2>/dev/null +adduser -S -D -H -h /var/lib/clapf -s /bin/false -G clapf -g clapf clapf 2>/dev/null + +exit 0 diff --git a/unmaintained/clapf/def__user.patch b/unmaintained/clapf/def__user.patch new file mode 100644 index 0000000000..825f7cd951 --- /dev/null +++ b/unmaintained/clapf/def__user.patch @@ -0,0 +1,23 @@ +diff --git a/src/defs.h b/src/defs.h +index 68cb80a..aae7905 100644 +--- a/src/defs.h ++++ b/src/defs.h +@@ -156,6 +156,9 @@ struct session_data { + int training_request; + float spaminess; + float Nham, Nspam; ++#ifdef __user ++#undef __user ++#endif + float __acquire, __parsed, __av, __user, __policy, __training, __minefield, __as, __update, __store, __inject; + #ifdef HAVE_MAILBUF + char mailbuf[MAILBUFSIZE], discard_mailbuf; +diff --git a/webui/view/theme/default/templates/common/footer.tpl b/webui/view/theme/default/templates/common/footer.tpl +index e2a23fe..0f681bb 100644 +--- a/webui/view/theme/default/templates/common/footer.tpl ++++ b/webui/view/theme/default/templates/common/footer.tpl +@@ -1,3 +1,3 @@ + +- <p>clapf web UI, VERSION_STRING</p> ++ <p>clapf web UI, 0.4.7.4</p> + diff --git a/unmaintained/clapf/gsl-libs.patch b/unmaintained/clapf/gsl-libs.patch new file mode 100644 index 0000000000..7ee3b3bfb1 --- /dev/null +++ b/unmaintained/clapf/gsl-libs.patch @@ -0,0 +1,14 @@ +--- ./configure.in.orig 2013-04-16 08:57:38.886870643 +0000 ++++ ./configure.in 2013-04-16 09:00:49.735350727 +0000 +@@ -275,7 +275,10 @@ + defs="$defs -DHAVE_GSL" + gsl_libs="-lgslcblas -lgsl" + fi +- ++ PKG_CHECK_MODULES(GSL, gsl, [ ++ defs="$defs -DHAVE_GSL $GSL_CFLAGS" ++ gsl_libs="$GSL_LIBS" ++ ]) + + dnl the blackhole feature + diff --git a/unmaintained/clapf/ldflags.patch b/unmaintained/clapf/ldflags.patch new file mode 100644 index 0000000000..0dfd02de6a --- /dev/null +++ b/unmaintained/clapf/ldflags.patch @@ -0,0 +1,38 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 9512aca..6b4388e 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -17,7 +17,7 @@ + CFLAGS = @CFLAGS@ @CPPFLAGS@ + DEFS = @defs@ + INCDIR = -I. -I.. @INCDIR@ @sql_includes@ +-LIBDIR = -L. -L../contrib/spamsum @LIBDIR@ @LDFLAGS@ ++LIBDIR = -L. -L../contrib/spamsum @LIBDIR@ + LIBS = @LIBS@ @sql_libs@ + ##CLAMAV_EXTRA_LIBS = -lclamunrar_iface -lclamunrar + OBJS = @OBJS@ +@@ -40,13 +40,12 @@ install: install-clapf install-includes install-splitmbox @parsembox_install@ @s + + + clapf: clapf.c libclapf.a +- $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@ ++ $(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @libclamav_extra_libs@ + + libclapf.a: $(OBJS) $(SQL_OBJS) + ar cr libclapf.a $(OBJS) $(SQL_OBJS) + ranlib libclapf.a +- #$(CC) -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@ +- $(CC) -shared -Wl -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@ ++ $(CC) @LDFLAGS@ -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) + ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so + ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so.$(CLAPF_VERSION) + +@@ -75,7 +75,7 @@ + $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ $(LIBS) $(LDAP_LIBS) $(LIBDIR) -ltre + + test: +- $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR) @LDFLAGS@ ++ $(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR) + + %.o: $(srcdir)/%.c + $(CC) $(CFLAGS) -fPIC $(INCDIR) $(DEFS) -c $< -o $@ |