blob: ee8fb4e8a09c753282163515f3dc7ea4e57b38b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: mrxx <mrxx at cyberhome dot at>
# Contributor: Det <nimetonmaili gmail a-dot com>
pkgname=biglybt
pkgver=2.2.0.2
pkgrel=1
pkgdesc="Feature-filled Bittorrent client based on the Azureus project"
arch=('x86_64')
url="https://www.biglybt.com/"
license=('GPL3')
depends=('desktop-file-utils' 'xdg-user-dirs' 'java-runtime>=8')
optdepends=('jna' 'libappindicator-gtk3' 'ttf-dejavu')
options=('!strip')
install=$pkgname.install
source=("GitHub_BiglyBT_Installer_$pkgver.sh::https://github.com/BiglySoftware/BiglyBT/releases/download/v$pkgver/GitHub_BiglyBT_Installer.sh")
sha256sums=('07d5e4408db9266050ac73bf3429e637f919b25d2fa6095471486e03d41a6c60')
package() {
if [[ ! -f /usr/bin/javac ]]; then
warning "Installation without JDK will cause prompts for Root password during build!"
fi
if [[ -d $pkgname ]]; then
msg2 "Cleaning build environment..."
rm -r $pkgname
fi
msg2 "Extracting GitHub_BiglyBT_Installer_$pkgver.sh..."
export app_java_home="/usr/lib/jvm/default"
sh GitHub_BiglyBT_Installer_$pkgver.sh -q -dir "$srcdir"/$pkgname
# Remove local .desktop files (only if they were just created by the Java installer
# which creates them a) in the wrong place and b) with wrong paths, therefore
# preventing the start of the program via the launcher)
find ~/.local/share/applications -name $pkgname.desktop -cmin -1 -exec rm {} +
_user_desktop=$(xdg-user-dir DESKTOP)
[ "$_user_desktop" ] && find "$_user_desktop" -name $pkgname.desktop -cmin -1 -exec rm -f {} +
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 "Fixing paths..."
sed -i "s|#PROGRAM_DIR=.*|PROGRAM_DIR=\"/opt/$pkgname\"|" $pkgname
sed -i -e "s|Exec=.*|Exec=$pkgname %U|" -e "s|Icon=.*|Icon=$pkgname|" $pkgname.desktop
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/
}
|