summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authordevome2024-01-12 10:21:48 +0800
committerdevome2024-01-12 10:21:48 +0800
commit9faa0c3b173bbac64cf3aa2cccaa9ba4149dcee8 (patch)
tree49b9539a7ef2a3898400e18cb88f516edbb5e24a /PKGBUILD
downloadaur-9faa0c3b173bbac64cf3aa2cccaa9ba4149dcee8.tar.gz
chinesesubfinder: 0.55.3-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8443f61dc74d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Evine Deng <evinedeng@hotmail.com>
+
+pkgname="chinesesubfinder"
+_reponame=ChineseSubFinder
+pkgver=0.55.3
+pkgrel=1
+pkgdesc="Automated Chinese subtitle download | 自动化中文字幕下载"
+arch=(x86_64 aarch64 armv7h armv6h)
+url="https://github.com/${_reponame}/${_reponame}"
+license=("MIT")
+depends=("ffmpeg" "gcc-libs" "glibc" "systemd")
+makedepends=("npm" "git" "go")
+source=("${pkgname}::git+${url}"
+ "${pkgname}.service"
+ "${pkgname}.sysusers"
+ "${pkgname}.tmpfiles")
+sha256sums=('SKIP'
+ 'cc25beda2192dec17dfe75cd4bb4a7feba21e11db4768da8ab288f00e8cc9fa9'
+ 'd8c780bdf927d5535a9ddd34e391866a8d81981a68890a7a043efaeadb7437ee'
+ '4ddd99ba5b6722a66f27762614320cd700b044b8e983962c83e208f5610d960a')
+
+build() {
+ cd "${pkgname}"
+ git checkout "v${pkgver}"
+ npm --prefix frontend install
+ npm --prefix frontend run build
+ go mod tidy
+
+ local ldflags=" \
+ -s -w \
+ -X main.AppVersion=v${pkgver} \
+ -X main.LiteMode=true \
+ -extldflags '${LDFLAGS}'
+ "
+ go build \
+ -ldflags="$ldflags" \
+ -o chinesesubfinder \
+ ./cmd/chinesesubfinder
+}
+
+package() {
+ install -Dm755 "${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}