diff --git a/.SRCINFO b/.SRCINFO index 493ed41e091b3..5c6b5b5d319a0 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,27 +1,26 @@ pkgbase = smoothcsv-bin - pkgdesc = A powerful and intuitive tool for editing CSV files - pkgver = 3.9.3 - pkgrel = 2 - url = https://smoothcsv.com/ + pkgdesc = A powerful and intuitive CSV editor built for real work + pkgver = 3.10.0 + pkgrel = 1 + url = https://smoothcsv.com arch = x86_64 arch = aarch64 license = LicenseRef-SmoothCSV + depends = gtk3 + depends = webkit2gtk-4.1 + depends = libayatana-appindicator + depends = hicolor-icon-theme + depends = xdg-utils + depends = libsoup3 depends = cairo depends = gdk-pixbuf2 - depends = webkit2gtk-4.1 - depends = gcc-libs - depends = glibc - depends = gtk3 - depends = glib2 - depends = libsoup3 - depends = hicolor-icon-theme provides = smoothcsv conflicts = smoothcsv source = LICENSE-SmoothCSV.md::https://raw.githubusercontent.com/kohii/smoothcsv-website/refs/heads/main/src/pages/terms.md sha256sums = 21185cf5a704c8c91420cb9f25baf0937f852e3a40ada396b9f29cedf79bfab0 - source_x86_64 = https://github.com/kohii/smoothcsv3/releases/download/v3.9.3/SmoothCSV-3.9.3-1.x86_64.rpm - sha256sums_x86_64 = 516a6c4dadaa6a65be0d80e92e68ca558ecb148c349ce42339bd1c0e1e3f00aa - source_aarch64 = https://github.com/kohii/smoothcsv3/releases/download/v3.9.3/SmoothCSV-3.9.3-1.aarch64.rpm - sha256sums_aarch64 = 9cbfc8e3a6bb2bf470ac1d0ad069178e908915e98f15525fb5023619b50ef340 + source_x86_64 = SmoothCSV_3.10.0_amd64.deb::https://github.com/kohii/smoothcsv3/releases/download/v3.10.0/SmoothCSV_3.10.0_amd64.deb + sha256sums_x86_64 = 63f27b7144bddcccce60a8c2da7f9ffea039d22d3792665adf1e0ae1ffdce6ca + source_aarch64 = SmoothCSV_3.10.0_arm64.deb::https://github.com/kohii/smoothcsv3/releases/download/v3.10.0/SmoothCSV_3.10.0_arm64.deb + sha256sums_aarch64 = 2fae1ed6ac7df92100afad12d99e5d231d8e47723674ba5faafcc116bd997712 pkgname = smoothcsv-bin diff --git a/PKGBUILD b/PKGBUILD index 5cd50aaa0d7ba..497c7a29ce68c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,30 +1,89 @@ -# Maintainer: Yuki Ibe - +# Maintainer: kohii pkgname=smoothcsv-bin -pkgver=3.9.3 -pkgrel=2 -_rpmver=${pkgver}-1 -pkgdesc="A powerful and intuitive tool for editing CSV files" +pkgver=3.10.0 +pkgrel=1 +pkgdesc="A powerful and intuitive CSV editor built for real work" arch=('x86_64' 'aarch64') -url="https://smoothcsv.com/" +url="https://smoothcsv.com" license=('LicenseRef-SmoothCSV') -depends=(cairo gdk-pixbuf2 webkit2gtk-4.1 gcc-libs glibc gtk3 glib2 libsoup3 hicolor-icon-theme) -provides=("${pkgname%-bin}") -conflicts=("${pkgname%-bin}") +depends=('gtk3' 'webkit2gtk-4.1' 'libayatana-appindicator' 'hicolor-icon-theme' 'xdg-utils' 'libsoup3' 'cairo' 'gdk-pixbuf2') +provides=('smoothcsv') +conflicts=('smoothcsv') source=("LICENSE-SmoothCSV.md::https://raw.githubusercontent.com/kohii/smoothcsv-website/refs/heads/main/src/pages/terms.md") -source_x86_64=("https://github.com/kohii/smoothcsv3/releases/download/v${pkgver}/SmoothCSV-${_rpmver}.x86_64.rpm") -source_aarch64=("https://github.com/kohii/smoothcsv3/releases/download/v${pkgver}/SmoothCSV-${_rpmver}.aarch64.rpm") +source_x86_64=("SmoothCSV_${pkgver}_amd64.deb::https://github.com/kohii/smoothcsv3/releases/download/v${pkgver}/SmoothCSV_${pkgver}_amd64.deb") +source_aarch64=("SmoothCSV_${pkgver}_arm64.deb::https://github.com/kohii/smoothcsv3/releases/download/v${pkgver}/SmoothCSV_${pkgver}_arm64.deb") sha256sums=('21185cf5a704c8c91420cb9f25baf0937f852e3a40ada396b9f29cedf79bfab0') -sha256sums_x86_64=('516a6c4dadaa6a65be0d80e92e68ca558ecb148c349ce42339bd1c0e1e3f00aa') -sha256sums_aarch64=('9cbfc8e3a6bb2bf470ac1d0ad069178e908915e98f15525fb5023619b50ef340') +sha256sums_x86_64=('63f27b7144bddcccce60a8c2da7f9ffea039d22d3792665adf1e0ae1ffdce6ca') +sha256sums_aarch64=('2fae1ed6ac7df92100afad12d99e5d231d8e47723674ba5faafcc116bd997712') prepare() { - sed -i '/^---$/,/^$/d' "$srcdir/LICENSE-SmoothCSV.md" + # Strip the front matter (--- ... ---) from the terms markdown. + awk ' + BEGIN { skip = 0; front = 1 } + front && /^---[[:space:]]*$/ { skip = 1; next } + front && skip && /^---[[:space:]]*$/ { skip = 0; front = 0; next } + skip { next } + { print } + ' "${srcdir}/LICENSE-SmoothCSV.md" > "${srcdir}/LICENSE-SmoothCSV.cleaned.md" } package() { - cp -dpR --no-preserve=ownership "$srcdir/usr" "$pkgdir/" + local deb_arch - install -Dm644 "$srcdir/LICENSE-SmoothCSV.md" \ - "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-SmoothCSV.md" + if [[ " ${arch[*]} " != *" ${CARCH} "* ]]; then + echo "Unsupported arch: $CARCH" >&2 + return 1 + fi + + if [[ $CARCH == aarch64 ]]; then + deb_arch="arm64" + else + deb_arch="amd64" + fi + + local deb="SmoothCSV_${pkgver}_${deb_arch}.deb" + + # Extract data.tar.* stream from the .deb and unpack it into $pkgdir + bsdtar -Oxf "$deb" data.tar.* | bsdtar -x -C "$pkgdir" -f - + + # Ensure the CLI launcher is exposed under /usr/bin/smoothcsv just like the + # Debian/RPM packages (AUR does not run maintainer scripts). + local cli_source="" + if [ -f "$pkgdir/usr/bin/smoothcsv-cli" ]; then + cli_source="/usr/bin/smoothcsv-cli" + chmod 755 "$pkgdir$cli_source" + elif [ -f "$pkgdir/usr/lib/com.smoothcsv.desktop/resources/smoothcsv-cli" ]; then + # Fallback for potential layout change; keep in sync with postinst.sh + cli_source="/usr/lib/com.smoothcsv.desktop/resources/smoothcsv-cli" + chmod 755 "$pkgdir$cli_source" + else + echo "Error: smoothcsv-cli not found in expected locations." >&2 + return 1 + fi + + install -d "$pkgdir/usr/bin" + if [ ! -e "$pkgdir/usr/bin/smoothcsv" ]; then + ln -s "$cli_source" "$pkgdir/usr/bin/smoothcsv" + fi + + # Inject distribution channel so the app can adjust behavior (e.g. auto-update) + for bin in smoothcsv smoothcsv-app; do + if [ -e "$pkgdir/usr/bin/$bin" ]; then + mv "$pkgdir/usr/bin/$bin" "$pkgdir/usr/bin/$bin.bin" + cat > "$pkgdir/usr/bin/$bin" <<'EOF' +#!/usr/bin/env bash +export SMOOTHCSV_DIST_CHANNEL="AUR" +exec /usr/bin/SMOOTHCSV_BIN "$@" +EOF + sed -i "s|SMOOTHCSV_BIN|$bin.bin|" "$pkgdir/usr/bin/$bin" + chmod 755 "$pkgdir/usr/bin/$bin" + fi + done + + for desktop_file in "$pkgdir"/usr/share/applications/*.desktop; do + [ -f "$desktop_file" ] || continue + sed -i 's|^Exec=|Exec=env SMOOTHCSV_DIST_CHANNEL=AUR |' "$desktop_file" + done + + install -Dm644 "${srcdir}/LICENSE-SmoothCSV.cleaned.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-SmoothCSV.md" }