Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SoftetherVPN ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
leonik375
n00b
n00b


Joined: 19 Jul 2016
Posts: 4

PostPosted: Wed Dec 11, 2024 9:55 am    Post subject: SoftetherVPN ebuild Reply with quote

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

}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum