-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
executable file
·84 lines (68 loc) · 1.97 KB
/
PKGBUILD
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
72
73
74
75
76
77
78
79
80
81
82
83
84
# Maintainer: Joe Davison <[email protected]>
pkgname=lgogdownloader-git
pkgver=2.28.r0.gf0f6708
pkgrel=2
pkgdesc="An open source downloader for GOG.com games, uses the GOG.com API (git version)"
url="http://www.gog.com/en/forum/general/lgogdownloader_gogdownloader_for_linux"
arch=(i686 x86_64)
license=(WTFPL)
depends=('boost>=1.6.0-5' 'boost-libs=>1.6.0-5' 'jsoncpp' 'liboauth' 'rhash' 'tinyxml' 'htmlcxx')
makedepends=('help2man' 'cmake' 'git')
provides=('lgogdownloader')
conflicts=('lgogdownloader')
_gitname="lgogdownloader"
source=('git://github.com/Sude-/lgogdownloader.git')
sha256sums=('SKIP')
# lgogdownloader has a new experimental aria2 feature available
# set _aria2 to "yes" to enable it
# For more details see https://www.gog.com/forum/general/lgogdownloader_gogdownloader_for_linux/post744
# Your mileage may vary -- It probably doesn't work
_aria2="no"
if [ "$_aria2" == "no" ]; then
depends=("$depends" 'curl')
elif [ "$_aria2" == "yes" ]; then
depends=("$depends" 'aria2')
source=(
"$source"
'https://sites.google.com/site/gogdownloader/use_aria2.diff'
)
sha256sums=(
'SKIP'
'539748573dfde781d29a1fed6bf7f0815353d8e93f1988a73ef9cd13459720ff'
)
else
error "$_aria2: Invalid option for _aria2 switch in PKGBUILD. Expected 'yes' or 'no'."
return 1
fi
pkgver() {
cd $srcdir/${_gitname}
git describe --long | sed 's/^v//;s/-/.r/;s/-/./'
}
prepare() {
cd $srcdir/${_gitname}
if [ ! -d "build" ]; then
mkdir build
else
rm -rf build/*
fi
# Possible options for -DCMAKE_BUILD_TYPE are Release and Debug
# Debug has console spew
if [ "$_aria2" == "no" ]; then
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
fi
if [ "$_aria2" == "yes" ]; then
cp $srcdir/use_aria2.diff $srcdir/${_gitname}
patch -p1 < use_aria2.diff
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_ARIA2=1 -DCMAKE_BUILD_TYPE=Release
fi
}
build() {
cd $srcdir/${_gitname}/build
make
}
package() {
cd $srcdir/${_gitname}/build
make DESTDIR=$pkgdir install
}