summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorKimiblock2023-11-19 20:40:55 +0800
committerKimiblock2023-11-19 20:40:55 +0800
commit31d35c86bf55329f6a39a5cba6392f3b29d5f47f (patch)
treeeec161e5cb31e29ebe6a772d45ed2a34b417832b /PKGBUILD
downloadaur-clash2singbox-git.tar.gz
Initial Commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3a90dd3087bb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Kimiblock Moe
+
+pkgname=clash2singbox-git
+pkgver=r106.ab07d2d
+pkgrel=1
+pkgdesc="将 clash.meta 格式的配置文件或链接转换为 sing-box 格式 "
+arch=("any")
+url="https://github.com/xmdhs/clash2singbox"
+license=("MIT")
+depends=()
+makedepends=('go')
+conflicts=('clash2singbox')
+provides=('clash2singbox')
+backup=()
+source=("git+https://github.com/xmdhs/clash2singbox.git")
+sha256sums=('SKIP')
+
+function pkgver() {
+ cd "${srcdir}/clash2singbox"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+function prepare() {
+ cd "${srcdir}/clash2singbox"
+}
+
+function build() {
+ cd "${srcdir}/clash2singbox"
+ go build -trimpath -buildmode=pie -mod=readonly -modcacherw -ldflags "-linkmode external -extldflags \"${LDFLAGS}\""
+}
+
+function check() {
+ cd "${srcdir}/clash2singbox"
+ go test ./...
+}
+
+function package() {
+ install -Dm755 "${srcdir}/clash2singbox/clash2singbox" "${pkgdir}/usr/bin/clash2singbox"
+}