diff options
author | 2016-11-30 20:30:54 +0100 | |
---|---|---|
committer | 2016-11-30 20:30:54 +0100 | |
commit | d1e5c09b0c0b9fb539563f626b35a2f847e8ad29 (patch) | |
tree | 253bf58510db1ea5d63ab96dc6161e613dda5d57 | |
parent | first dirty ebuild of netvirt agent ebuild (diff) | |
download | anaximander-d1e5c09b0c0b9fb539563f626b35a2f847e8ad29.tar.gz anaximander-d1e5c09b0c0b9fb539563f626b35a2f847e8ad29.tar.bz2 anaximander-d1e5c09b0c0b9fb539563f626b35a2f847e8ad29.zip |
improve netvirt ebuild
* use system libary libconfig
* add OpenRC init script
-rw-r--r-- | net-misc/netvirt/Manifest | 4 | ||||
-rw-r--r-- | net-misc/netvirt/files/netvirt-agent.rc | 14 | ||||
-rw-r--r-- | net-misc/netvirt/files/netvirt-system-libconfig.patch | 71 | ||||
-rw-r--r-- | net-misc/netvirt/netvirt-9999.ebuild | 25 |
4 files changed, 97 insertions, 17 deletions
diff --git a/net-misc/netvirt/Manifest b/net-misc/netvirt/Manifest index cd8d41c..d5830bb 100644 --- a/net-misc/netvirt/Manifest +++ b/net-misc/netvirt/Manifest @@ -1,3 +1,5 @@ +AUX netvirt-agent.rc 303 SHA256 5c083a0751f2b124f268d924df70aa2ff8479c721968a9f03f345e92854517f8 SHA512 e8f852619090b077f883e92a7690504cf264b8c68f236f699ac831ab6582e390f3a78a1e4c2d5fee925bc3d76d0bf3cebbbdfc2e6c2f186abe559dd9b5b97ad0 WHIRLPOOL 7e4551b350ba79434f6705e59317b37a53d2226a4ea645b80a521283f5af37c432262869a1a7b9368489fd0576409c5fa9f2ce2c700c5c4c09e49daefa3d6285 AUX netvirt-agent.service 228 SHA256 b432456f5d27c0ce79d11f33c7d0d5d7ec191b3f904449e7e2e964f51c3927e4 SHA512 9854852a6ff962f0e13fc4fc429f8c1cefd97000b58dacb63dead441f30b2941bb2988556b1d86b263e2921136364fd23d6c7f6e93b47a253d299b802b865921 WHIRLPOOL 58cd7b5da66b697fc0f299fbf9be33124d06e6b3808dd67f59b7178fc800e2b8a58e717f299098ae4a373d8ee197a39c9d7374f9edbba80000ff9c8fa07cbfad -EBUILD netvirt-9999.ebuild 1096 SHA256 d88e619fba0f1e2dcdf3fb1877c43e21017280f0a8461b027ab0b44a958601d2 SHA512 93fd096134010f14556061eae15f42f87f6e0e5056e404e71be7dd3eab8f7cc30ea92de9c4e39c28739455141185b5e0b260a4715557cb29cf79f037e3eae654 WHIRLPOOL 4d3bc319ba2a559dc5982404bd3d121a579fdd07fcd901c2b7f535a5301d6ae5b59b1785f15f53ccf043e3af13a7c6b26d1cc43e054e410d347746534dd403f6 +AUX netvirt-system-libconfig.patch 2169 SHA256 1c6061a320af1bd1bc644d7d972b5d00aa8c5c36ea6c276ea4cf26673ffae256 SHA512 dfd91cd81f9815a3f26fdbda483c82ab2e3a06ccbec1a054fcbec3d2579b644335b41a39f1c8ba1ae47d5990d5b4114180fe8fd47a8fc064d16a1f7f46981ebf WHIRLPOOL f05dc38eeb6a459156aa6ff2c300d5d64829fe16ae031f15b76ea8451a6e4e3c89775a3f7c551d3ea8274bb85133cabf56dc1c392dee8c0d61afaf2d53204b6a +EBUILD netvirt-9999.ebuild 1035 SHA256 8b87c3feba1c38d4cd3496bb6899ec34a7a5916b0fb849b5a1f636d401560f07 SHA512 26b5b94c26079776978aed57cd1c63bd84541aa934967fb226b33a54b7a0759d97aa2523b23b54c209b1845a2acb24f8cfb826ffdbc60418fd349b080baa15fb WHIRLPOOL dd90bbe6b9b2d9637e84f0bcf9883ff86ca87ef848f6f31d611584ed69c7af1add2824a8bfd8aa40de0f57886c350a33f4643b86a91bda4e72d014ae5076422f MISC metadata.xml 593 SHA256 145d542b92a2913fbce00bc4438c756410258fd96a52c71237ace46065a594de SHA512 7e0194d427a5d0afac3297f6a5013df755109869851dc0225cf562a2a7c4159d7963540a33d956aaf47083d108f4bdbb2d405e25f682e12c53d7cdb1808775b2 WHIRLPOOL 15779496b2db337b83e9b4b6dcc5f9d8ff4593286da77ef696640f1021a012990ea7e6fd29d4a6be2a7d4caac1242bbb65fac09cec7fd2089e4275304a63c0fb diff --git a/net-misc/netvirt/files/netvirt-agent.rc b/net-misc/netvirt/files/netvirt-agent.rc new file mode 100644 index 0000000..1ebb114 --- /dev/null +++ b/net-misc/netvirt/files/netvirt-agent.rc @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="start a daemon to maintain a DynVPN connection" + +command="netvirt-agent" +command_background="true" +pidfile="/var/run/${SVCNAME}.pid" + +depend() { + use net +} diff --git a/net-misc/netvirt/files/netvirt-system-libconfig.patch b/net-misc/netvirt/files/netvirt-system-libconfig.patch new file mode 100644 index 0000000..c75c865 --- /dev/null +++ b/net-misc/netvirt/files/netvirt-system-libconfig.patch @@ -0,0 +1,71 @@ +From: Dominik Kriegner <dominik.kriegner@gmail.com> +Date: Tue, 30 Nov 2016 20:30:00 +0000 +Subject: [PATCH] use systems libconfig libary + +diff -urN a/nvagent/src/CMakeLists.txt b/nvagent/src/CMakeLists.txt +--- a/nvagent/src/CMakeLists.txt 2016-11-30 19:11:24.949262776 +0100 ++++ b/nvagent/src/CMakeLists.txt 2016-11-30 20:20:17.627577305 +0100 +@@ -20,7 +20,6 @@ + + message(STATUS "CMAKE_SOURCE_DIR" ${CMAKE_SOURCE_DIR}) + +-link_directories("${CMAKE_SOURCE_DIR}/libconfig/lib/.libs") + link_directories("${CMAKE_SOURCE_DIR}/tapcfg/build") + + if (WITH_GUI) +@@ -103,12 +102,12 @@ + target_link_libraries(netvirt-agent + -Wl,-Bstatic + tapcfg +- config + nvcore + -Wl,-Bdynamic + ssl + crypto + pthread ++ config + ) + endif() + +diff -urN a/nvctrler/src/CMakeLists.txt b/nvctrler/src/CMakeLists.txt +--- a/nvctrler/src/CMakeLists.txt 2016-11-30 19:11:24.951262484 +0100 ++++ b/nvctrler/src/CMakeLists.txt 2016-11-30 20:21:53.859030787 +0100 +@@ -21,9 +21,7 @@ + find_library(EVENT_SSL_LIBRARY event_openssl HINTS /usr/local/lib) + + include_directories("/usr/local/include") +-include_directories("${CMAKE_SOURCE_DIR}/libconfig/lib/") + include_directories("${CMAKE_SOURCE_DIR}/libnvcore/src/protocol/") +-link_directories("${CMAKE_SOURCE_DIR}/libconfig/lib/.libs") + target_link_libraries(netvirt-ctrler + nvcore + ${EVENT_CORE_LIBRARY} +@@ -34,7 +32,7 @@ + crypto + jansson + pthread +- ${CMAKE_SOURCE_DIR}/libconfig/lib/.libs/libconfig.a ++ config + ) + + install(TARGETS netvirt-ctrler +diff -urN a/nvswitch/src/CMakeLists.txt b/nvswitch/src/CMakeLists.txt +--- a/nvswitch/src/CMakeLists.txt 2016-11-30 19:11:24.952262338 +0100 ++++ b/nvswitch/src/CMakeLists.txt 2016-11-30 20:21:30.212612668 +0100 +@@ -22,7 +22,6 @@ + include_directories("${CMAKE_SOURCE_DIR}/libconfig/lib/") + include_directories("${CMAKE_SOURCE_DIR}/libnvcore/src/") + include_directories("${CMAKE_SOURCE_DIR}/libnvcore/src/protocol/") +-link_directories("${CMAKE_SOURCE_DIR}/libconfig/lib/.libs") + target_link_libraries(netvirt-switch + nvcore + ${EVENT_CORE_LIBRARY} +@@ -31,7 +30,7 @@ + crypto + pthread + jansson +- ${CMAKE_SOURCE_DIR}/libconfig/lib/.libs/libconfig.a ++ config + ) + + install(TARGETS netvirt-switch diff --git a/net-misc/netvirt/netvirt-9999.ebuild b/net-misc/netvirt/netvirt-9999.ebuild index a17acb1..7196a8b 100644 --- a/net-misc/netvirt/netvirt-9999.ebuild +++ b/net-misc/netvirt/netvirt-9999.ebuild @@ -4,11 +4,12 @@ EAPI=6 -inherit cmake-utils autotools git-r3 systemd +inherit cmake-utils git-r3 systemd DESCRIPTION="NetVirt is an open source network virtualization platform (NVP)" HOMEPAGE="http://netvirt.org" EGIT_REPO_URI="https://github.com/netvirt/netvirt.git" +EGIT_SUBMODULES=( '*' '-libconfig' ) LICENSE="GPL-3" SLOT="0" @@ -16,17 +17,18 @@ KEYWORDS="" IUSE="gui" RDEPEND="sys-libs/libcap + dev-libs/libconfig gui? ( dev-qt/qtgui:4 dev-qt/qtdeclarative:4 )" DEPEND="${RDEPEND} dev-util/scons dev-util/cmake" +PATCHES=( "${FILESDIR}"/netvirt-system-libconfig.patch ) + src_configure() { - cd libconfig - econf - cd .. - local mycmakeargs=("-DWITH_GUI=$(usex gui)") + local mycmakeargs=( -DWITH_GUI=$(usex gui) + -DCMAKE_LIBRARY_PATH=/usr/$(get_libdir) ) cmake-utils_src_configure } @@ -34,18 +36,8 @@ src_compile() { cd udt4 emake cd .. - cd libconfig - emake - cd .. cd tapcfg - mkdir release - scons --force-32bit - mv build/libtapcfg.so release/libtapcfg32.so - strip release/libtapcfg32.so - rm -rf build - scons --force-64bit - mv build/libtapcfg.so release/libtapcfg64.so - strip release/libtapcfg64.so + scons cd .. cmake-utils_src_compile } @@ -53,4 +45,5 @@ src_compile() { src_install() { cmake-utils_src_install systemd_newunit "${FILESDIR}"/netvirt-agent.service netvirt-agent.service + newinitd "${FILESDIR}"/netvirt-agent.rc netvirt-agent } |