summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5768f0889709ce80ecffe7704a95f1d51d938896 (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=2.0
pkgver=${mainver}.1.1414
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/$mainver/HO_$pkgver.deb)

md5sums=('c1d6c74b254f3529f7dc130034b2ae04')

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
}