diff options
author | Score_Under | 2015-10-14 23:49:36 +0100 |
---|---|---|
committer | Score_Under | 2015-10-14 23:49:36 +0100 |
commit | b65d3fda0dd1cc07a265eb5802ad44d18e46a400 (patch) | |
tree | 9b90b3d25e45f83b98a979d5831c9d1543ddfefe /PKGBUILD | |
parent | 814f6350cb1c97da844cd1593a98ba3182e07839 (diff) | |
download | aur-b65d3fda0dd1cc07a265eb5802ad44d18e46a400.tar.gz |
Split PKGBUILD
So that people can uninstall the xbox-huge documentation if they so
wish.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 83 |
1 files changed, 48 insertions, 35 deletions
@@ -1,19 +1,11 @@ # Maintainer: Score_Under <seejay 11@gmail com> -# Configuration: -##### - -build_pyc=false -build_pyo=true -remove_py=false -remove_help=false - -##### -options=(!strip) # Don't strip libs because there aren't any; this wastes time +options=(!strip docs) # Don't strip libs because there aren't any, don't strip docs because they're packaged separately DOC_DIRS=(opt/hydrus/help) -pkgname=hydrus +pkgbase=hydrus +pkgname=(hydrus hydrus-docs hydrus-sources) pkgver=176 -pkgrel=2 +pkgrel=3 pkgdesc="Danbooru-like image tagging and searching system for the desktop" arch=(any) license=(WTFPL) @@ -26,7 +18,7 @@ makedepends=(git) optdepends=('ffmpeg: show duration and other information on video thumbnails' 'miniupnpc: automatic port forwarding' 'desktop-file-utils: to add Hydrus to your desktop environment menus') -source=("${pkgname}::git+https://github.com/hydrusnetwork/${pkgname}.git#commit=cfb25c7739e16f2385c9b6adf547163a7712d3cf" +source=("${pkgbase}::git+https://github.com/hydrusnetwork/${pkgbase}.git#commit=cfb25c7739e16f2385c9b6adf547163a7712d3cf" paths-in-opt.patch running-the-server.patch hydrus-client @@ -38,10 +30,9 @@ sha256sums=('SKIP' 'b2bf66b1068969e9598742d5c128cb04fd609512b0cff0ad5e25ecb6cdd35678' '5fd3eb69bb5f9a0b88d7c1b25abdee42aa2b2fc5e1690635f60ed1f47848c46b' '9ba3942ac1a37f6b39c98ae6592573402bf08d8376f64554d0696c0fed6fd0e2') -install=hydrus.install prepare() { - cd "$pkgname" + cd "$pkgbase" patch -Np1 -i ../paths-in-opt.patch patch -Np1 -i ../running-the-server.patch @@ -57,28 +48,23 @@ prepare() { } build() { - cd "$pkgname" + cd "$pkgbase" # Compile .py files - $build_pyc && python2 -m compileall . - $build_pyo && python2 -OO -m compileall . + python2 -OO -m compileall . } -package() { - cd "$pkgname" +package_hydrus() { + install=hydrus.install - # Create /opt/hydrus and copy hydrus sources to there + cd "$pkgbase" + + # Create /opt/hydrus and copy hydrus files to there install -m755 -d "${pkgdir}/opt/hydrus" - cp -r help include static client.pyw server.py "${pkgdir}/opt/hydrus/" + cp -r include static client.pyw server.py "${pkgdir}/opt/hydrus/" # Remove .py files - $remove_py && find "${pkgdir}/opt/hydrus" -name '*.py' -delete - - # Remove help - $remove_help && rm -rf "${pkgdir}/opt/hydrus/help" - - # Fix permissions - chown -R root:root "${pkgdir}/opt/hydrus" + find "${pkgdir}/opt/hydrus/include" -name '*.py' -delete # Create and populate /opt/hydrus/bin install -d -m755 "${pkgdir}/opt/hydrus/bin" @@ -89,12 +75,39 @@ package() { install -d -m755 "${pkgdir}/usr/bin" install -m755 ../hydrus-{client,server} "${pkgdir}/usr/bin/" - # Install license files - install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" - install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" - install -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/" - # Install .desktop shortcut install -d -m755 "${pkgdir}/usr/share/applications" - install -m644 ../hydrus.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -m644 ../hydrus.desktop "${pkgdir}/usr/share/applications/${pkgbase}.desktop" +} + +package_hydrus-docs() { + depends=() + optdepends=() + pkgdesc="Danbooru-like image tagging and searching system for the desktop (documentation)" + + cd "$pkgbase" + + # Create /opt/hydrus and copy hydrus help to there + install -m755 -d "${pkgdir}/opt/hydrus" + cp -r help "${pkgdir}/opt/hydrus/" + + # Install license files + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgbase}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgbase}/" + install -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgbase}/" +} + +package_hydrus-sources() { + depends=() + optdepends=('hydrus: The sources are not usable without extra files from the hydrus package') + pkgdesc="Danbooru-like image tagging and searching system for the desktop (sources only)" + + cd "$pkgbase" + + # Create /opt/hydrus and copy hydrus sources to there + install -m755 -d "${pkgdir}/opt/hydrus" + cp -r include "${pkgdir}/opt/hydrus/" + + # Remove .pyo files + find "${pkgdir}/opt/hydrus/include" -name '*.pyo' -delete } |