summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD49
-rw-r--r--cmake.patch29
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d6af2ac6681
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+# Generated by mksrcinfo v8
+# Sun May 13 13:58:19 UTC 2018
+pkgbase = libsioclient-git
+ pkgdesc = C++11 implementation of Socket.IO client
+ pkgver = 1.6.1.r27.g6063cb1
+ pkgrel = 1
+ url = https://github.com/socketio/socket.io-client-cpp.git
+ arch = x86_64
+ license = custom:MIT
+ makedepends = cmake
+ makedepends = extra-cmake-modules
+ makedepends = git
+ makedepends = boost
+ depends = openssl
+ depends = boost-libs
+ depends = websocketpp
+ depends = rapidjson
+ provides = libsioclient
+ conflicts = libsioclient
+ source = libsioclient::git+https://github.com/socketio/socket.io-client-cpp.git
+ source = cmake.patch
+ md5sums = SKIP
+ md5sums = 9b25e8ba1fa73823512242205a395be1
+
+pkgname = libsioclient-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..191caa53fd2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+src
+pkg
+*.pkg.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1ef120b7d67
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Tobias Markus <tobias AT miglix DOT eu>
+
+_pkgbase=libsioclient
+pkgname="$_pkgbase-git"
+pkgdesc="C++11 implementation of Socket.IO client"
+pkgver=1.6.1.r27.g6063cb1
+pkgrel=1
+arch=('x86_64')
+url="https://github.com/socketio/socket.io-client-cpp.git"
+license=('custom:MIT')
+makedepends=('cmake' 'extra-cmake-modules' 'git' 'boost')
+depends=('openssl' 'boost-libs' 'websocketpp' 'rapidjson')
+provides=("$_pkgbase")
+conflicts=("$_pkgbase")
+source=(
+ "$_pkgbase::git+https://github.com/socketio/socket.io-client-cpp.git"
+ 'cmake.patch')
+md5sums=('SKIP'
+ '9b25e8ba1fa73823512242205a395be1')
+
+pkgver() {
+ cd "$srcdir/$_pkgbase"
+ git describe --tags --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ patch -d "$srcdir/$_pkgbase" -i "$srcdir/cmake.patch"
+
+ mkdir -p "$srcdir/build"
+ cd "$srcdir/build"
+ cmake \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ "../$_pkgbase"
+}
+
+build() {
+ cd "$srcdir/build"
+ make
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 "../$_pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/cmake.patch b/cmake.patch
new file mode 100644
index 00000000000..75f4221f67a
--- /dev/null
+++ b/cmake.patch
@@ -0,0 +1,29 @@
+--- CMakeLists.txt.old 2018-05-13 15:42:46.806583427 +0200
++++ CMakeLists.txt 2018-05-13 15:43:16.053249378 +0200
+@@ -51,8 +51,8 @@
+ add_library(sioclient_tls ${ALL_SRC})
+ target_include_directories(sioclient_tls PRIVATE ${Boost_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_LIST_DIR}/src
+- ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp
+- ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include
++# ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp
++# ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include
+ ${OPENSSL_INCLUDE_DIR}
+ )
+
+@@ -72,13 +72,10 @@
+ endif()
+
+ install(FILES ${ALL_HEADERS}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/include"
++ DESTINATION "include"
+ )
+
+ install(TARGETS ${TARGET_LIBRARIES}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
++ DESTINATION "lib"
+ )
+
+-install(FILES ${Boost_LIBRARIES}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
+-)