summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 24 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f0a9fe3dda41..72159b85c9d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,14 +5,24 @@
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Deon Spengler <deon@spengler.co.za>
+## useful links
+# http://ddcutil.com/
+# https://github.com/rockowitz/ddcutil
+
+## options
+: ${_build_git:=true}
+
+[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git"
+
+## basic info
_pkgname="ddcutil"
-pkgname="$_pkgname-git"
+pkgname="$_pkgname${_pkgtype:-}"
pkgver=2.1.0.r67.g90e67d7c
pkgrel=1
pkgdesc='Query and change Linux monitor settings using DDC/CI and USB.'
-url='http://ddcutil.com/'
+url='https://github.com/rockowitz/ddcutil'
+license=('GPL-2.0-or-later')
arch=('x86_64')
-license=('GPL2')
depends=(
'glib2'
@@ -24,24 +34,21 @@ depends=(
'libxrandr'
)
makedepends=(
+ 'git'
'systemd'
)
-if [ "$_pkgname" != "$pkgname" ] ; then
- url="https://github.com/rockowitz/ddcutil"
- makedepends+=('git')
- provides+=("$_pkgname=${pkgver%%.r*}")
- conflicts+=("$_pkgname")
+provides+=("$_pkgname=${pkgver%%.r*}")
+conflicts+=("$_pkgname")
- _pkgsrc="$_pkgname"
- source=("$_pkgname"::"git+$url.git")
- sha256sums=('SKIP')
+_pkgsrc="$_pkgname"
+source=("$_pkgname"::"git+$url.git")
+sha256sums=('SKIP')
- pkgver() {
- cd "$_pkgsrc"
- git describe --long --tags --abbrev=8 --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
- }
-fi
+pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags --abbrev=8 --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
prepare() {
cd "$_pkgsrc"
@@ -56,5 +63,5 @@ build() {
package() {
cd "$_pkgsrc"
- make DESTDIR="${pkgdir:?}" install
+ make DESTDIR="$pkgdir" install
}