summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorfelics@felics-tablet2018-02-12 14:00:31 +0100
committerfelics@felics-tablet2018-02-12 14:00:31 +0100
commit0b2f31f492b4b92f72ba25f214cfbbdff8d8432b (patch)
tree71f59d8804ab34c957e5ad98fc5ac486b4fdce92 /PKGBUILD
parent6a7a2420b81b8d5082d89a9743b89244cb861433 (diff)
downloadaur-arandr-indicator-git.tar.gz
Adopted, and brought PKGBUILD up to date.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD58
1 files changed, 48 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 10f7ee692c9..a704b3f18b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,59 @@
-# Maintainer: Thiago Perrotta <echo dGhpYWdvcGVycm90dGE5NUBnbWFpbC5jb20K | base64 -d >
+# Maintainer: dreieck
+# Contributor: Thiago Perrotta <echo dGhpYWdvcGVycm90dGE5NUBnbWFpbC5jb20K | base64 -d >
+
_pkgname=arandr-indicator
pkgname="${_pkgname}-git"
-pkgver=1
+epoch=1
+pkgver=20150516+2ebd165
pkgrel=2
pkgdesc="Quick and simple tray icon menu for changing the monitor layout."
arch=('any')
url="https://github.com/denilsonsa/${_pkgname}"
-license=('BSD-2')
-depends=('pygtk' 'libappindicator' 'python2-xdg')
+license=('custom')
+depends=(
+ # 'libappindicator'
+ 'pygtk'
+ 'python2>=2.7'
+ 'python2-libappindicator'
+ 'python2-xdg'
+)
makedepends=('git')
-optdepends=('arandr: to configure monitor layouts')
-source=("git+https://github.com/denilsonsa/${_pkgname}.git")
-md5sums=('SKIP')
+optdepends=('arandr: To configure monitor layouts.')
+provides=("${_pkgname}=${pkgver}")
+replaces=("${_pkgname}<=${pkgver}")
+conflicts=("${_pkgname}")
+source=(
+ "${_pkgname}::git+https://github.com/denilsonsa/${_pkgname}.git"
+ 'license-info.txt'
+)
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+)
-package() {
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ _date_rev="$(git log -n1 --format=tformat:'%cI+%h' | sed 's|T[^+]*||' | tr -d '-')"
+ if [ -z "${_date_rev}" ]; then
+ {
+ echo "error: pkgver() could not retrieve version or revision. Please check."
+ echo "Aborting."
+ } > /dev/stderr
+ return 1
+ fi
+ echo "${_date_rev}"
+}
+
+prepare() {
cd "${srcdir}/${_pkgname}"
- install -Dm755 "${_pkgname}.py" "${pkgdir}/usr/bin/${_pkgname}"
+ # Extract copyright information.
+ cat arandr-indicator.py | tr -d '\a' | tr '\n' '\a' | sed 's|^.*\(# Copyright.*$\)|\1|g' | sed 's|\a[^#][^\a]*.*$|\a|g' | tr '\a' '\n' > "${srcdir}/license.txt"
}
-# vim:set ts=2 sw=2 et:
+package() {
+ cd "${srcdir}/${_pkgname}"
+ install -Dvm755 "${_pkgname}.py" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dvm644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
+ install -Dvm644 "${srcdir}/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/lincense.txt"
+ install -Dvm644 "${srcdir}/license-info.txt" "${pkgdir}/usr/share/licenses/${pkgname}/lincense-info.txt"
+}