summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 26 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 24cd48eb74f..8c7cd3ebb31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,44 @@
# Maintainer: Johannes Wienke <languitar@semipol.de>
pkgname=autosuspend
-pkgver=0.6
+pkgver=1.0.0
pkgrel=1
pkgdesc="A daemon to suspend your server in case of inactivity"
arch=(any)
url="https://github.com/languitar/autosuspend"
license=('GPL2')
depends=('python' 'python-psutil')
-optdepends=('python-mpd2: MPD playing status checks'
- 'python-requests: Kodi playing status checks'
- 'xprintidle: X server idle time cheks')
-makedepends=('python-setuptools' 'python-pytest-runner')
-source=("https://github.com/languitar/autosuspend/archive/release-${pkgver}.tar.gz")
-sha256sums=('7fe7a3840892dd70d3857bce18c82bf9cd769ec2ee412e0dfdc37e51a8e067ee')
+optdepends=('python-mpd2: MPD playing status check'
+ 'python-requests: Kodi playing status and XPath check'
+ 'python-lxml: XPath check'
+ 'xprintidle: X server idle time check')
+makedepends=('python-setuptools' 'python-pytest-runner' 'python-sphinx' 'python-sphinx_rtd_theme')
+source=("https://github.com/languitar/autosuspend/archive/v${pkgver}.tar.gz")
+sha256sums=('eaeffa164655e7246378bdc79fcaf8eaf481e71ec20ce29128a7d38804392a7e')
+install="${pkgname}.install"
backup=('etc/autosuspend.conf'
'etc/autosuspend-logging.conf')
+build() {
+ cd "$pkgname-${pkgver}"
+ python3 setup.py build_sphinx -a -b html
+ python3 setup.py build_sphinx -a -b man
+}
+
package() {
- cd "$pkgname-release-${pkgver}"
+ cd "$pkgname-${pkgver}"
python3 setup.py install --root="$pkgdir/" --install-data=/usr
# setuptools install_data is a nightmare, and cannot be made to respect the
# filesystem hierarchy. Do things manually instead.
mv "$pkgdir/usr/etc" "$pkgdir"
+
+ # man pages
+ mkdir -p "${pkgdir}/usr/share/man/man1"
+ cp doc/build/man/autosuspend.1 "${pkgdir}/usr/share/man/man1"
+ mkdir -p "${pkgdir}/usr/share/man/man5"
+ cp doc/build/man/autosuspend.conf.5 "${pkgdir}/usr/share/man/man5"
+
+ # HTML help
+ mkdir -p "${pkgdir}/usr/share/doc"
+ cp -R doc/build/html "${pkgdir}/usr/share/doc/${pkgname}"
}