summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 55554795eb7254226deda0ec82b33333cfeb8907 (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
# Maintainer : yaute <yaute74@gmail.com>

pkgname=hattrick_organizer-git
mainver=4.0
pkgver=${mainver}.0.2736
pkgrel=1
pkgdesc="A manager assistent for the online football manager Hattrick "
arch=(i686 x86_64)
url="https://github.com/akasolace/HO"
license=(LGPL)
depends=(java-runtime)
makedepends=(libarchive)
source=(https://github.com/akasolace/HO/releases/download/dev/HO-$pkgver.deb)

sha256sums=('9f1b7ce749217eb9b371a116e6613feeb68d30b7e01f1ef8084425e1424fb3d2')

package() {
desktopfile=$pkgdir/usr/share/applications/ho.desktop
desktopfile_git=$pkgdir/usr/share/applications/ho-git.desktop
libpath=$pkgdir/usr/lib/ho
libpath_git=$pkgdir/usr/lib/ho-git
shellfile=$pkgdir/usr/bin/ho.sh
shellfile_git=$pkgdir/usr/bin/ho-git.sh

cd $srcdir
bsdtar xf  HO-$pkgver.deb || return 1
bsdtar xf data.tar.gz -C $pkgdir || return 1
sed -i "s|Name=HattrickOrganizer.*|Name=HattrickOrganizer beta ${pkgver}|" $desktopfile
sed -i "s|/usr/lib/ho|/usr/lib/ho-git|" $desktopfile
sed -i "s|/usr/bin/ho|/usr/bin/ho-git|" $desktopfile
sed -i "s|/.ho|/.ho-git|" $shellfile
sed -i "s|/usr/lib/ho|/usr/lib/ho-git|" $shellfile

mv $libpath $libpath_git
mv $desktopfile $desktopfile_git
mv $shellfile $shellfile_git
ln -s /usr/bin/ho-git.sh $pkgdir/usr/bin/ho-git
rm $pkgdir/usr/bin/ho
}