summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Mazieres2020-04-26 11:30:46 -0700
committerDavid Mazieres2020-04-26 11:30:46 -0700
commita102949203bef7a0874ca746e1cf585b6392c724 (patch)
treefd1fee943f4ddd20755e6299bb1768fd37db3986
parent1e070a12af817840ec0a134f1b1e7cc11df9ada1 (diff)
downloadaur-a102949203bef7a0874ca746e1cf585b6392c724.tar.gz
Don't require obs-studio as a makedepend.
Makedepends don't get installed before pkgver is run. Instead, just try to pull the appropriate version out of the obs-studio git repository, and if that fails use the obs-studio master branch. Include the obs version in the obs-v4l2sink-git package version.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD25
2 files changed, 17 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6e8cebac0a31..36091a9a0966 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,17 @@
pkgbase = obs-v4l2sink-git
pkgdesc = v4l2-output for obs-studio
- pkgver = 0.1.0.r12.1ec3c8a
+ pkgver = 0.1.0.r12.1ec3c8a+obs25.0.4
pkgrel = 1
url = https://github.com/CatxFish/obs-v4l2sink
arch = x86_64
license = GPL
makedepends = git
- makedepends = obs-studio
makedepends = cmake
depends = obs-studio
provides = obs-v4l2sink
conflicts = obs-v4l2sink
source = obs-v4l2sink::git+https://github.com/CatxFish/obs-v4l2sink.git
- source = obs-studio-25.0.4.tar.gz::https://github.com/obsproject/obs-studio/archive/25.0.4.tar.gz
+ source = obs-studio::git+https://github.com/obsproject/obs-studio.git
sha256sums = SKIP
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index f90a24621939..99d761830ccc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: David Mazieres (http://www.scs.stanford.edu/~dm/addr/)
pkgname=obs-v4l2sink-git
-pkgver=0.1.0.r12.1ec3c8a
-obsver=$(obs --version | sed -e 's/[^0-9]*//;s/-.*//')
+obsver=$(obs --version | sed -e 's/[^0-9]*//;s/-.*//' 2>/dev/null)
+pkgver=0.1.0.r12.1ec3c8a+obs25.0.4
pkgrel=1
pkgdesc="v4l2-output for obs-studio"
arch=(x86_64)
@@ -9,7 +9,7 @@ url="https://github.com/CatxFish/obs-v4l2sink"
license=('GPL')
groups=()
depends=(obs-studio)
-makedepends=('git' 'obs-studio' 'cmake')
+makedepends=('git' 'cmake')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
@@ -18,20 +18,25 @@ options=()
install=
pkgstem=${pkgname%-git}
source=("${pkgstem}::git+${url}.git"
- "obs-studio-$obsver.tar.gz::https://github.com/obsproject/obs-studio/archive/$obsver.tar.gz"
-)
+ obs-studio::git+https://github.com/obsproject/obs-studio.git)
noextract=()
sha256sums=('SKIP' 'SKIP')
pkgver() {
- cd "$srcdir/${pkgstem}"
- printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+ cd "$srcdir"
+ local obs v4l2sink
+ obs="$(git -C obs-studio describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+ v4l2sink="$(git -C obs-v4l2sink describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+ printf "%s+obs%s" "$v4l2sink" "$obs"
}
prepare() {
- mkdir -p "$srcdir/build"
- cd "$srcdir/build"
- cmake -DLIBOBS_INCLUDE_DIR="../obs-studio-$obsver/libobs" -DCMAKE_INSTALL_PREFIX=/usr "../${pkgstem}"
+ cd "$srcdir"
+ # If obs is installed, then try to match installed version
+ test -z "$obsver" || git -C obs-studio co "$obsver"
+ mkdir -p build
+ cd build
+ cmake -DLIBOBS_INCLUDE_DIR="../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr "../${pkgstem}"
}
build() {