Skip to content

Instantly share code, notes, and snippets.

@Stebalien
Last active December 22, 2015 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stebalien/6414996 to your computer and use it in GitHub Desktop.
Save Stebalien/6414996 to your computer and use it in GitHub Desktop.
# Maintainer: Luca Cesari <luca.cesari@bewq.org>
_pkgname=pycarddav
pkgname=$_pkgname-git
pkgver=0.5.1.1.g563846f
epoch=1
pkgrel=1
pkgdesc="A CLI CardDAV client"
arch=('any')
url="http://lostpackets.de/pycarddav/"
license=('Expat/MIT')
conflicts=('pycarddav')
provides=('pycarddav')
depends=('python2' 'python2-vobject' 'python2-requests' 'python2-lxml' 'python2-urwid' 'python2-xdg')
makedepends=('python-docutils' 'python2-distribute')
source=('git+https://github.com/geier/pycarddav.git')
pkgver() {
cd pycarddav
git describe --always | sed -e 's|-|.|g' -e 's|^v||'
}
package() {
cd $_pkgname
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
# Compile documentation
> MANUAL.rst cat - <(tail -n+3 doc/about.rst) doc/usage.rst doc/license.rst <<EOF
PyCardDAV
=========
${pkgdesc//?/-}
$pkgdesc
${pkgdesc//?/-}
:Manual section: 1
:Version: $pkgver
Description
-----------
EOF
rst2man MANUAL.rst ${_pkgname}.1
install -Dm644 ${_pkgname}.1 "$pkgdir/usr/share/man/man1/$_pkgname.1"
install -Dm644 pycard.conf.sample "$pkgdir/usr/share/doc/$pkgname/pycard.conf.sample"
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
sha256sums=('SKIP')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment