first commit
This commit is contained in:
15
.SRCINFO
Normal file
15
.SRCINFO
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
pkgbase = tsparams
|
||||||
|
pkgdesc = A simple tool to extract and display Tailscale parameters
|
||||||
|
pkgver = 1.0.0
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://git.bjphoster.com/source/tsparams
|
||||||
|
arch = any
|
||||||
|
license = GPL3
|
||||||
|
depends = python
|
||||||
|
depends = tailscale
|
||||||
|
source = https://git.bjphoster.com/source/tsparams/archive/1.0.0.tar.gz
|
||||||
|
md5sums = b215f07928ceb4399b51ab8107d275cc
|
||||||
|
sha1sums = 316becbc9b10d004cfc89e3eeb3e2f3498b70035
|
||||||
|
sha256sums = 2cbf10ffca2f0adf21daff04bfb1cde401b2f9e713863a23b01aa6bddf1ff62d
|
||||||
|
|
||||||
|
pkgname = tsparams
|
||||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# downloaded tarbals
|
||||||
|
*.tar.gz
|
||||||
|
# built packages
|
||||||
|
*.pkg.tar.zst
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Bryan Joshua Pedini
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
20
PKGBUILD
Normal file
20
PKGBUILD
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Maintainer: Bryan Joshua Pedini <bryan [at] pedini [dot] dev>
|
||||||
|
|
||||||
|
pkgname="tsparams"
|
||||||
|
pkgver="1.0.0"
|
||||||
|
pkgrel="1"
|
||||||
|
pkgdesc="A simple tool to extract and display Tailscale parameters"
|
||||||
|
url="https://git.bjphoster.com/source/${pkgname}"
|
||||||
|
arch=("any")
|
||||||
|
license=("GPL3")
|
||||||
|
depends=("python" "tailscale")
|
||||||
|
source=("https://git.bjphoster.com/source/${pkgname}/archive/${pkgver}.tar.gz")
|
||||||
|
|
||||||
|
sha1sums=("316becbc9b10d004cfc89e3eeb3e2f3498b70035")
|
||||||
|
sha256sums=("2cbf10ffca2f0adf21daff04bfb1cde401b2f9e713863a23b01aa6bddf1ff62d")
|
||||||
|
md5sums=("b215f07928ceb4399b51ab8107d275cc")
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
install -Dm755 "${srcdir}/${pkgname}/tsparams.py" "${pkgdir}/usr/bin/${pkgname}"
|
||||||
|
}
|
||||||
2
README.md
Normal file
2
README.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# tsparams
|
||||||
|
PKGBUILD script for Arch Linux for `tsparams` package
|
||||||
50
push.sh
Executable file
50
push.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
oldver=$(grep "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}" ]; 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/"//')
|
||||||
|
pkgrel=$(grep "pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//')
|
||||||
|
aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Update .SRCINFO
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
|
# In case of fire, git commit, git push, leave building
|
||||||
|
git add .
|
||||||
|
git commit -m "Updated ${pkgname} to ${pkgver}-${pkgrel}"
|
||||||
|
git remote add aur ${aur_url}
|
||||||
|
git push origin main
|
||||||
|
git push aur main:master
|
||||||
Reference in New Issue
Block a user