Skip to content

Instantly share code, notes, and snippets.

@mbloms
Last active February 28, 2018 21:47
Show Gist options
  • Save mbloms/5bff180ecdae7fe943a96e08120edb47 to your computer and use it in GitHub Desktop.
Save mbloms/5bff180ecdae7fe943a96e08120edb47 to your computer and use it in GitHub Desktop.
BiglyBT-AUR
pkgbase = biglybt
pkgdesc = Feature-filled Bittorrent client based on the Azureus project
pkgver = 1.4.0.0
pkgrel = 2
url = https://www.biglybt.com/
install = biglybt.install
arch = x86_64
license = GPL3
depends = desktop-file-utils
depends = java-runtime>=9
options = !strip
source = GitHub_BiglyBT_Installer_1.4.0.0.sh::https://github.com/BiglySoftware/BiglyBT/releases/download/v1.4.0.0/GitHub_BiglyBT_Installer.sh
md5sums = 1e059362ac473e4a8c386bb5115bffa4
pkgname = biglybt
# Colored makepkg-like functions
msg_blue() {
printf "${blue}==>${bold} $1${all_off}\n"
}
note() {
printf "${yellow}==>${bold} $1${all_off}\n"
}
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
post_install() {
note "It is recommended to disable the builtin automatic updater in:
Tools > Options > Interface > Start, and
Tools > Options > Plugins > Plugin Update"
}
post_upgrade() {
post_install
}
# Maintainer: Det <nimetonmaili gmail a-dot com>
pkgname=biglybt
pkgver=1.4.0.0
pkgrel=2
pkgdesc="Feature-filled Bittorrent client based on the Azureus project"
arch=('x86_64')
url="https://www.biglybt.com/"
license=('GPL3')
depends=('desktop-file-utils' 'java-runtime>=9')
options=('!strip')
install=$pkgname.install
source=("GitHub_BiglyBT_Installer_$pkgver.sh::https://github.com/BiglySoftware/BiglyBT/releases/download/v$pkgver/GitHub_BiglyBT_Installer.sh")
md5sums=('1e059362ac473e4a8c386bb5115bffa4')
package() {
rm -rf $pkgname
msg2 "Extrcting GitHub_BiglyBT_Installer_$pkgver.sh..."
export app_java_home=/usr/lib/jvm/default
sh GitHub_BiglyBT_Installer_$pkgver.sh -q -dir "$srcdir"/$pkgname
cd "$srcdir"/$pkgname
msg2 "Creating directory structure..."
install -d "$pkgdir"/opt/$pkgname/
install -d "$pkgdir"/usr/bin/
install -d "$pkgdir"/usr/share/applications/
install -d "$pkgdir"/usr/share/licenses/$pkgname/
install -d "$pkgdir"/usr/share/pixmaps/
msg2 "Moving stuff in place..."
# Launchers
mv $pkgname "$pkgdir"/usr/bin/
# Icon and desktop
mv $pkgname.svg "$pkgdir"/usr/share/pixmaps/
mv $pkgname.desktop "$pkgdir"/usr/share/applications/
# Licenses
mv 3rdPartyLicences.txt GPL.txt GPLv3.txt "$pkgdir"/usr/share/licenses/$pkgname/
msg2 "Removing redundancies..."
rm swt/swt-{bsd,ppc64,ppc64le,x86}.jar
rm biglybt-lightgray.svg biglybt.png
rm installer.log
rm {,un}registerBiglyBT uninstall updateBiglyBT
msg2 "Installing to /opt..."
mv * "$pkgdir"/opt/$pkgname/
msg2 "Fixing paths..."
sed -i "s|#PROGRAM_DIR=.*|PROGRAM_DIR=\"/opt/$pkgname\"|" "$pkgdir"/usr/bin/$pkgname
sed -e "s|Exec=.*|Exec=$pkgname %U|" -e "s|Icon=.*|Icon=$pkgname|" \
-i "$pkgdir"/usr/share/applications/$pkgname.desktop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment