aboutsummaryrefslogtreecommitdiffstats
path: root/testing/clapf
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-04-16 09:03:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-04-16 09:06:48 +0000
commit2cf2bbe846d234c6dea96b0eb58657a71255b8ac (patch)
treea511b8ad983aab2ddbe4fc105935a579c4bf8306 /testing/clapf
parentc8145471c54e481520c0e6d292cef43b4ee9215c (diff)
downloadaports-2cf2bbe846d234c6dea96b0eb58657a71255b8ac.tar.bz2
aports-2cf2bbe846d234c6dea96b0eb58657a71255b8ac.tar.xz
testing/clapf: upgrade to 0.4.7.4
- fix ldflags which should not be at the end - fix configure script to use pkgconfig for gsl cflags and libs - undef a uclibc nameclash - __user
Diffstat (limited to 'testing/clapf')
-rw-r--r--testing/clapf/APKBUILD38
-rw-r--r--testing/clapf/def__user.patch23
-rw-r--r--testing/clapf/gsl-libs.patch14
-rw-r--r--testing/clapf/ldflags.patch38
4 files changed, 103 insertions, 10 deletions
diff --git a/testing/clapf/APKBUILD b/testing/clapf/APKBUILD
index 9de6de05e5..01c1f81198 100644
--- a/testing/clapf/APKBUILD
+++ b/testing/clapf/APKBUILD
@@ -1,24 +1,27 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=clapf
-pkgver=0.4.6_rc3
-_realver=0.4.6-rc3
-pkgrel=3
+pkgver=0.4.7.4
+pkgrel=0
pkgdesc="clapf is an open source email content filter application"
url="http://clapf.acts.hu"
-arch="x86_64"
+arch="all"
license="as-is"
depends="clamav-db"
-depends_dev="gsl-dev mysql-dev clamav-dev zlib-dev"
-makedepends="$depends_dev"
+depends_dev="gsl-dev mysql-dev clamav-dev zlib-dev bzip2-dev"
+makedepends="$depends_dev autoconf automake"
install="$pkgname.pre-install"
pkgusers="clapf"
subpackages="$pkgname-dev"
-source="http://clapf.acts.hu/clapf-$_realver.tar.gz
+source="http://clapf.acts.hu/clapf-$pkgver.tar.gz
+ gsl-libs.patch
+ def__user.patch
+ ldflags.patch
+
$pkgname.confd
$pkgname.initd"
-_builddir="$srcdir/$pkgname-$_realver"
+_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
local i
@@ -28,6 +31,7 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
+ aclocal && autoconf
}
build() {
@@ -39,7 +43,6 @@ build() {
--localstatedir=/var \
--enable-libclamav \
--with-tokendb=mysql \
- --with-userdb=mysql \
--enable-lmtp \
--with-store=fs \
--enable-blackhole \
@@ -65,6 +68,21 @@ package() {
install -do $pkgname "$pkgdir"/var/run/clapf || return 1
}
-md5sums="7850eb8b75988f3944f2b69b9e3b0c4d clapf-0.4.6-rc3.tar.gz
+md5sums="e6be84e17886401b4818c6285a7b2888 clapf-0.4.7.4.tar.gz
+7f480d5a8d0da4863b682deddfe47eff gsl-libs.patch
+ba31f71c066f3f6159548808d2e26d8b def__user.patch
+c6bd9005236f6a40c32fe1f04fafc94b ldflags.patch
385318b45b2bccdd76fd312576380735 clapf.confd
263283c96608d696cd5e9eb9de921b16 clapf.initd"
+sha256sums="a38e5b28ff58119abf50054fac2c03b04f959251e844893f0c9f669ce76c99e3 clapf-0.4.7.4.tar.gz
+4b4bb8530ac740a5279e0fdd959c6b706b3635792030f6b242e282f8d923202c gsl-libs.patch
+0523e889808f6aa3ec71a34846cbdfc9d1b185463583dcd7239673d098402346 def__user.patch
+00035eb11386f40c68ebaea79c31659f19f4f5a29503d47e9e0d3a6efc32f9fe ldflags.patch
+1c5c87adfa2efdaa55d7c8e07ac7ca6b4a068313723dbf46dd1d1ccaf3e54e6a clapf.confd
+f5c849b01734115ff83e9a2bb0eb4a34bd25d20f646c7945a8887815a65f1ec3 clapf.initd"
+sha512sums="7eb95e25671d0ad4d37cd16f5c293bb7cc8466cbc3dd6b7ac250d75f277423f57012e57373bd8f69174bcb15e865caa33e97dd6adcb0a52553b6ce9069036b05 clapf-0.4.7.4.tar.gz
+096ed4afe1b0fad569a172d6af952f1590d230dd38f6f0c4c0b1e7f29a1515fd887f1c099267aa926ce698864b75cb50626a9b7f49914549748d22ba7058a31d gsl-libs.patch
+18b8bf55f20e86e05958f2b4a8bdea8bedeb712bc91bb9a6a67faa2928b545707d3391671ab843415fe11703fef4683594571136cf9b2ec87aa41b0875d34588 def__user.patch
+d71081b2f1bdc9f44ee5cee6e4149e6e53d5ef5415069814dd22d9c2df6eee0195b9e3466468d01d0b5bcfadfc20ec0eacfd1299d5f37cbe7f326ffab435972b ldflags.patch
+99795b8063234c5dbf10da145660c39dfe3f121aa4bb17869abc0dcab5dfd765bfba033a701c8b70d57cb4fe2811d122da1e56506a1c45c0afdcc2102719d798 clapf.confd
+08e42083bcdfe39099d78db23961c0585883cfb3ad4b789376ca34d1d89556dbae153eeda281f08ffe179a4305188062c03ed1a53ca98d636c44ddbd7b40112a clapf.initd"
diff --git a/testing/clapf/def__user.patch b/testing/clapf/def__user.patch
new file mode 100644
index 0000000000..825f7cd951
--- /dev/null
+++ b/testing/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/testing/clapf/gsl-libs.patch b/testing/clapf/gsl-libs.patch
new file mode 100644
index 0000000000..7ee3b3bfb1
--- /dev/null
+++ b/testing/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/testing/clapf/ldflags.patch b/testing/clapf/ldflags.patch
new file mode 100644
index 0000000000..1f5a76d9de
--- /dev/null
+++ b/testing/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 -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 $@