summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormakepkg2020-07-26 16:01:10 +0200
committermakepkg2020-07-26 16:01:10 +0200
commit8054d8c896433815bd7b6e3e158e9a63af3c720d (patch)
tree8f1059c057408051e88e041baf900bcb8c9e5bae
parented01df668843e2a6e715916ab2945fabad40524c (diff)
downloadaur-tapecalc-add-compat.tar.gz
Generates the $pkgver from installed `tapecalc`
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD14
2 files changed, 15 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1a89e76c9763..3ec8d13308f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = tapecalc-add-compat
pkgdesc = Provides compatibility: Makes 'tapecalc' available also under it's original name 'add'.
- pkgver = t20180401
- pkgrel = 1
+ pkgver = latest
+ pkgrel = 2
+ epoch = 1
url = http://aur.archlinux.org/packages/tapecalc/
arch = any
license = custom: public domain.
- depends = tapecalc=t20180401
- provides = add=t20180401
+ depends = tapecalc
+ provides = add=latest
conflicts = add
options = emptydirs
source = COPYING
diff --git a/PKGBUILD b/PKGBUILD
index 7df084ddf835..66cea189bc3c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,9 @@
# Maintainer: dreieck
pkgname=tapecalc-add-compat
-pkgver=t20180401
-pkgrel=1
+epoch=1
+pkgver=latest
+pkgrel=2
pkgdesc="Provides compatibility: Makes 'tapecalc' available also under it's original name 'add'."
url="http://aur.archlinux.org/packages/tapecalc/"
@@ -15,7 +16,7 @@ arch=(
)
depends=(
- "tapecalc=${pkgver}"
+ "tapecalc"
)
makedepends=()
optdepends=()
@@ -36,10 +37,15 @@ sha256sums=(
'90d77bbbe6aa2cfdaf6eaa3580fd1a981e0d0428ae586ac37b47aee5e67fcf12'
)
+pkgver() {
+ # tapecalc -V
+ pacman -Qi tapecalc | grep -E '^Version[[:space:]]*:' | awk -F ':' '{print $2}' | tr -d '[[:space:]]' | sed -E 's|\-[^-]*$||'
+}
+
package() {
install -v -d -m755 "${pkgdir}/usr/bin"
cd "${pkgdir}/usr/bin"
ln -sv "tapecalc" "add"
-
+
install -v -D -m644 "${srcdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}