summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorr22023-07-17 18:18:53 +0800
committerr22023-07-17 18:18:53 +0800
commit523f636e50cae5a01e621757ad39ef0bc2aed42f (patch)
tree2e4fc142412b540fe9a3553a44de6b9c5f3d63a8
parentd73a115ac946ef01f146eeb61491634cfb4d0653 (diff)
downloadaur-oxwu.tar.gz
bump version to 4.1.0
Thanks @axzxc1236's contribution
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD64
3 files changed, 33 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94627217007d..6397d983d0fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,12 @@
pkgbase = oxwu
pkgdesc = The GUI software using P2P networking to fastly report Earthquakes in Taiwan
- pkgver = 3.0.0
+ pkgver = 4.1.0
pkgrel = 1
url = https://eew.earthquake.tw
arch = x86_64
- license = custom
- source = https://eew.earthquake.tw/releases/OXWU-Setup-linux64.deb
- sha512sums = abbbdf60d6807fa41f56862aa607c589a5f0e9032d95de4d22e7ea1eaf6a99448551a24fa9d31f2ec1cfb5b2690d752e6a27a8c8b6819a994ca28dfc115b1cf1
+ noextract = oxwu-4.1.0.AppImage
+ options = !strip
+ source = oxwu-4.1.0.AppImage::https://eew.earthquake.tw/releases/linux/x64/oxwu-linux-x86_64.AppImage
+ sha512sums = e208dd1a1db22744ff2f7f6edacf8bf93db9b46e38398b028f71ccb52e810e0e5b93b632540f902593c4d7c3a13a2225a164755fc62674630da3c02b72ed6e0a
pkgname = oxwu
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b5ae6d787455
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.AppImage
+*.pkg.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
index f9f2160af26a..5bc677d7a30f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,51 +1,39 @@
# Contributor: holishing
+# Contributor: axzxc1236
pkgname=oxwu
-pkgver=3.0.0
+pkgver=4.1.0
pkgrel=1
pkgdesc="The GUI software using P2P networking to fastly report Earthquakes in Taiwan"
arch=('x86_64')
url="https://eew.earthquake.tw"
-license=('custom')
-source=('https://eew.earthquake.tw/releases/OXWU-Setup-linux64.deb')
-sha512sums=('abbbdf60d6807fa41f56862aa607c589a5f0e9032d95de4d22e7ea1eaf6a99448551a24fa9d31f2ec1cfb5b2690d752e6a27a8c8b6819a994ca28dfc115b1cf1')
+source=("oxwu-$pkgver.AppImage::https://eew.earthquake.tw/releases/linux/x64/oxwu-linux-x86_64.AppImage")
+sha512sums=('e208dd1a1db22744ff2f7f6edacf8bf93db9b46e38398b028f71ccb52e810e0e5b93b632540f902593c4d7c3a13a2225a164755fc62674630da3c02b72ed6e0a')
+noextract=("oxwu-$pkgver.AppImage")
+options+=('!strip')
prepare() {
- bsdtar -xvf data.tar.xz -C "${srcdir}"
- # Fix directories structure differencies (We cannot do this because the path is fixed)
cd "${srcdir}"
+ # Extract appimage content
+ chmod +x oxwu-$pkgver.AppImage
+ ./oxwu-$pkgver.AppImage --appimage-extract > /dev/null
+ # Fix permissions; .AppImage permissions are 700 for all directories
+ chmod -R a-x+rX squashfs-root/usr
}
-package(){
- install -dm755 "${pkgdir}"/opt
- install -dm755 "${pkgdir}"/usr/bin
- install -dm755 "${pkgdir}"/usr/share/applications
- cp -r "${srcdir}"/opt/OXWU "${pkgdir}"/opt/
- mv -v "${pkgdir}"'/opt/OXWU/Program/地牛Wake Up!' "${pkgdir}"'/opt/OXWU/Program/oxwu'
- ln -rsv "${pkgdir}"/opt/OXWU/Program/oxwu "${pkgdir}"/usr/bin/oxwu
-
- # SystemD user service
- install -Dm644 /dev/stdin "${pkgdir}"/usr/lib/systemd/user/oxwu.service <<END
-[Unit]
-Description=The GUI software based on NW.js using P2P networking to report Taiwan's Earthquake
-
-[Service]
-Environment="LD_LIBRARY_PATH=/opt/OXWU/Program/lib/"
-ExecStart='/opt/OXWU/Program/oxwu'
-
-[Install]
-WantedBy=default.target
-END
+build() {
+ # Adjust .desktop so it will work outside of AppImage container
+ sed -i -E 's|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /opt/OXWU/oxwu.AppImage|' 'squashfs-root/oxwu.desktop'
+}
- # Application entry
- install -Dm644 /dev/stdin "${pkgdir}"/usr/share/applications/OXWU.desktop <<END
-[Desktop Entry]
-Name=地牛Wake Up!
-Comment=台灣地震速報
-Exec='/opt/OXWU/Program/oxwu'
-Icon=/opt/OXWU/Program/app/image/icon.png
-Type=Application
-Categories=Network;
-Encoding=UTF-8
-Terminal=false
-END
+package() {
+ install -Dm755 "${srcdir}/oxwu-$pkgver.AppImage" "${pkgdir}/opt/OXWU/oxwu.AppImage"
+ # create symbolic link
+ install -dm755 "${pkgdir}/usr/bin"
+ ln -s "${pkgdir}/opt/OXWU/oxwu.AppImage" "${pkgdir}/usr/bin/oxwu"
+ # Icon images
+ install -dm755 "${pkgdir}/usr/share/"
+ cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"
+ install -Dm644 "${srcdir}/squashfs-root/oxwu.png" "${pkgdir}/opt/OXWU/oxwu.png"
+ install -Dm644 "${srcdir}/squashfs-root/oxwu.desktop" "${pkgdir}/usr/share/applications/oxwu.desktop"
+ install -Dm644 "${srcdir}/squashfs-root/oxwu.desktop" "${pkgdir}/etc/xdg/autostart/oxwu.desktop"
}