summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-06-26 20:37:54 +0300
committerCaleb Maclennan2021-06-26 20:39:25 +0300
commit00d0fed921924d35ff8826f511209799344612cf (patch)
tree20ac4398bef81f69a4194329dbee7a9fdabe00ea
parentd32295dc56bd56f24d822b1a8eb6a4b61356c1c2 (diff)
downloadaur-00d0fed921924d35ff8826f511209799344612cf.tar.gz
Identify which version of asterisk packages were built against
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD32
2 files changed, 29 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c57e1fdee392..35d868a8b17f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = chan-sccp
pkgdesc = Cisco SCCP channel driver for Asterisk, alternative to chan_skinny
pkgver = 4.3.4
- pkgrel = 1
- url = http://chan-sccp-b.sourceforge.net
+ pkgrel = 2
+ url = https://chan-sccp.github.io/chan-sccp
arch = x86_64
arch = i686
license = GPL
- depends = asterisk
+ makedepends = asterisk
+ depends = libtool
+ depends = openssl
depends = zlib
backup = etc/asterisk/sccp.conf
source = chan-sccp-4.3.4.tar.gz::https://github.com/chan-sccp/chan-sccp/archive/v4.3.4.tar.gz
sha256sums = 29b808e2329da46eba2a163615202d9fa89c4b6db00ec3b9589ec12ab76e7882
pkgname = chan-sccp
-
+ depends = asterisk
+ depends = libtool
+ depends = openssl
+ depends = zlib
diff --git a/PKGBUILD b/PKGBUILD
index 36c84f9c5636..4e4eb9df74d4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,25 +3,33 @@
pkgname=chan-sccp
pkgver=4.3.4
-pkgrel=1
+pkgrel=2
pkgdesc='Cisco SCCP channel driver for Asterisk, alternative to chan_skinny'
-arch=('x86_64' 'i686')
-url='http://chan-sccp-b.sourceforge.net'
-license=('GPL')
-depends=('asterisk' 'zlib')
+arch=(x86_64 i686)
+url="https://chan-sccp.github.io/$pkgname"
+license=(GPL)
+depends=(libtool openssl zlib)
+makedepends=(asterisk)
backup=('etc/asterisk/sccp.conf')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/chan-sccp/chan-sccp/archive/v${pkgver/_/-}.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v${pkgver/_/-}.tar.gz")
sha256sums=('29b808e2329da46eba2a163615202d9fa89c4b6db00ec3b9589ec12ab76e7882')
build() {
- local asterisk_version=$(asterisk -V | sed -e 's/.* \([0-9]\+\.[0-9]\+\).*/\1/')
- cd "$pkgname-${pkgver/_/-}"
- ./configure --prefix=/usr --with-asterisk-version=$asterisk_version
- make
+ local _asterisk="$(asterisk -V | sed -e 's/.* \([0-9]\+\.[0-9]\+\).*/\1/')"
+ cd "$pkgname-${pkgver/_/-}"
+ ./configure \
+ --prefix=/usr \
+ --with-asterisk-version="$_asterisk"
+ make
}
+# This exact syntax allows `makepkg --printsrcinfo` to just show 'asterisk' as
+# a dependency, but the actual compiled packages to require 'asterisk=<version>'
+# on the version it built against so that upgrades don't break unexpectedly
package(){
- cd "$pkgname-${pkgver/_/-}"
- make DESTDIR="$pkgdir" install
+ local _asterisk="=$(pacman -Qn asterisk | awk -F'[ -]' '{ print $2 }')"
+ depends=(asterisk$_asterisk ${depends[@]})
+ cd "$pkgname-${pkgver/_/-}"
+ make DESTDIR="$pkgdir" install
}