From 67926c6e06dbf6808877e9c3b2b0daf41e0f79d2 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sun, 5 Feb 2017 00:36:30 -0500 Subject: [PATCH] Add filebot --- src/filebot/.SRCINFO | 33 ++++++++++++++++++ src/filebot/PKGBUILD | 56 ++++++++++++++++++++++++++++++ src/filebot/filebot-arch.sh | 28 +++++++++++++++ src/filebot/filebot.desktop | 8 +++++ src/filebot/filebot.install | 9 +++++ src/filebot/filebot.svg | 68 +++++++++++++++++++++++++++++++++++++ 6 files changed, 202 insertions(+) create mode 100644 src/filebot/.SRCINFO create mode 100644 src/filebot/PKGBUILD create mode 100644 src/filebot/filebot-arch.sh create mode 100644 src/filebot/filebot.desktop create mode 100644 src/filebot/filebot.install create mode 100644 src/filebot/filebot.svg diff --git a/src/filebot/.SRCINFO b/src/filebot/.SRCINFO new file mode 100644 index 0000000..6b07d6d --- /dev/null +++ b/src/filebot/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = filebot + pkgdesc = The ultimate tool to rename TV/anime shows, download subtitles, and validate checksums. + pkgver = 4.7.7 + pkgrel = 5 + url = http://filebot.sourceforge.net/ + install = filebot.install + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + license = GPL + makedepends = unzip + depends = java-runtime>=8 + depends = fontconfig + depends = chromaprint + optdepends = libzen: Support for additional subtitle search engines (Sublight) + optdepends = libmediainfo: Episode naming / Sublight usage + optdepends = java-p7zip-binding: Extract archives + optdepends = gvfs: gvfs backends + source = http://downloads.sourceforge.net/project/filebot/filebot/FileBot_4.7.7/FileBot_4.7.7-portable.tar.xz + source = https://github.com/java-native-access/jna/archive/4.2.2.tar.gz + source = filebot-arch.sh + source = filebot.svg + source = filebot.desktop + md5sums = 58d35910d5d164454c7840122a17dace + md5sums = 51d0359bcdb999ec0a655c68d399f304 + md5sums = 3b51756c50a54447a5e6fb6c052e3453 + md5sums = 04f46be047049448dba3f0de29fe192d + md5sums = f37edd0bba7570904d28ab1681c7a7f3 + +pkgname = filebot + diff --git a/src/filebot/PKGBUILD b/src/filebot/PKGBUILD new file mode 100644 index 0000000..1b34312 --- /dev/null +++ b/src/filebot/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: max.bra +# Contributor: said +# Contributor: Kaurin +# Contributor: Nathan Owe + +pkgname=filebot +pkgver=4.7.7 +pkgrel=5 +_jnaver=4.2.2 +pkgdesc="The ultimate tool to rename TV/anime shows, download subtitles, and validate checksums." +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h') +url="http://filebot.sourceforge.net/" +license=('GPL') +install=$pkgname.install +depends=('java-runtime>=8' 'fontconfig' 'chromaprint') +makedepends=('unzip') + +[[ $CARCH == "i686" ]] && _intarch=x86 +[[ $CARCH == "x86_64" ]] && _intarch=x86-64 +[[ $CARCH == "arm" ]] && _intarch=arm +[[ $CARCH == "armv6h" ]] && _intarch=arm +[[ $CARCH == "armv7h" ]] && _intarch=arm + +source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/FileBot_$pkgver/FileBot_$pkgver-portable.tar.xz + https://github.com/java-native-access/jna/archive/$_jnaver.tar.gz + $pkgname-arch.sh $pkgname.svg $pkgname.desktop) + +md5sums=('58d35910d5d164454c7840122a17dace' + '51d0359bcdb999ec0a655c68d399f304' + '3b51756c50a54447a5e6fb6c052e3453' + '04f46be047049448dba3f0de29fe192d' + 'f37edd0bba7570904d28ab1681c7a7f3') + +optdepends=('libzen: Support for additional subtitle search engines (Sublight)' + 'libmediainfo: Episode naming / Sublight usage' + 'java-p7zip-binding: Extract archives' + 'gvfs: gvfs backends') + +#noextract=($(for i in ${source[@]}; do basename $i; done)) + +build() { + /bin/true +} + +prepare() { + cd jna-$_jnaver/lib/native/ + unzip linux-$_intarch.jar 2>&1 >/dev/null +} + +package() { + install -Dm644 FileBot.jar "$pkgdir/usr/share/java/$pkgname/$pkgname.jar" + install -Dm644 jna-$_jnaver/lib/native/libjnidispatch.so "$pkgdir/usr/share/java/$pkgname/libjnidispatch.so" + install -Dm755 $pkgname-arch.sh "$pkgdir/usr/bin/$pkgname" + install -Dm644 $pkgname.svg "$pkgdir/usr/share/pixmaps/$pkgname.svg" + install -Dm644 $pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" +} diff --git a/src/filebot/filebot-arch.sh b/src/filebot/filebot-arch.sh new file mode 100644 index 0000000..a30aac7 --- /dev/null +++ b/src/filebot/filebot-arch.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# force JVM language and encoding settings +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" + +APP_ROOT=/usr/share/java/filebot +# add APP_ROOT to LD_LIBRARY_PATH +if [ ! -z "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT" +else + export LD_LIBRARY_PATH="$APP_ROOT" +fi + +# choose extractor +EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 with junrar plugin +# EXTRACTOR="SevenZipExecutable" # use the 7z executable +# EXTRACTOR="SevenZipNativeBindings" # use the lib7-Zip-JBinding.so native library + +# start filebot +java -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -DuseCreationDate=false \ +-Dfile.encoding="UTF-8" -Dsun.jnu.encoding="UTF-8" -Djava.net.useSystemProxies=false \ +-Djna.nosys=false -Dapplication.deployment=portable \ +-Dnet.filebot.Archive.extractor="$EXTRACTOR" -Dnet.filebot.AcoustID.fpcalc="fpcalc" \ +-Dapplication.dir=$HOME/.config/filebot -Djava.io.tmpdir=/tmp/filebot -Dapplication.update=skip \ +-Djna.library.path=/usr/share/java \ +$JAVA_OPTS -jar /usr/share/java/filebot/filebot.jar "$@" + diff --git a/src/filebot/filebot.desktop b/src/filebot/filebot.desktop new file mode 100644 index 0000000..00188b7 --- /dev/null +++ b/src/filebot/filebot.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Filebot +Comment=TV renamer/subtitle downloader/sfv validator +Exec=filebot +Icon=filebot +Categories=AudioVideo; diff --git a/src/filebot/filebot.install b/src/filebot/filebot.install new file mode 100644 index 0000000..f08802d --- /dev/null +++ b/src/filebot/filebot.install @@ -0,0 +1,9 @@ +post_install() { +echo -e "\e[1;33m==>\e[0m if you use OpenJDK as Java VM you \e[1;31mmust\e[0m also install OpenJFX" +echo -e "\e[1;33m==>\e[0m \e[1;36mhttps://wiki.archlinux.org/index.php/Java#OpenJFX\e[0m" +} + +post_upgrade() { + post_install $1 +} + diff --git a/src/filebot/filebot.svg b/src/filebot/filebot.svg new file mode 100644 index 0000000..13cc237 --- /dev/null +++ b/src/filebot/filebot.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +