makedeb


ddns-go-bin 4.0.0-1


简单好用的DDNS。自动更新域名解析到公网IP(支持阿里云、腾讯云dnspod、Cloudflare、华为云)

Click here to go back to the commit logs for ddns-go-bin.

Commit:


Hash: c2026412f246423da01d2666491c3a325ffbe4b9

Message: Fix architecture name detection

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 09332a8..5de256e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,7 +2,7 @@ generated-by = makedeb
 pkgname = ddns-go-bin
 pkgbase = ddns-go-bin
 pkgdesc = 简单好用的DDNS。自动更新域名解析到公网IP(支持阿里云、腾讯云dnspod、Cloudflare、华为云)
-pkgrel = 1
+pkgrel = 2
 pkgver = 3.7.2
 url = https://github.com/jeessy2/ddns-go
 arch = any
diff --git a/PKGBUILD b/PKGBUILD
index f6442c6..905c5c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _repo=jeessy2/ddns-go
 
 pkgname=${_pkgname}-bin
 pkgver=3.7.2
-pkgrel=1
+pkgrel=2
 pkgdesc='简单好用的DDNS。自动更新域名解析到公网IP(支持阿里云、腾讯云dnspod、Cloudflare、华为云)'
 license=('MIT')
 arch=('any')
@@ -20,10 +20,19 @@ pkgver() {
     curl https://api.github.com/repos/jeessy2/ddns-go/releases/latest | sed -nE 's/^  "tag_name": "v(.+)",$/\1/p'
 }
 
+_goarch() {
+    DPKG_ARCH="$(dpkg --print-architecture)"
+    if [[ "$DPKG_ARCH" == "amd64" ]]; then
+        echo "x86_64"
+    else
+        echo "$DPKG_ARCH"
+    fi
+}
+
 build() {
     cd "${srcdir}"
 
-    RELEASE_FILENAME="ddns-go_${pkgver}_Linux_$(dpkg --print-architecture).tar.gz"
+    RELEASE_FILENAME="ddns-go_${pkgver}_Linux_$(_goarch).tar.gz"
     wget "https://github.com/${_repo}/releases/download/v${pkgver}/${RELEASE_FILENAME}" -O "${RELEASE_FILENAME}"
 
     tar xzvf "${RELEASE_FILENAME}"