summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-03-11 09:59:54 +0000
committerCaleb Maclennan2020-03-11 10:02:36 +0000
commit4c4b2ed6ad055416020c83322a22ffbba8199dc9 (patch)
treeae2922acee272282848094bdfd118333231e4073
parentbf72ce0bfe872bda86470f27cd10a0343961688a (diff)
downloadaur-4c4b2ed6ad055416020c83322a22ffbba8199dc9.tar.gz
Adapt stable packaging as VCS build
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD29
2 files changed, 29 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad85a880cc5..323bff1da63 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
-pkgbase = pjproject
+pkgbase = pjproject-git
pkgdesc = Open source SIP stack and media stack
- pkgver = 2.10
+ pkgver = 2.10.r38.g98f70c2
pkgrel = 1
url = https://www.pjsip.org/
arch = x86_64
@@ -20,14 +20,14 @@ pkgbase = pjproject
makedepends = util-linux
makedepends = python
makedepends = python-setuptools
- source = pjproject-2.10.tar.gz::https://github.com/pjsip/pjproject/archive/2.10.tar.gz
+ source = pjproject-git::git+https://github.com/pjsip/pjproject.git
source = 0001-Don-t-build-Java-bindings.patch
source = config_site.h
- sha256sums = 936a4c5b98601b52325463a397ddf11ab4106c6a7b04f8dc7cdd377efbb597de
+ sha256sums = SKIP
sha256sums = c6673d97185c2383140b6d915aeaa7e525c9cfb5f51c097472cf4773b4f87ab4
sha256sums = 61fa2a76d069aa5c95b6e2c539f7b20e2ccf0b126fc60c18117762541d0a7472
-pkgname = pjproject
+pkgname = pjproject-git
depends = openssl
depends = portaudio
depends = speex
@@ -39,8 +39,12 @@ pkgname = pjproject
depends = opus
optdepends = e2fsprogs
optdepends = python-pjproject: Python bindings
+ provides = pjproject
+ conflicts = pjproject
-pkgname = python-pjproject
+pkgname = python-pjproject-git
depends = pjproject
depends = python
+ provides = python-pjproject
+ conflicts = python-pjproject
diff --git a/PKGBUILD b/PKGBUILD
index c342e7c0b58..85d95218333 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@
# Contributor: Marti Raudsepp <marti@juffo.org>
# Contributor: Travis Hegner <travis.hegner@gmail.com>
-pkgbase=pjproject
+pkgbase=pjproject-git
pkgname=("$pkgbase" "python-$pkgbase")
-pkgver=2.10
+pkgver=2.10.r38.g98f70c2
pkgrel=1
pkgdesc='Open source SIP stack and media stack'
arch=('x86_64' 'armv7h' 'i686')
@@ -14,21 +14,26 @@ license=('GPL')
makedepends=('alsa-lib' 'e2fsprogs' 'ffmpeg' 'libsamplerate' 'libsrtp'
'openssl' 'opus' 'portaudio' 'speex' 'swig' 'util-linux'
'python' 'python-setuptools')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/pjsip/$pkgbase/archive/$pkgver.tar.gz"
+source=("$pkgbase::git+https://github.com/pjsip/${pkgbase/-/.}"
'0001-Don-t-build-Java-bindings.patch'
'config_site.h')
-sha256sums=('936a4c5b98601b52325463a397ddf11ab4106c6a7b04f8dc7cdd377efbb597de'
+sha256sums=('SKIP'
'c6673d97185c2383140b6d915aeaa7e525c9cfb5f51c097472cf4773b4f87ab4'
'61fa2a76d069aa5c95b6e2c539f7b20e2ccf0b126fc60c18117762541d0a7472')
+pkgver() {
+ cd "$pkgbase"
+ git describe --tags --abbrev=7 HEAD | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
prepare() {
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase"
patch -Np1 < "../${source[1]}"
cp "../${source[2]}" 'pjlib/include/pj/config_site.h'
}
build() {
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase"
export CXXFLAGS="$CXXFLAGS -fPIC"
if [ "$CARCH" = "i686" ]; then
export CXXFLAGS="$CXXFLAGS -march=i686"
@@ -54,17 +59,21 @@ build() {
python setup.py build
}
-package_pjproject() {
+package_pjproject-git() {
depends=('openssl' 'portaudio' 'speex' 'alsa-lib' 'libsamplerate' 'util-linux'
'ffmpeg' 'libsrtp' 'opus')
optdepends=('e2fsprogs' 'python-pjproject: Python bindings')
- cd "$pkgbase-$pkgver"
+ provides=("${pkgname%-git}")
+ conflicts=("${pkgname%-git}")
+ cd "$pkgbase"
make -j1 DESTDIR="$pkgdir" install
install -D -m755 pjsip-apps/bin/pjsua-*gnu* "$pkgdir/usr/bin/pjsua"
}
-package_python-pjproject() {
+package_python-pjproject-git() {
depends=('pjproject' 'python')
- cd "$pkgbase-$pkgver/pjsip-apps/src/swig/python"
+ provides=("${pkgname%-git}")
+ conflicts=("${pkgname%-git}")
+ cd "$pkgbase/pjsip-apps/src/swig/python"
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}