diff --git a/.SRCINFO b/.SRCINFO index 6b2050cda59c..37197fa16872 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,23 +1,23 @@ pkgbase = hyprgraphics-git pkgdesc = Hyprland graphics / resource utilities - pkgver = 0.1.0.r0.g4d927a52 + pkgver = 0.1.3.r0.g9d7f268 pkgrel = 1 url = https://github.com/hyprwm/hyprgraphics arch = x86_64 arch = aarch64 license = BSD-3-Clause - makedepends = git makedepends = cmake - makedepends = gcc - depends = pixman + makedepends = git + makedepends = ninja depends = cairo + depends = file depends = hyprutils-git depends = libjpeg + depends = libjxl depends = libspng depends = libwebp - depends = libjxl - depends = file - provides = hyprgraphics=0.1.0 + depends = pixman + provides = hyprgraphics=0.1.3 provides = libhyprgraphics.so conflicts = hyprgraphics source = hyprgraphics::git+https://github.com/hyprwm/hyprgraphics.git diff --git a/PKGBUILD b/PKGBUILD index 9b52d0909e61..859ca70bd1f6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,35 +1,62 @@ # Maintainer: alba4k _pkgname="hyprgraphics" -pkgname="${_pkgname}-git" -pkgver=0.1.0.r0.g4d927a52 +_pkgsrc=$_pkgname +pkgname="$_pkgname-git" +pkgver=0.1.3.r0.g9d7f268 pkgrel=1 pkgdesc="Hyprland graphics / resource utilities" -arch=(x86_64 aarch64) -url="https://github.com/hyprwm/hyprgraphics" +arch=('x86_64' 'aarch64') +url="https://github.com/hyprwm/$_pkgname" license=('BSD-3-Clause') -depends=('pixman' 'cairo' 'hyprutils-git' 'libjpeg' 'libspng' 'libwebp' 'libjxl' 'file') -makedepends=('git' 'cmake' 'gcc') -source=("${_pkgname}::git+https://github.com/hyprwm/hyprgraphics.git") -provides=("${_pkgname}=${pkgver%%.r*}" "lib$_pkgname.so") -conflicts=("hyprgraphics") +depends=( + cairo + file + hyprutils-git + libjpeg + libjxl + libspng + libwebp + pixman +) +makedepends=( + cmake + git + ninja +) +source=("$_pkgsrc::git+$url.git") +conflicts=("$_pkgname") +provides=("$_pkgname=${pkgver%%.r*}" "lib$_pkgname.so") sha256sums=('SKIP') +: ' +prepare() { + # Pick pull request form GitHub replacing NUM with the pr number + # e.g. git pull origin pull/111/head --no-edit --rebase + + git pull origin pull/NUM/head --no-edit --rebase +} +' + pkgver() { - cd ${_pkgname} - git describe --long --tags --abbrev=8 --exclude='*[a-zA-Z][a-zA-Z]*' \ - | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g' + cd "$_pkgsrc" + git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "${srcdir}/${_pkgname}" - cmake --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX=/usr -S . -B ./build - cmake --build ./build --config Release --target hyprgraphics + local cmake_options=( + -B build + -S "$_pkgsrc" + -G Ninja + -W no-dev + -D CMAKE_BUILD_TYPE=None + -D CMAKE_INSTALL_PREFIX=/usr + ) + cmake "${cmake_options[@]}" + cmake --build build } package() { - cd "${srcdir}/${_pkgname}" - DESTDIR="${pkgdir}" cmake --install build - - install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + DESTDIR="$pkgdir" cmake --install build + install -Dm644 "$_pkgsrc/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/" }