summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2016-07-10 05:16:24 -0400
committerJames An2016-07-10 05:24:28 -0400
commitefa194f69fb2944f76832f60a35bc9e9eb05d617 (patch)
tree4fe21dc3032130f10673282a894d13f7db1554f8
parent4d893726f2a902e1b5a0aa4c3944c406d26ead7d (diff)
downloadaur-efa194f69fb2944f76832f60a35bc9e9eb05d617.tar.gz
Derived $_pkgname from $pkgname and used it through code to replace the literal string, "selfspy".
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD30
2 files changed, 16 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cf71e8d2fa7..e129db35397 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = selfspy-git
pkgdesc = X11 personal keylogger daemon with statistical analysis.
pkgver = 0.1.4.r194.gb0be0ab
- pkgrel = 2
+ pkgrel = 3
epoch = 1
url = https://github.com/gurgeh/selfspy
install = selfspy.install
@@ -18,7 +18,7 @@ pkgbase = selfspy-git
depends = python2-sqlalchemy
depends = tk
depends = pycrypto
- provides = selfspy
+ provides = selfspy=0.1.4.r194.gb0be0ab
conflicts = selfspy
source = git://github.com/gurgeh/selfspy.git
source = selfspy.conf
diff --git a/PKGBUILD b/PKGBUILD
index 91b067331f8..0412a6e640f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,18 +2,18 @@
# Contributor: James An <james@jamesan.ca>
pkgname=selfspy-git
-_pkgname=selfspy
+_pkgname=${pkgname%-git}
pkgver=0.1.4.r194.gb0be0ab
-pkgrel=2
+pkgrel=3
epoch=1
pkgdesc="X11 personal keylogger daemon with statistical analysis."
url="https://github.com/gurgeh/selfspy"
-install=selfspy.install
+install="$_pkgname.install"
changelog=.Changelog
license=('GPL')
arch=('i686' 'x86_64')
-provides=('selfspy')
-conflicts=('selfspy')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
depends=('python2'
'python2-daemon'
'python2-lockfile'
@@ -23,31 +23,29 @@ depends=('python2'
'tk'
'pycrypto')
makedepends=('git')
-source=('git://github.com/gurgeh/selfspy.git'
- "${_pkgname}.conf"
- "${_pkgname}@.service")
+source=("git://github.com/gurgeh/$_pkgname.git"
+ "$_pkgname.conf"
+ "$_pkgname@.service")
md5sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
- cd $srcdir/${_pkgname}
+ cd $srcdir/_pkgname
git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
- cd $srcdir/${_pkgname}
- sed -i 's/env python/env python2/g' selfspy/__init__.py
+ cd $srcdir/$_pkgname
+ sed -i 's/env python/env python2/g' $_pkgname/__init__.py
sed -i 's:var/lib:usr/share:g' Makefile
}
package() {
- cd $srcdir/${_pkgname}
+ cd $srcdir/$_pkgname
install -d $pkgdir/usr/{bin,share/selfspy}
install -d $pkgdir/usr/lib/systemd/system
python2 setup.py install --root="$pkgdir/" --optimize=1
- install -Dm644 ../${_pkgname}@.service \
- $pkgdir/usr/lib/systemd/system/
- install -Dm644 ../${_pkgname}.conf \
- $pkgdir/usr/share/${_pkgname}/${_pkgname}.conf.example
+ install -Dm644 ../$_pkgname@.service $pkgdir/usr/lib/systemd/system/
+ install -Dm644 ../$_pkgname.conf $pkgdir/usr/share/$_pkgname/$_pkgname.conf.example
}