Compare commits

..

3 Commits

Author SHA1 Message Date
6d009f5617 Updated pman-helper to 1.4.0-1 2026-07-26 21:46:59 +00:00
ab144b9617 Remove push.sh; superseded by the shared autoupdater
The per-repo push scripts had drifted into three divergent generations. The
logic now lives once in aur/.autoupdate, driven by the .autoupdate manifest.
2026-07-26 22:47:03 +02:00
394a2eb12a Add .autoupdate manifest; restore pkgver corrupted by a failed CI run
The nightly job wrote pkgver="" after its version query 404'd, taking the
sha256 of a zero-byte download with it. Restores 1.3.0 as the baseline; the
autoupdater takes it to 1.4.0 from there.
2026-07-26 09:31:51 +02:00
4 changed files with 22 additions and 108 deletions

View File

@@ -1 +1,14 @@
pkgbase = pman-helper
pkgdesc = A pacman helper script, because you forget all the stupid flags
pkgver = 1.4.0
pkgrel = 1
url = https://git.bjphoster.com/source/pman
arch = any
license = MIT
depends = bash
depends = pacman
conflicts = pman
source = https://git.bjphoster.com/source/pman/archive/1.4.0.tar.gz
sha256sums = 0026ab2d951c224c8b7bac3b4e89c9997c8b58a8cfcd5ed59a8133a42c8688af
pkgname = pman-helper

6
.autoupdate Normal file
View File

@@ -0,0 +1,6 @@
# Autoupdater manifest - consumed by aur/.autoupdate
srchost="gitea"
srcmntr="source"
srcname="pman"
verstrip=""
gui="false"

View File

@@ -2,8 +2,8 @@
_pkgname="pman" _pkgname="pman"
pkgname="${_pkgname}-helper" pkgname="${_pkgname}-helper"
pkgver="" pkgver="1.4.0"
pkgrel="3" pkgrel="1"
pkgdesc="A pacman helper script, because you forget all the stupid flags" pkgdesc="A pacman helper script, because you forget all the stupid flags"
url="https://git.bjphoster.com/source/${_pkgname}" url="https://git.bjphoster.com/source/${_pkgname}"
arch=("any") arch=("any")
@@ -12,9 +12,7 @@ depends=("bash" "pacman")
conflicts=("pman") # Another package called `pman` currently exists in the AUR conflicts=("pman") # Another package called `pman` currently exists in the AUR
source=("https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz") source=("https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz")
sha1sums=("5cd50a98e40cf26b887cc93bf4919b5278d3218a") sha256sums=("0026ab2d951c224c8b7bac3b4e89c9997c8b58a8cfcd5ed59a8133a42c8688af")
sha256sums=("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
md5sums=("235271ded1d7bfa950347954169d0ee6")
package() { package() {
install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

103
push.sh
View File

@@ -1,103 +0,0 @@
#!/usr/bin/env bash
# Variables
gui=false
desktop="pman.desktop"
icon="pman.png"
# Get version
oldver=$(grep -E "^pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
if [ $# -eq 1 ]; then
pkgver="${1}"
else
echo "Old version: ${oldver}"
read -p "New version: " pkgver
fi
# Check version
if [ "${pkgver}" = "${oldver}" ] && [ -z "${FORCE_REBUILD}" ]; then
echo >/dev/stderr "Error: same (old) version specified - update aborted"
exit
fi
# Get variables from PKGBUILD
url=$(sed -n '/^source=(/,/)/p' PKGBUILD | grep -oE 'https?://[^"]+')
pkgname=$(grep -E "^pkgname=" PKGBUILD | sed 's/pkgname="//;s/"//')
_pkgname=$(grep -E "^_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//')
_srcname=$(grep -E "^_srcname=" PKGBUILD | sed 's/_srcname="//;s/"//')
_srcmntr=$(grep -E "^_srcmntr=" PKGBUILD | sed 's/_srcmntr="//;s/"//')
_archive=$(grep -E "^_archive=" PKGBUILD | sed 's/_archive="//;s/"//')
pkgrel=$(grep -E "^pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//')
aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git"
if [ "${gui}" = "true" ] && [ -n "${_pkgname}" ]; then
newdesktop="${_pkgname}.desktop"
newicon="${_pkgname}.png"
else
newdesktop="${package}.desktop"
newicon="${package}.png"
fi
# Perform variable substitution
url="${url//\$\{_pkgname\}/$_pkgname}"
url="${url//\$\{_srcname\}/$_srcname}"
url="${url//\$\{_srcmntr\}/$_srcmntr}"
url="${url//\$\{pkgver\}/$pkgver}"
_archive="${_archive//\$\{_pkgname\}/$_pkgname}"
_archive="${_archive//\$\{pkgver\}/$pkgver}"
aur_url="${aur_url//\$\{_pkgname\}/$_pkgname}"
pkgname="${pkgname//\$\{_pkgname\}/$_pkgname}"
# Download archive
wget -qO ${_archive} "${url}"
# Extract icon / .desktop files if appimage
if printf '%s' "${_archive,,}" | grep -qi "appimage"; then
chmod +x "${_archive}"
"./${_archive}" --appimage-extract >/dev/null
cp "squashfs-root/${desktop}" "${newdesktop}"
cp "squashfs-root/${icon}" "${newicon}"
sed -i "/^X-AppImage-/d;/^$/d" "${newdesktop}"
sed -i "s/^Exec=.*/Exec=${_pkgname} %U/" "${newdesktop}"
rm -rf $(readlink -f squashfs-root) squashfs-root
fi
# Calculate checksums
sha256bin=$(sha256sum ${_archive} | awk '{print $1}')
if [ "${gui}" = "true" ]; then
sha256dsk=$(sha256sum ${newdesktop} | awk '{print $1}')
sha256ico=$(sha256sum ${newicon} | awk '{print $1}')
fi
# Yoink the archive - unnecessary anymore
rm -f ${_archive}
# Update PKGBUILD with new values
sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD
if [ "${gui}" = "true" ]; then
sed -i '/^sha256sums=(/,/^)/c\
sha256sums=(\
"'"$sha256bin"'"\
"'"$sha256dsk"'"\
"'"$sha256ico"'"\
)' PKGBUILD
else
sed -i -E "s/^sha256sums=\(\"[^\"]+\"\)/sha256sums=(\"$sha256bin\")/" PKGBUILD
fi
if [ "${pkgver}" != "${oldver}" ] && [ -n "${FORCE_REBUILD}" ]; then
sed -i -E "s/^pkgrel=\"[^\"]+\"/pkgrel=\"1\"/" PKGBUILD
fi
# Update .SRCINFO
makepkg --printsrcinfo > .SRCINFO
# Create git message with correct variable
if [ -n "$_pkgname" ]; then
commit_msg="Updated ${pkgname//\$\{_pkgname\}/_pkgname} to ${pkgver}-${pkgrel}"
else
commit_msg="Updated ${pkgname} to ${pkgver}-${pkgrel}"
fi
if [ -z "${NO_GIT_PUSH}" ]; then
# In case of fire, git commit, git push, leave building
git add .
git commit -m "${commit_msg}"
git remote add aur ${aur_url}
git push origin main
git push aur main:master
fi