summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZero_Chaos <zerochaos@gentoo.org>2017-06-04 14:53:24 -0400
committerZero_Chaos <zerochaos@gentoo.org>2017-06-04 14:53:44 -0400
commite4c107e78a3730aa1d9bee740c58c9075941abfe (patch)
treeec828828291c22376422f97f525d7bb1db92e053 /net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild
parentsys-apps/openrc: ia64 stable, bug #615368 (diff)
downloadgentoo-e4c107e78a3730aa1d9bee740c58c9075941abfe.tar.gz
gentoo-e4c107e78a3730aa1d9bee740c58c9075941abfe.tar.bz2
gentoo-e4c107e78a3730aa1d9bee740c58c9075941abfe.zip
net-misc/srf-ip-conn-srv: initial ebuild, won't bind to port for me, bug open upstream, help welcome
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild')
-rw-r--r--net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild b/net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild
new file mode 100644
index 000000000000..f92e83711ca8
--- /dev/null
+++ b/net-misc/srf-ip-conn-srv/srf-ip-conn-srv-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit vcs-snapshot git-r3 cmake-utils
+
+DESCRIPTION="SharkRF IP Connector Protocol server"
+HOMEPAGE="https://github.com/sharkrf/srf-ip-conn-srv"
+srfipcon="srf-ip-conn-140c9b8a8619"
+jsmn="jsmn-35086597a72d"
+SRC_URI="https://github.com/sharkrf/srf-ip-conn/archive/140c9b8a86193b8f345c9e113691113310859ff8.tar.gz -> ${srfipcon}.tar.gz
+ https://github.com/zserge/jsmn/archive/35086597a72d94d8393e6a90b96e553d714085bd.tar.gz -> ${jsmn}.tar.gz"
+EGIT_REPO_URI="https://github.com/sharkrf/srf-ip-conn-srv.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/build"
+
+CMAKE_IN_SOURCE_BUILD=true
+
+src_unpack() {
+ vcs-snapshot_src_unpack ${A}
+ git-r3_src_unpack
+}
+
+src_prepare() {
+ #set needed paths
+ sed -i "s#\$ENV{JSMN_PATH}#${WORKDIR}/${jsmn}#" CMakeLists.txt
+ sed -i "s#\$ENV{SRF_IP_CONN_PATH}#${WORKDIR}/${srfipcon}#" CMakeLists.txt
+
+ #set cflags/ldflags
+ sed -i "s#-O4#${CFLAGS}#" CMakeLists.txt
+ sed -i "s#CMAKE_EXE_LINKER_FLAGS_RELEASE \"\"#CMAKE_EXE_LINKER_FLAGS_RELEASE \"${LDFLAGS}\"#" CMakeLists.txt
+
+ #be in a sane directory for eapply_user
+ cd "${WORKDIR}/${P}"
+ eapply_user
+}
+
+src_install() {
+ #add a default banned list to edit
+ sed -i 's#"banlist-file": ""#"banlist-file":"/etc/srf-ip-conn-srv/banlist.json"#' "${WORKDIR}/${P}/config-example.json"
+ echo "{}" > "${ED}/etc/srf-ip-conn-srv/banlist.json"
+
+ insinto /etc/srf-ip-conn-srv
+ doins "${WORKDIR}/${P}/banlist-example.json"
+ newins "${WORKDIR}/${P}/config-example.json" config.json
+ newbin Release/srf-ip-conn-srv srf-ip-conn-srv-target
+
+ dobin "${FILESDIR}/srf-ip-conn-srv"
+}