summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikos Toutountzoglou2023-09-11 20:00:56 +0200
committerNikos Toutountzoglou2023-09-11 20:00:56 +0200
commit299b7cfb156e6779c1d7544d5b1a3dd73e11c765 (patch)
tree92120809b4ec33fbe0bb91fc7cb062eb0467a095
downloadaur-299b7cfb156e6779c1d7544d5b1a3dd73e11c765.tar.gz
Initial version 1.0.1
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD71
2 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dc7c4fa0d89d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = syndical
+ pkgdesc = An alternative to SamLoader - cleaner code, easier to understand and tamper with.
+ pkgver = 1.0.1
+ pkgrel = 1
+ url = https://github.com/Samsung-Loki/Syndical
+ arch = any
+ license = MPL2
+ makedepends = dotnet-sdk-5.0
+ depends = dotnet-runtime-5.0
+ depends = openssl-1.1
+ optdepends = android-udev: Adds udev rules for non-root users (Group adbusers)
+ source = syndical-1.0.1.tar.gz::https://github.com/Samsung-Loki/Syndical/archive/refs/tags/v1.0.1.tar.gz
+ sha256sums = 0f43a8a6013169eed41cfe58b5b05c93d941e4afc47f693e0af8cd2a04350ece
+
+pkgname = syndical
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..83e0e3a8ba89
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Nikos Toutountzoglou <nikos.toutou@protonmail.com>
+
+pkgname=syndical
+pkgver=1.0.1
+pkgrel=1
+_pkgname="Syndical-${pkgver}"
+_exe="Syndical.Application"
+pkgdesc="An alternative to SamLoader - cleaner code, easier to understand and tamper with."
+arch=('any')
+url="https://github.com/Samsung-Loki/Syndical"
+license=('MPL2')
+depends=('dotnet-runtime-5.0' 'openssl-1.1')
+makedepends=('dotnet-sdk-5.0')
+optdepends=('android-udev: Adds udev rules for non-root users (Group adbusers)')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Samsung-Loki/Syndical/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('0f43a8a6013169eed41cfe58b5b05c93d941e4afc47f693e0af8cd2a04350ece')
+
+build() {
+ cd "$srcdir"
+
+ # https://learn.microsoft.com/en-us/dotnet/core/tools/#cli-commands
+ # Add needed Nuget packages for building
+ _NuPkgs=(
+ "BouncyCastle.NetCore"
+ "CommandLineParser"
+ "Serilog"
+ "Serilog.Exceptions"
+ "Serilog.Sinks.Console"
+ "Spectre.Console"
+ )
+ _NuVers=(
+ "1.8.10"
+ "2.8.0"
+ "2.10.0"
+ "8.0.0"
+ "4.0.1"
+ "0.42.0"
+ )
+
+ for i in "${!_NuPkgs[@]}"; do
+ dotnet add ${_pkgname}/${_exe}/${_exe}.csproj \
+ package ${_NuPkgs[$i]} -v ${_NuVers[$i]} \
+ --package-directory NuGet
+ done
+
+ # Build Visual Studio solution
+ dotnet build ${_pkgname}/Syndical.sln \
+ --source NuGet \
+ --configuration Release \
+ --output build
+
+ # https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
+ # Cleanup NuGet global-packages (optional)
+ #dotnet nuget locals all --clear
+}
+
+package() {
+ cd "$srcdir"
+
+ # Install package
+ install -d "$pkgdir"/opt/$pkgname
+ cp -dr --no-preserve=ownership build/* "$pkgdir"/opt/$pkgname
+ find "$pkgdir" -name *.pdb -delete
+ # Install executable shell file
+ install -Dm0755 /dev/stdin "$pkgdir"/usr/bin/${_exe} << EOF
+#!/bin/bash
+dotnet /opt/syndical/Syndical.Application.dll "\$@"
+EOF
+ # Install license
+ install -Dm644 ${_pkgname}/LICENCE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}