leonik375 n00b
Joined: 19 Jul 2016 Posts: 4
|
Posted: Wed Dec 11, 2024 9:55 am Post subject: SoftetherVPN ebuild |
|
|
After some research i have to create my own softether-9999 ebuild
It's not so good as i can understand
Can someone give me some advice on it?
Code: |
EAPI=7
inherit systemd git-r3
DESCRIPTION="Multi-protocol VPN software"
HOMEPAGE="http://www.softether.org/"
EGIT_REPO_URI="https://github.com/SoftEtherVPN/SoftEtherVPN.git"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug +client server bridge +control"
RDEPEND="dev-libs/openssl
sys-libs/ncurses
sys-libs/readline
sys-libs/zlib"
DEPEND="${RDEPEND}"
#S="${WORKDIR}/SoftEtherVPN-${PV}"
DOCS=( AUTHORS.TXT ChangeLog README )
# Prohibit to modify number of threads
PATCHES=(
"${FILESDIR}/softether-threads-5.02.5187.patch"
)
src_prepare() {
find ./ -type f -exec sed -i 's/\r/\n/g; s/\n$//' {} \;
default
sed -i -e 's|/opt/|/opt/softether/|g' systemd/*.service || die
# git submodule update --init --recursive
}
src_configure() {
export CPACK_GENERATOR=""
econf
}
src_compile() {
tc-export CC AR RANLIB
emake -C build || die "emake failed"
}
src_install() {
insinto "/opt/${PN}"
exeinto "/opt/${PN}"
doins "build/hamcore.se2"
dolib.so "build/libcedar.so"
dolib.so "build/libmayaqua.so"
if use client; then
doexe "build/vpnclient"
sed -i '/ConditionPathExists=!@DIR@\/softether\/vpnclient\/do_not_run/d' "systemd/softether-vpnclient.service"
sed -i 's/@DIR@\/softether\/vpnclient/\/opt\/softether/g' "systemd/softether-vpnclient.service"
systemd_dounit "systemd/softether-vpnclient.service"
fi
if use server; then
doexe "build/vpnserver"
sed -i '/ConditionPathExists=!@DIR@\/softether\/vpnserver\/do_not_run/d' "systemd/softether-vpnserver.service"
sed -i 's/@DIR@\/softether\/vpnserver/\/opt\/softether/g' "systemd/softether-vpnserver.service"
systemd_dounit "systemd/softether-vpnserver.service"
fi
if use bridge; then
doexe "build/vpnbridge"
sed -i '/ConditionPathExists=!@DIR@\/softether\/vpnbridge\/do_not_run/d' "systemd/softether-vpnbridge.service"
sed -i 's/@DIR@\/softether\/vpnbridge/\/opt\/softether/g' "systemd/softether-vpnbridge.service"
systemd_dounit "systemd/softether-vpnbridge.service"
fi
if use control; then
doexe "build/vpncmd"
fi
}
|
|
|