summarylogtreecommitdiffstats
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
parent6a7a2420b81b8d5082d89a9743b89244cb861433 (diff)
downloadaur-0b2f31f492b4b92f72ba25f214cfbbdff8d8432b.tar.gz
Adopted, and brought PKGBUILD up to date.
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD58
-rw-r--r--license-info.txt3
3 files changed, 63 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e63db4310e55..cda7017281a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,23 @@
pkgbase = arandr-indicator-git
pkgdesc = Quick and simple tray icon menu for changing the monitor layout.
- pkgver = 1
+ pkgver = 20150516+2ebd165
pkgrel = 2
+ epoch = 1
url = https://github.com/denilsonsa/arandr-indicator
arch = any
- license = BSD-2
+ license = custom
makedepends = git
depends = pygtk
- depends = libappindicator
+ depends = python2>=2.7
+ depends = python2-libappindicator
depends = python2-xdg
- optdepends = arandr: to configure monitor layouts
- source = git+https://github.com/denilsonsa/arandr-indicator.git
+ optdepends = arandr: To configure monitor layouts.
+ provides = arandr-indicator=20150516+2ebd165
+ conflicts = arandr-indicator
+ replaces = arandr-indicator<=20150516+2ebd165
+ source = arandr-indicator::git+https://github.com/denilsonsa/arandr-indicator.git
+ source = license-info.txt
+ md5sums = SKIP
md5sums = SKIP
pkgname = arandr-indicator-git
diff --git a/PKGBUILD b/PKGBUILD
index 10f7ee692c97..a704b3f18b82 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"
+}
diff --git a/license-info.txt b/license-info.txt
new file mode 100644
index 000000000000..0e82bc8e2a2e
--- /dev/null
+++ b/license-info.txt
@@ -0,0 +1,3 @@
+The copyright information for this package is included as a commend at the head of the executable itself. See there.
+
+The file "license.txt" is an attempt to automatically extract that copyright notice; it might have failed and is there only for your convenience. Please see executable itself.