summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthraxx2015-11-24 19:59:55 +0100
committeranthraxx2015-11-24 19:59:55 +0100
commit358d44e32dcc66cd61f3236e8277d2f38772d0fc (patch)
tree7b5c41fb1c4248021391d72678de75d48cd71db8
downloadaur-358d44e32dcc66cd61f3236e8277d2f38772d0fc.tar.gz
addpkg: haka 0.3.0-1
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD57
-rw-r--r--fix-32bit-build.patch39
3 files changed, 128 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d98c889a9b09
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = haka
+ pkgdesc = Collection of tools that allows capturing TCP/IP packets and filtering them based on Lua policy files
+ pkgver = 0.3.0
+ pkgrel = 1
+ url = http://haka-security.org/
+ arch = i686
+ arch = x86_64
+ license = MPL
+ makedepends = cmake
+ makedepends = swig
+ makedepends = doxygen
+ makedepends = python2-sphinx
+ makedepends = check
+ makedepends = iniparser
+ depends = wireshark-cli
+ depends = rsync
+ depends = libpcap
+ depends = gawk
+ depends = libedit
+ depends = pcre
+ depends = lua
+ depends = capstone
+ depends = luajit
+ options = !emptydirs
+ backup = etc/haka/haka.conf
+ source = haka-0.3.0.tar.gz::https://github.com/haka-security/haka/releases/download/v0.3.0/haka_0.3.0_source.tar.gz
+ source = fix-32bit-build.patch
+ sha512sums = 8c2c219b8e89710289e300c1fd8ad9b6a95562efc77966bee7ddf343d73b108d6ebf3f7ff73963ca66954bdc0719c08eef127e58ffa42469ae47cf95e817e720
+ sha512sums = d4b5db5fb3d04a4c2bb6d4c5833d34a21b3aac8f81eafa8305a0ca57a8bd24578a7baab05e485cb855d3ff0c48b3baa1627ed1db3553fda8c4b7de420d61a857
+
+pkgname = haka
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9b92e58dc6be
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgname=haka
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Collection of tools that allows capturing TCP/IP packets and filtering them based on Lua policy files"
+url="http://haka-security.org/"
+arch=('i686' 'x86_64')
+license=('MPL')
+depends=('wireshark-cli' 'rsync' 'libpcap' 'gawk' 'libedit' 'pcre' 'lua' 'capstone' 'luajit')
+makedepends=('cmake' 'swig' 'doxygen' 'python2-sphinx' 'check' 'iniparser')
+options=('!emptydirs')
+backup=('etc/haka/haka.conf')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/haka-security/haka/releases/download/v${pkgver}/haka_${pkgver}_source.tar.gz
+ fix-32bit-build.patch)
+sha512sums=('8c2c219b8e89710289e300c1fd8ad9b6a95562efc77966bee7ddf343d73b108d6ebf3f7ff73963ca66954bdc0719c08eef127e58ffa42469ae47cf95e817e720'
+ 'd4b5db5fb3d04a4c2bb6d4c5833d34a21b3aac8f81eafa8305a0ca57a8bd24578a7baab05e485cb855d3ff0c48b3baa1627ed1db3553fda8c4b7de420d61a857')
+
+prepare() {
+ cd ${pkgname}_${pkgver}_source
+
+ patch -p1 < "${srcdir}/fix-32bit-build.patch"
+ sed 's|sbin|bin|g' -i \
+ CMakeLists.txt \
+ src/hakactl/CMakeLists.txt \
+ src/haka/CMakeLists.txt \
+ external/luajit/luajit.cmake
+ sed 's|-Wall -Werror|-Wall|g' -i CMakeLists.txt
+ sed 's|sphinx-build|sphinx-build2|g' -i build/FindSphinx.cmake
+ # temporary html docs via doxygen as sphinx generator is broken
+ sed -r 's|(GENERATE_XML[ ]+=) YES|\1 NO|g' -i doc/Doxyfile.in
+ sed -r 's|(HTML_OUTPUT[ ]+=) xml|\1 html|g' -i doc/Doxyfile.in
+
+ mkdir make
+}
+
+build() {
+ cd ${pkgname}_${pkgver}_source/make
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+ make doc-doxygen
+}
+
+check() {
+ cd ${pkgname}_${pkgver}_source/make
+ make tests
+}
+
+package() {
+ cd ${pkgname}_${pkgver}_source/make
+ make DESTDIR="${pkgdir}" install
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r doc/html "${pkgdir}/usr/share/doc/${pkgname}"
+ ln -s /usr/share/haka/sample "${pkgdir}/usr/share/doc/${pkgname}/sample"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/fix-32bit-build.patch b/fix-32bit-build.patch
new file mode 100644
index 000000000000..4a1cd0d7662b
--- /dev/null
+++ b/fix-32bit-build.patch
@@ -0,0 +1,39 @@
+From 6398e9f43e81daaa424fd9e58f1acaaeaba62cf4 Mon Sep 17 00:00:00 2001
+From: Paul Fariello <pfariello@arkoon.dev>
+Date: Mon, 20 Oct 2014 18:25:12 +0200
+Subject: [PATCH] Fix build
+
+libluajit requires libm but -lm was set after libluajit and so libm was
+discarded under some conditions
+---
+ lib/haka/CMakeLists.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/haka/CMakeLists.txt b/lib/haka/CMakeLists.txt
+index d296a83..1160fda 100644
+--- a/lib/haka/CMakeLists.txt
++++ b/lib/haka/CMakeLists.txt
+@@ -80,6 +80,11 @@ set_target_properties(libhaka PROPERTIES COMPILE_DEFINITIONS _GNU_SOURCE)
+ set_target_properties(libhaka PROPERTIES VERSION ${HAKA_VERSION_MAJOR}.${HAKA_VERSION_MINOR}.${HAKA_VERSION_PATCH}
+ SOVERSION ${HAKA_VERSION_MAJOR})
+
++target_link_libraries(libhaka LINK_PRIVATE ${LUA_LIBRARIES})
++add_dependencies(libhaka ${LUA_DEPENDENCY})
++include_directories(${LUA_INCLUDE_DIR})
++link_directories(${LUA_LIBRARY_DIR})
++
+ target_link_libraries(libhaka LINK_PRIVATE ${DL_LIBRARIES})
+ target_link_libraries(libhaka LINK_PRIVATE ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(libhaka LINK_PRIVATE ${INIPARSER_LIBRARY})
+@@ -87,11 +92,6 @@ target_link_libraries(libhaka LINK_PRIVATE rt)
+ target_link_libraries(libhaka LINK_PRIVATE m)
+ target_link_libraries(libhaka LINK_PRIVATE ${EDITLINE_LIBRARY})
+
+-target_link_libraries(libhaka LINK_PRIVATE ${LUA_LIBRARIES})
+-add_dependencies(libhaka ${LUA_DEPENDENCY})
+-include_directories(${LUA_INCLUDE_DIR})
+-link_directories(${LUA_LIBRARY_DIR})
+-
+ set_target_properties(libhaka PROPERTIES OUTPUT_NAME haka)
+
+ # Install