Compare commits
3 Commits
92b56714b3
...
c8b1848e10
Author | SHA1 | Date | |
---|---|---|---|
c8b1848e10 | |||
67408d5a36 | |||
23555edb34 |
19
PKGBUILD
19
PKGBUILD
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
_pkgname="pman"
|
_pkgname="pman"
|
||||||
pkgname="$_pkgname-helper"
|
pkgname="$_pkgname-helper"
|
||||||
pkgver="1.1.2"
|
pkgver="1.2.0"
|
||||||
pkgrel="1"
|
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}"
|
||||||
@ -10,18 +10,11 @@ arch=("any")
|
|||||||
license=("MIT")
|
license=("MIT")
|
||||||
depends=("bash" "pacman")
|
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=(
|
source=("https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz")
|
||||||
"https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz"
|
sha1sums=("df1f0c0d476619fa6994c72c94f0fd50e08fa74c")
|
||||||
)
|
sha256sums=("400980f9d8e4d8df3f95cf8c7430922586ba389289a80d0ba18d127f095d1d84")
|
||||||
sha1sums=(
|
md5sums=("5b424b1b6900b4f8cdcd8a5388be55aa")
|
||||||
"af045144e207157c2e615cedf615e68a07c1af85"
|
|
||||||
)
|
|
||||||
sha256sums=(
|
|
||||||
"9ac3b495130d8d296e8cda1c9fdf7a908679c722ab746cdc8ff2e85606dac88a"
|
|
||||||
)
|
|
||||||
md5sums=(
|
|
||||||
"33cd29b90bcf74946489e39271cbeb99"
|
|
||||||
)
|
|
||||||
package() {
|
package() {
|
||||||
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
|
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||||
mkdir -p "${pkgdir}/usr/bin"
|
mkdir -p "${pkgdir}/usr/bin"
|
||||||
|
38
push.sh
38
push.sh
@ -1,5 +1,43 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
pkgver="$1"
|
||||||
|
else
|
||||||
|
read -p "Version: " pkgver
|
||||||
|
fi
|
||||||
|
# Check version
|
||||||
|
pkgname=$(grep "pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
|
||||||
|
if [ "$pkgver" = "$oldver" ]; then
|
||||||
|
echo >/dev/stderr "Error: same (old) version specified - update aborted"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get variables from PKGBUILD
|
||||||
|
url=$(grep "source=" PKGBUILD | sed 's/source=("//;s/")//')
|
||||||
|
pkgname=$(grep "_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//')
|
||||||
|
# Perform variable substitution
|
||||||
|
archive_url="${url//\$\{_pkgname\}/$pkgname}"
|
||||||
|
archive_url="${archive_url//\$\{pkgver\}/$pkgver}"
|
||||||
|
|
||||||
|
# Download archive
|
||||||
|
wget -O $pkgname.tar.gz "$archive_url"
|
||||||
|
# Calculate checksums
|
||||||
|
sha1sum=$(sha1sum $pkgname.tar.gz | awk '{print $1}')
|
||||||
|
sha256sum=$(sha256sum $pkgname.tar.gz | awk '{print $1}')
|
||||||
|
md5sum=$(md5sum $pkgname.tar.gz | awk '{print $1}')
|
||||||
|
# Yoink the archive - unnecessary anymore
|
||||||
|
rm -f $pkgname.tar.gz
|
||||||
|
|
||||||
|
# Update PKGBUILD with new values
|
||||||
|
sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD
|
||||||
|
sed -i -E "s/^sha1sums=\(\"[^\"]+\"\)/sha1sums=(\"$sha1sum\")/" PKGBUILD
|
||||||
|
sed -i -E "s/^sha256sums=\(\"[^\"]+\"\)/sha256sums=(\"$sha256sum\")/" PKGBUILD
|
||||||
|
sed -i -E "s/^md5sums=\(\"[^\"]+\"\)/md5sums=(\"$md5sum\")/" PKGBUILD
|
||||||
|
|
||||||
|
# In case of fire, git commit, git push, leave building
|
||||||
|
git add .
|
||||||
|
git commit -m "Updated $pkgname to $pkgver"
|
||||||
git remote add aur ssh://aur@aur.archlinux.org/pman-helper.git
|
git remote add aur ssh://aur@aur.archlinux.org/pman-helper.git
|
||||||
git push origin main
|
git push origin main
|
||||||
git push aur main:master
|
git push aur main:master
|
||||||
|
Loading…
Reference in New Issue
Block a user