Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
doums committed Jun 18, 2024
1 parent 0fec739 commit 6067416
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
19 changes: 13 additions & 6 deletions .pkg/aur_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,21 @@ if [ -z "$SOURCES" ]; then
exit 1
fi

# ⚠ pkgver does not allow dashes, replace any - by _
# bump _pkgver
sed -i "s/_pkgver=.*/_pkgver=$PKGVER/" "$PKGBUILD"
echo " ✓ bump _pkgver to $PKGVER"

# ⚠ Dashes are not allowed in package version, replace any - by _
PKGVER=${PKGVER//-/_}

# bump package version
sed -i "s/pkgver=.*/pkgver=$PKGVER/" "$PKGBUILD"
echo " ✓ bump package version to $PKGVER"

# bump _release_tag
sed -i "s/_release_tag=.*/_release_tag=$RELEASE_TAG/" "$PKGBUILD"
echo " ✓ bump _release_tag to $RELEASE_TAG"

if [ -n "$PKGREL" ]; then
# ⚠ on new package version, pkgrel must be reset to 1
sed -i "s/pkgrel=.*/pkgrel=$PKGREL/" "$PKGBUILD"
Expand All @@ -61,12 +69,11 @@ echo "sources: ${sources[*]}"
sums=()

for file in "${sources[@]}"; do
if [ -z "$file" ]; then
continue
if [ -n "$file" ]; then
sum=$(sha256sum "$file" | awk '{print $1}')
sums+=("\n '$sum'")
echo "sha256sum for $file: $sum"
fi
sum=$(sha256sum "$file" | awk '{print $1}')
sums+=("\n '$sum'")
echo "sha256sum for $file: $sum"
done

sed -i "s/sha256sums=.*/sha256sums=(${sums[*]})/" "$PKGBUILD"
Expand Down
7 changes: 5 additions & 2 deletions nym-vpn-core/nym-vpnd/.pkg/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

pkgname=nym-vpnd
pkgver=0.1.0
# upstream version
_pkgver=
_release_tag=
pkgrel=1
pkgdesc='NymVPN daemon as a systemd service'
arch=('x86_64')
Expand All @@ -13,10 +16,10 @@ depends=('glibc' 'gcc-libs' 'dbus' 'libnftnl' 'libmnl')
makedepends=('rust' 'cargo' 'go' 'protobuf')
provides=('nym-vpnd')
conflicts=('nym-vpnd')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/nym-vpn-core-v$pkgver.tar.gz"
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$_release_tag.tar.gz"
'nym-vpnd.service')
sha256sums=()
_srcdir="nym-vpn-client-nym-vpn-core-v$pkgver"
_srcdir="nym-vpn-client-$_release_tag"

prepare() {
pushd "$_srcdir"
Expand Down
7 changes: 5 additions & 2 deletions nym-vpn-core/nym-vpnd/.pkg/aur/PKGBUILD-bin
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

pkgname=nym-vpnd-bin
pkgver=0.1.0
# upstream version
_pkgver=
_release_tag=
pkgrel=1
pkgdesc='NymVPN daemon as a systemd service'
arch=('x86_64')
Expand All @@ -13,12 +16,12 @@ depends=('glibc' 'gcc-libs' 'dbus' 'libnftnl' 'libmnl')
makedepends=()
provides=('nym-vpnd')
conflicts=('nym-vpnd')
source=("$url/releases/download/nym-vpn-core-v$pkgver/nym-vpn-core-v${pkgver}_linux_x86_64.tar.gz"
source=("$url/releases/download/$_release_tag/nym-vpn-core-v${_pkgver}_linux_x86_64.tar.gz"
'nym-vpnd.service')
sha256sums=()

package() {
install -Dm755 "nym-vpn-core-v${pkgver}_linux_x86_64/nym-vpnd" "$pkgdir/usr/bin/nym-vpnd"
install -Dm755 "nym-vpn-core-v${_pkgver}_linux_x86_64/nym-vpnd" "$pkgdir/usr/bin/nym-vpnd"
install -Dm644 nym-vpnd.service "$pkgdir/usr/lib/systemd/system/nym-vpnd.service"
}

7 changes: 5 additions & 2 deletions nym-vpn-x/.pkg/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

pkgname=nymvpn-x
pkgver=0.1.0
# upstream version
_pkgver=
_release_tag=
pkgrel=1
pkgdesc='NymVPN next desktop client'
arch=('x86_64')
Expand All @@ -14,12 +17,12 @@ makedepends=('rust' 'cargo' 'protobuf' 'npm')
optdepends=('nym-vpnd: NymVPN daemon as a systemd service')
provides=('nymvpn-x')
conflicts=('nymvpn-x')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/nym-vpn-x-v$pkgver.tar.gz"
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$_release_tag.tar.gz"
'nymvpn-x-wrapper.sh'
'nymvpn-x.desktop'
'nymvpn-x.svg')
sha256sums=()
_srcdir="nym-vpn-client-nym-vpn-x-v$pkgver"
_srcdir="nym-vpn-client-$_release_tag"

prepare() {
pushd "$_srcdir"
Expand Down
7 changes: 5 additions & 2 deletions nym-vpn-x/.pkg/aur/PKGBUILD-bin
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

pkgname=nymvpn-x-bin
pkgver=0.1.0
# upstream version
_pkgver=
_release_tag=
pkgrel=1
pkgdesc='NymVPN next desktop client'
arch=('x86_64')
Expand All @@ -14,14 +17,14 @@ makedepends=()
optdepends=('nym-vpnd: NymVPN daemon as a systemd service')
provides=('nymvpn-x')
conflicts=('nymvpn-x')
source=("$url/releases/download/nym-vpn-x-v$pkgver/nymvpn-x_$pkgver_linux_x64"
source=("$url/releases/download/$_release_tag/nymvpn-x_${_pkgver}_linux_x64"
'nymvpn-x-wrapper.sh'
'nymvpn-x.desktop'
'nymvpn-x.svg')
sha256sums=()

package() {
install -Dm755 "nymvpn-x_$pkgver_linux_x64" "$pkgdir/usr/bin/nymvpn-x"
install -Dm755 "nymvpn-x_${_pkgver}_linux_x64" "$pkgdir/usr/bin/nymvpn-x"
install -Dm755 "nymvpn-x-wrapper.sh" "$pkgdir/usr/bin/nymvpn-x-wrapper.sh"
install -Dm644 "nymvpn-x.desktop" "$pkgdir/usr/share/applications/nymvpn-x.desktop"
install -Dm644 "nymvpn-x.svg" "$pkgdir/usr/share/icons/nymvpn-x.svg"
Expand Down

0 comments on commit 6067416

Please sign in to comment.