diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 206 |
2 files changed, 146 insertions, 75 deletions
@@ -1,19 +1,25 @@ pkgbase = eddie-ui-git - pkgdesc = Eddie - VPN tunnel - UI - beta - pkgver = 2.21.7 + pkgdesc = Eddie - VPN tunnel - UI + pkgver = 2.24.2 pkgrel = 1 url = https://eddie.website install = eddie-ui.install - arch = i686 arch = x86_64 + arch = aarch64 + arch = armv7l license = GPLv3 makedepends = cmake + makedepends = dotnet-sdk + makedepends = mono-msbuild + makedepends = mono depends = mono + depends = curl depends = openvpn depends = sudo + depends = polkit depends = desktop-file-utils depends = libnotify - depends = libappindicator-gtk2 + depends = libayatana-appindicator depends = patchelf optdepends = stunnel: VPN over SSL optdepends = openssh: VPN over SSH @@ -21,6 +27,7 @@ pkgbase = eddie-ui-git conflicts = airvpn conflicts = airvpn-beta-bin conflicts = airvpn-git + options = !strip source = git+https://github.com/AirVPN/Eddie.git sha1sums = SKIP @@ -1,110 +1,174 @@ # Maintainer: Eddie.website <maintainer@eddie.website> # Based on work by Uncle Hunto <unclehunto äτ ÝãΗ00 Ð0τ ÇÖΜ> and Beini <bane aτ iki dot fi> -# Current issues: -# - eddie-tray don't build, depend on Community package libappindicator-gtk2 -# - msbuild vs xbuild -# - target framework not v4.8 pkgname=eddie-ui-git -pkgver=2.21.7 +pkgver=2.24.2 pkgrel=1 -pkgdesc='Eddie - VPN tunnel - UI - beta' -arch=('i686' 'x86_64') +pkgdesc='Eddie - VPN tunnel - UI' +arch=('x86_64' 'aarch64' 'armv7l') url=https://eddie.website license=(GPLv3) -depends=(mono openvpn sudo desktop-file-utils libnotify libappindicator-gtk2 patchelf) +depends=(mono curl openvpn sudo polkit desktop-file-utils libnotify libayatana-appindicator patchelf) optdepends=('stunnel: VPN over SSL' 'openssh: VPN over SSH') -makedepends=('cmake') +makedepends=(cmake dotnet-sdk mono-msbuild mono) provides=('eddie-ui') conflicts=('airvpn' 'airvpn-beta-bin' 'airvpn-git') install=eddie-ui.install source=('git+https://github.com/AirVPN/Eddie.git') sha1sums=('SKIP') +options=('!strip') # Incompatible with net7 -case "$CARCH" in - i686) _pkgarch="x86" - ;; - x86_64) _pkgarch="x64" - ;; -esac -build() { - export TERM=xterm # Fix Mono bug "Magic number is wrong". - # Compile C# sources - # Forced target framework, otherwise throw - # warning : TargetFrameworkVersion 'v4.8' not supported by this toolset (ToolsVersion: 14.0). - # even on recent Manjaro (updated 2022-04-19) +ARCH=$CARCH +RID=linux-$CARCH +if [ "$RID" = "linux-x86_64" ]; then + ARCH=x64 + RID=linux-x64 +elif [ "$RID" = "linux-aarch64" ]; then + RID=linux-arm64 +elif [ "$RID" = "linux-armv7l" ]; then + RID=linux-arm +fi + +build() { + + CONFIG=Release - # throw - # xbuild tool is deprecated and will be removed in future updates, use msbuild instead - # but never understand right dependencies that works on every Arch distro cd "Eddie" - if [ "ui" = "cli" ]; then - xbuild /verbosity:minimal /p:TargetFrameworkVersion="v4.5" /p:Configuration="Release" /p:Platform="$_pkgarch" src/eddie.linux.cli.sln - elif [ "ui" = "ui" ]; then - xbuild /verbosity:minimal /p:TargetFrameworkVersion="v4.5" /p:Configuration="Release" /p:Platform="$_pkgarch" src/eddie2.linux.ui.sln + + # CLI + if true; then + + chmod +x src/App.CLI.Linux/postbuild.sh + chmod +x src/Lib.Platform.Linux.Native/build.sh + + cd "src/App.CLI.Linux/" + + dotnet publish App.CLI.Linux.net7.csproj --configuration ${CONFIG} --runtime ${RID} --self-contained true -p:PublishTrimmed=true -p:EnableCompressionInSingleFile=true + + cd "../../" + fi + + # UI + if [ "ui" = "ui" ]; then + FRAMEWORK="net4" # Forced for now + if [ $FRAMEWORK = "net7" ]; then + chmod +x src/App.UI.Linux/build.sh + "src/App.UI.Linux/build.sh" Release + elif [ $FRAMEWORK = "net4" ]; then + + # Note: x64 in path hardcoded, correct, net4 build are CIL + + export TERM=xterm # Fix Mono bug "Magic number is wrong". + TARGETFRAMEWORK="v4.8"; + RULESETPATH="src/ruleset/norules.ruleset" + SOLUTIONPATH="src/App.Forms.Linux//App.Forms.Linux.sln" + + # clean temporary files from net7 compilation above, otherwise throw 'Your project does not reference ".NETFramework,Version=v4.8"' + rm -rf "src/Lib.Core/bin" + rm -rf "src/Lib.Core/obj" + rm -rf "src/Lib.Platform.Linux/bin" + rm -rf "src/Lib.Platform.Linux/obj" + + # msbuild is available when monodevelop is installed (reccomended) + # xbuild is available when mono-complete is installed (deprecated) + msbuild /verbosity:minimal /p:Configuration=${CONFIG} /p:Platform=x64 /p:TargetFrameworkVersion=${TARGETFRAMEWORK} /t:Rebuild "${SOLUTIONPATH}" /p:DefineConstants="EDDIEMONO4LINUX" + + # msbuild/Mono under Linux don't honor the postbuild event, called manually + "src/App.Forms.Linux/postbuild.sh" "src/App.Forms.Linux/bin/x64/${CONFIG}/" ${ARCH} ${CONFIG} + + # mkbundle + if [ $ARCH = "x64" ]; then + MKBUNDLECROSSTARGET="mono-6.8.0-debian-10-x64" + elif [ $ARCH = "armv7l" ]; then + MKBUNDLECROSSTARGET="mono-6.0.0-raspbian-9-arm" + elif [ $ARCH = "aarch64" ]; then + MKBUNDLECROSSTARGET="mono-6.6.0-debian-10-arm64" + else + MKBUNDLECROSSTARGET="mono-6.8.0-debian-10-${ARCH}" + fi + + # Issue here, check with 'mkbundle --list-targets' + #mkdir -p /home/pi/.mono/targets/${MKBUNDLECROSSTARGET}/lib/mono # Not sure if need + if [[ ! -d ${HOME}/.mono/targets/${MKBUNDLECROSSTARGET} ]]; then + echo Download mkbundle target. If break here, check with 'mkbundle --list-targets' and fix build.sh MKBUNDLECROSSTARGET + mkbundle --fetch-target ${MKBUNDLECROSSTARGET} + fi + + # Update config + cp ${HOME}/.mono/targets/${MKBUNDLECROSSTARGET}/etc/mono/config src/App.Forms.Linux/bin/x64/Release/mkbundle.config + sed -i 's/\$mono_libdir\///g' src/App.Forms.Linux/bin/x64/Release/mkbundle.config + + cd src/App.Forms.Linux/bin/x64/Release/ + mkbundle App.Forms.Linux.exe -o eddie-ui --cross ${MKBUNDLECROSSTARGET} --i18n all --config mkbundle.config --library ../../../../../repository/linux_portable/mkbundle/${ARCH}/libMonoPosixHelper.so --library ../../../../../repository/linux_portable/mkbundle/${ARCH}/libgdiplus.so.0 --library /usr/lib/libmono-native.so + cd ../../../../.. + fi fi - # Compile C sources - chmod +x src/eddie.linux.postbuild.sh - chmod +x src/Lib.Platform.Linux.Native/build.sh - chmod +x src/UI.GTK.Linux.Tray/build.sh + # Generate changelog + curl "https://eddie.website/changelog/?software=client&format=debian&hidden=yes" -o "changelog" + gzip -n -9 "changelog" if [ "ui" = "cli" ]; then - src/eddie.linux.postbuild.sh "src/App.CLI.Linux/bin/$_pkgarch/Release/" ui $_pkgarch Release - elif [ "ui" = "ui" ]; then - src/eddie.linux.postbuild.sh "src/App.Forms.Linux/bin/$_pkgarch/Release/" ui $_pkgarch Release + # Generate man + "src/App.CLI.Linux/bin/Release/net7.0/${RID}/publish/eddie-cli" --path.resources="../../../../../../resources" --help --help.format=man >"eddie-cli.8" + gzip -n -9 "eddie-cli.8" fi + } package() { - cd "Eddie" - install -Dm755 "src/App.CLI.Linux.Elevated/bin/eddie-cli-elevated" "$pkgdir/usr/lib/eddie-ui/eddie-cli-elevated" - install -Dm644 "src/Lib.Core/bin/$_pkgarch/Release/Lib.Core.dll" "$pkgdir/usr/lib/eddie-ui/Lib.Core.dll" - install -Dm644 "src/Lib.Platform.Linux/bin/$_pkgarch/Release/Lib.Platform.Linux.dll" "$pkgdir/usr/lib/eddie-ui/Lib.Platform.Linux.dll" - install -Dm644 "src/Lib.Platform.Linux.Native/bin/libLib.Platform.Linux.Native.so" "$pkgdir/usr/lib/eddie-ui/libLib.Platform.Linux.Native.so" + cd "Eddie" + install -Dm755 "repository/linux_arch/bundle/eddie-ui/usr/bin/eddie-ui" "$pkgdir/usr/bin/eddie-ui" - sed -i 's/{@lib}/lib/g' "$pkgdir/usr/bin/eddie-ui" - install -Dm644 "common/manifest.json" "$pkgdir/usr/share/eddie-ui/manifest.json" - install -Dm644 "common/libraries.txt" "$pkgdir/usr/share/eddie-ui/libraries.txt" - install -Dm644 "common/gpl3.txt" "$pkgdir/usr/share/eddie-ui/gpl3.txt" - install -Dm644 "common/cacert.pem" "$pkgdir/usr/share/eddie-ui/cacert.pem" - install -Dm644 "common/icon.png" "$pkgdir/usr/share/eddie-ui/icon.png" - install -Dm644 "common/icon_gray.png" "$pkgdir/usr/share/eddie-ui/icon_gray.png" - install -Dm644 "common/icon.png" "$pkgdir/usr/share/eddie-ui/tray.png" - install -Dm644 "common/icon_gray.png" "$pkgdir/usr/share/eddie-ui/tray_gray.png" - install -Dm644 "common/iso-3166.json" "$pkgdir/usr/share/eddie-ui/iso-3166.json" - install -Dm644 "common/lang/inv.json" "$pkgdir/usr/share/eddie-ui/lang/inv.json" - install -Dm644 "common/providers/AirVPN.json" "$pkgdir/usr/share/eddie-ui/providers/AirVPN.json" - install -Dm644 "common/providers/OpenVPN.json" "$pkgdir/usr/share/eddie-ui/providers/OpenVPN.json" - install -Dm644 "common/providers/WireGuard.json" "$pkgdir/usr/share/eddie-ui/providers/WireGuard.json" + + install -Dm644 "resources/eddie-vpn.txt" "$pkgdir/usr/share/eddie-ui/eddie-vpn.txt" + install -Dm644 "resources/manifest.json" "$pkgdir/usr/share/eddie-ui/manifest.json" + install -Dm644 "resources/libraries.txt" "$pkgdir/usr/share/eddie-ui/libraries.txt" + install -Dm644 "resources/gpl3.txt" "$pkgdir/usr/share/eddie-ui/gpl3.txt" + install -Dm644 "resources/cacert.pem" "$pkgdir/usr/share/eddie-ui/cacert.pem" + install -Dm644 "resources/iso-3166.json" "$pkgdir/usr/share/eddie-ui/iso-3166.json" + + install -Dm644 "resources/lang/inv.json" "$pkgdir/usr/share/eddie-ui/lang/inv.json" + + install -Dm644 "resources/icons/appindicator.png" "$pkgdir/usr/share/eddie-ui/icons/appindicator.png" + install -Dm644 "resources/icons/appindicator-gray.png" "$pkgdir/usr/share/eddie-ui/icons/appindicator-gray.png" + install -Dm644 "resources/icons/notifyicon.ico" "$pkgdir/usr/share/eddie-ui/icons/notifyicon.ico" + install -Dm644 "resources/icons/notifyicon-gray.ico" "$pkgdir/usr/share/eddie-ui/icons/notifyicon-gray.ico" + install -Dm644 "resources/icons/icon.png" "$pkgdir/usr/share/eddie-ui/icons/icon.png" + install -Dm644 "resources/icons/icon-gray.png" "$pkgdir/usr/share/eddie-ui/icons/icon-gray.png" + + install -Dm644 "resources/providers/OpenVPN.json" "$pkgdir/usr/share/eddie-ui/providers/OpenVPN.json" + install -Dm644 "resources/providers/WireGuard.json" "$pkgdir/usr/share/eddie-ui/providers/WireGuard.json" + install -Dm644 "resources/providers/AirVPN.json" "$pkgdir/usr/share/eddie-ui/providers/AirVPN.json" + install -Dm644 "repository/linux_arch/bundle/eddie-ui/usr/share/doc/eddie-ui/copyright" "$pkgdir/usr/share/doc/eddie-ui/copyright" install -Dm644 "repository/linux_arch/bundle/eddie-ui/usr/share/polkit-1/actions/org.airvpn.eddie.ui.elevated.policy" "$pkgdir/usr/share/polkit-1/actions/org.airvpn.eddie.ui.elevated.policy" - sed -i 's/{@lib}/lib/g' "$pkgdir/usr/share/polkit-1/actions/org.airvpn.eddie.ui.elevated.policy" + + install -Dm644 "changelog.gz" "$pkgdir/usr/share/doc/eddie-ui/changelog.gz" + + install -Dm755 "src/App.CLI.Linux/bin/Release/net7.0/${RID}/libLib.Platform.Linux.Native.so" "$pkgdir/usr/lib/eddie-ui/libLib.Platform.Linux.Native.so" + install -Dm755 "src/App.CLI.Linux/bin/Release/net7.0/${RID}/eddie-cli-elevated" "$pkgdir/usr/lib/eddie-ui/eddie-cli-elevated" + install -Dm755 "src/App.CLI.Linux/bin/Release/net7.0/${RID}/publish/eddie-cli" "$pkgdir/usr/lib/eddie-ui/eddie-cli" if [ "ui" = "cli" ]; then - install -Dm755 "src/App.CLI.Linux/bin/$_pkgarch/Release/App.CLI.Linux.exe" "$pkgdir/usr/lib/eddie-ui/eddie-ui.exe" + install -Dm644 "eddie-cli.8.gz" "$pkgdir/usr/share/man/man8/eddie-cli.8.gz" elif [ "ui" = "ui" ]; then - install -Dm755 "src/App.Forms.Linux/bin/$_pkgarch/Release/App.Forms.Linux.exe" "$pkgdir/usr/lib/eddie-ui/eddie-ui.exe" - install -Dm644 "src/App.Forms.Linux/bin/$_pkgarch/Release/Lib.Forms.dll" "$pkgdir/usr/lib/eddie-ui/Lib.Forms.dll" - install -Dm644 "src/App.Forms.Linux/bin/$_pkgarch/Release/Lib.Forms.Skin.dll" "$pkgdir/usr/lib/eddie-ui/Lib.Forms.Skin.dll" - install -Dm755 "src/UI.GTK.Linux.Tray/bin/eddie-tray" "$pkgdir/usr/lib/eddie-ui/eddie-tray" + FRAMEWORK="net4" # Forced for now + if [ $FRAMEWORK = "net7" ]; then + echo TODO + elif [ $FRAMEWORK = "net4" ]; then + install -Dm755 "src/App.Forms.Linux.Tray/bin/eddie-tray" "$pkgdir/usr/lib/eddie-ui/eddie-tray" + install -Dm755 "src/App.Forms.Linux/bin/x64/Release/eddie-ui" "$pkgdir/usr/lib/eddie-ui/eddie-ui" + fi + install -Dm644 "repository/linux_arch/bundle/eddie-ui/usr/share/pixmaps/eddie-ui.png" "$pkgdir/usr/share/pixmaps/eddie-ui.png" - fi - - # remember: the day when common/webui is need, i need a script that generate 'install' line above for each file, include dir is unresolved - - # Generate changelog - curl "https://eddie.website/changelog/?software=client&format=debian&hidden=yes" -o "$pkgdir/usr/share/doc/eddie-ui/changelog" - gzip -n -9 "$pkgdir/usr/share/doc/eddie-ui/changelog" + fi - # Generate man - mkdir -p "$pkgdir/usr/share/man/man8/" - mono "$pkgdir/usr/lib/eddie-ui/eddie-ui.exe" --cli --path.resources="$pkgdir/usr/share/eddie-ui/" --help --help.format=man >"$pkgdir/usr/share/man/man8/eddie-ui.8" - gzip -n -9 "$pkgdir/usr/share/man/man8/eddie-ui.8" + # Unknown if this is need today, 2023-12-12 if [ "ui" = "ui" ]; then ## Fix .desktop file for KDE _desktop_session=$(printf "%s" "$DESKTOP_SESSION" | awk -F "/" '{print $NF}') |