summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorirmluity2023-11-14 09:10:17 +0800
committerirmluity2023-11-14 09:10:17 +0800
commit4d7d394d4c6e2d9bcddcd5421e91576a5a9e8a5f (patch)
treea93fb04a52b0945c2ed070dc03ee4ac086f3319a
downloadaur-4d7d394d4c6e2d9bcddcd5421e91576a5a9e8a5f.tar.gz
create package
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD64
-rw-r--r--singland.desktop9
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..183c0df3fd37
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = singland
+ pkgdesc = A GUI for sing-box. The universal proxy platform
+ pkgver = pre_alpha_4
+ pkgrel = 1
+ url = https://github.com/net-breaker/sing-land
+ arch = x86_64
+ license = MIT
+ makedepends = nodejs
+ makedepends = npm
+ depends = hicolor-icon-theme
+ depends = glibc
+ optdepends = gnome-shell-extension-appindicator: for system tray icon if you are using Gnome
+ conflicts = singland-git
+ conflicts = singland-bin
+ options = !strip
+ source = https://github.com/net-breaker/sing-land/archive/refs/tags/pre-alpha-4.zip
+ source = https://github.com/SagerNet/sing-box/releases/download/v1.6.0/sing-box-1.6.0-linux-amd64.tar.gz
+ source = singland.desktop
+ sha256sums = abc7499ee2de6a8f13e084de58d0346bbac82d151277e1d5054f676b5bf7cf8f
+ sha256sums = ffa107294e7a6b29805e32cc1fa0147a50b0ba8d0722582d457e5e60ac34a052
+ sha256sums = bedcc8193fcadf9e33c4117bf47fa9e479abd2fc88548571323b26d9b4cbf77a
+
+pkgname = singland
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..550c303d16d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: irmluity <45vw4yz8g@mozmail.com>
+
+pkgname=singland
+pkgver=pre_alpha_4
+pkgrel=1
+pkgdesc="A GUI for sing-box. The universal proxy platform"
+arch=(x86_64)
+url='https://github.com/net-breaker/sing-land'
+license=('MIT')
+depends=('hicolor-icon-theme' 'glibc')
+makedepends=('nodejs' 'npm')
+optdepends=(
+ 'gnome-shell-extension-appindicator: for system tray icon if you are using Gnome'
+)
+conflicts=('singland-git' 'singland-bin')
+options=(!strip)
+source=(
+ "https://github.com/net-breaker/sing-land/archive/refs/tags/${pkgver//_/-}.zip"
+ "https://github.com/SagerNet/sing-box/releases/download/v1.6.0/sing-box-1.6.0-linux-amd64.tar.gz"
+ "singland.desktop"
+)
+sha256sums=(
+ "abc7499ee2de6a8f13e084de58d0346bbac82d151277e1d5054f676b5bf7cf8f"
+ "ffa107294e7a6b29805e32cc1fa0147a50b0ba8d0722582d457e5e60ac34a052"
+ "bedcc8193fcadf9e33c4117bf47fa9e479abd2fc88548571323b26d9b4cbf77a"
+)
+_install_path="/opt/$pkgname"
+
+prepare() {
+ cd "${srcdir}"
+ mv sing-box-1.6.0-linux-amd64/sing-box sing-land-${pkgver//_/-}/controller/resources/sing-box
+ cd "${srcdir}/sing-land-${pkgver//_/-}"
+ cd controller
+ npm ci
+ cd ../editor
+ npm ci
+ cd ../singland
+ npm ci
+}
+
+build() {
+ cd "${srcdir}/sing-land-${pkgver//_/-}/singland"
+ npm run init-unix
+ npm run build
+ mv ${srcdir}/sing-land-${pkgver//_/-}/singland/release/singland-*.tar.gz ${srcdir}/singland.tar.gz
+ tar -xvzf ${srcdir}/singland.tar.gz -C ${srcdir}/singland
+}
+
+
+package() {
+ cd "${srcdir}/singland"
+ find . -type f -exec install -Dm 755 {} "$pkgdir/$_install_path"/{} \;
+
+ install -Dm644 "${srcdir}/singland.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"
+
+ for _icons in 32 256 512;do
+ install -Dm644 "${srcdir}/singland/resources/icons/logo-${_icons}.png" "${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname}.png"
+ done
+
+ install -dm755 "${pkgdir}/usr/bin"
+ ln -s "/opt/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+
+ install -Dm644 "$srcdir/singland/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/singland.desktop b/singland.desktop
new file mode 100644
index 000000000000..3c3c899de002
--- /dev/null
+++ b/singland.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=singland
+Exec=/opt/singland/singland %U
+Terminal=false
+Type=Application
+Icon=singland
+StartupWMClass=singland
+Comment=A GUI for sing-box
+Categories=Network;