summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordrswinghead2018-04-20 22:38:52 +0800
committerdrswinghead2018-04-20 22:39:49 +0800
commitdf382ea94dda3ceb558fc957837d3627fab2604b (patch)
tree82c67817efd7e8d5773e22a5f1076b63d239403f
downloadaur-df382ea94dda3ceb558fc957837d3627fab2604b.tar.gz
inited
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD73
-rw-r--r--mkldflags.patch12
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..49d66b984921
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = toxcrawler-git
+ pkgdesc = An Tox DHT network crawler and static tox library
+ pkgver = r37.fecab84
+ pkgrel = 1
+ url = https://github.com/envsh/toxcrawler
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = go
+ depends = libvpx
+ depends = libsodium
+ conflicts = toxcrawler
+ source = toxcore-git::git+https://github.com/JFreegman/toxcore.git#branch=DHT-addon
+ source = toxcrawler-git::git+https://github.com/envsh/toxcrawler#branch=master
+ source = mkldflags.patch
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = 87a2f10ca7d995098a72865794cee0eb
+
+pkgname = toxcrawler-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cecfffbf966f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: me <me@me.me>
+pkgname=toxcrawler-git
+pkgver=r37.fecab84
+pkgrel=1
+epoch=
+pkgdesc="An Tox DHT network crawler and static tox library"
+arch=('i686' 'x86_64')
+url="https://github.com/envsh/toxcrawler"
+license=('GPL')
+groups=()
+depends=('libvpx' 'libsodium')
+makedepends=('git' 'go')
+checkdepends=()
+optdepends=()
+provides=()
+conflicts=('toxcrawler')
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+source=("toxcore-git::git+https://github.com/JFreegman/toxcore.git#branch=DHT-addon"
+ "toxcrawler-git::git+https://github.com/envsh/toxcrawler#branch=master"
+ "mkldflags.patch")
+md5sums=('SKIP'
+ 'SKIP'
+ '87a2f10ca7d995098a72865794cee0eb')
+noextract=()
+
+pkgver()
+{
+ cd toxcrawler-git
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$srcdir/toxcore-git"
+}
+
+build() {
+ cd "$srcdir/toxcore-git"
+
+ if [ ! -f configure ];then
+ ./autogen.sh
+ fi
+ ./configure --prefix=/opt/toxcrawler --enable-static --disable-shared --disable-tests --disable-testing
+ make -j3
+
+ cd "$srcdir/toxcrawler-git/"
+ patch -p1 -i "$srcdir/mkldflags.patch"
+
+ cd "$srcdir/toxcrawler-git/crawler"
+ make
+ make -f Makefile-go
+}
+
+check() {
+ cd "$srcdir/toxcore-git"
+
+}
+
+package() {
+ cd "$srcdir/toxcore-git"
+ make DESTDIR="$pkgdir/" install
+ install -m755 "$srcdir/toxcrawler-git/crawler/crawler" "$pkgdir/opt/toxcrawler/bin/crawler"
+ install -m755 "$srcdir/toxcrawler-git/crawler/src/gotoxcwl" "$pkgdir/opt/toxcrawler/bin/toxcwl"
+}
+
+
+# vim:set ts=2 sw=2 et:
diff --git a/mkldflags.patch b/mkldflags.patch
new file mode 100644
index 000000000000..90e8e6d5bd47
--- /dev/null
+++ b/mkldflags.patch
@@ -0,0 +1,12 @@
+diff --git a/crawler/Makefile b/crawler/Makefile
+index 0003a0e..21d3717 100644
+--- a/crawler/Makefile
++++ b/crawler/Makefile
+@@ -2,6 +2,7 @@ LIBS = toxcore
+ CFLAGS = -std=gnu99 -Wall -ggdb -fstack-protector-all -pthread
+ OBJ = main.o util.o
+ LDFLAGS = $(shell pkg-config --libs $(LIBS))
++LDFLAGS = -L../../toxcore/build/.libs/ -ltoxcore -lsodium
+ SRC_DIR = ./src
+
+ all: $(OBJ)