-
-
Save anonymous/6f7cee87768108c334d3a75749a6e383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Score_Under <seejay 11@gmail com> | |
options=(!strip) # Don't strip libs because there aren't any | |
DOC_DIRS=(opt/hydrus/help) | |
pkgname=hydrus | |
pkgver=290 | |
pkgrel=1 | |
pkgdesc="Danbooru-like image tagging and searching system for the desktop" | |
arch=(any) | |
license=(WTFPL) | |
install=hydrus.install | |
conflicts=(hydrus-docs hydrus-sources) | |
url=http://hydrusnetwork.github.io/hydrus/ | |
depends=(python2 python2-wxpython-phoenix opencv python2-beautifulsoup4 python2-yaml | |
hsaudiotag python2-pypdf2 python2-pafy 'python2-lz4>=0.10.1' | |
python2-numpy python2-twisted python2-pillow python2-potr | |
python2-flvlib python2-pysocks python2-psutil python2-send2trash | |
python2-lxml python2-requests hdf5) | |
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=("https://github.com/hydrusnetwork/$pkgname/archive/v$pkgver.tar.gz" | |
paths-in-opt.patch | |
hydrus-client | |
hydrus-server | |
hydrus.desktop) | |
sha256sums=('5539f322af90ae0dc19eb16e9f5e7e112be32b9f328ff2a95cc072d69a0b5635' | |
'520fdc156dfb8c4a8c9a0c8c05e51807266809cddeca27a5b73049b2355c3a40' | |
'b2bf66b1068969e9598742d5c128cb04fd609512b0cff0ad5e25ecb6cdd35678' | |
'5fd3eb69bb5f9a0b88d7c1b25abdee42aa2b2fc5e1690635f60ed1f47848c46b' | |
'9b8c2603a8040ae80152ff9a718ad3e8803fdc3029a939e3c0e932ea35ded923') | |
prepare() { | |
cd "$pkgname-$pkgver" | |
git apply < ../paths-in-opt.patch | |
# Fix permissions | |
chmod a-x include/*.py | |
# Remove strange file | |
rm -f "include/pyconfig.h" | |
# Remove unit tests | |
rm -f "include/Test"*.py | |
rm -rf "static/testing" | |
} | |
build() { | |
cd "$pkgname-$pkgver" | |
msg 'Compiling .py files...' | |
python2 -OO -m compileall -fq . | |
} | |
package() { | |
cd "$pkgname-$pkgver" | |
# 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/" | |
# Create and populate /opt/hydrus/bin | |
install -d -m755 "${pkgdir}/opt/hydrus/bin" | |
ln -s /usr/bin/upnpc "${pkgdir}/opt/hydrus/bin/upnpc_linux" | |
ln -s /usr/bin/ffmpeg "${pkgdir}/opt/hydrus/bin/ffmpeg" | |
# Install hydrus-client and hydrus-server executables | |
install -d -m755 "${pkgdir}/usr/bin" | |
install -m755 ../hydrus-{client,server} "${pkgdir}/usr/bin/" | |
# Install .desktop shortcut | |
install -d -m755 "${pkgdir}/usr/share/applications" | |
install -m644 ../hydrus.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" | |
# 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}/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment