mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
53 lines
1.4 KiB
Bash
53 lines
1.4 KiB
Bash
|
#
|
||
|
# Games Packages for Chakra, part of chakra-project.org
|
||
|
#
|
||
|
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
|
||
|
|
||
|
# include global config
|
||
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||
|
|
||
|
pkgname=supertuxkart-addons-tracks
|
||
|
pkgver=0.7
|
||
|
pkgrel=1
|
||
|
pkgdesc="Additional tracks for SuperTuxKart."
|
||
|
url="http://supertuxkart.sourceforge.net/"
|
||
|
arch=('any')
|
||
|
license=('custom:Unknown')
|
||
|
depends=('supertuxkart>=0.7')
|
||
|
makedepends=('unzip')
|
||
|
conflicts=('supertuxkart-svn')
|
||
|
source=("http://download.tuxfamily.org/stkaddons/file/tracks/Art museum [Irrlicht-0.7].zip"
|
||
|
"http://download.tuxfamily.org/stkaddons/file/tracks/Volcano.zip")
|
||
|
md5sums=('ad80c6287015e0f41869572780f15fd6'
|
||
|
'3a14013fe0b85d95be59e12e975cbf5e')
|
||
|
|
||
|
_addondir=$pkgdir/usr/share/games/supertuxkart/data/tracks
|
||
|
|
||
|
build() {
|
||
|
cd $srcdir
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
cd $srcdir
|
||
|
|
||
|
IFS=$'\n' # Needed for 'find' to work properly, don't know why.
|
||
|
for addonfile in $(find -type l -printf "%f\n")
|
||
|
do
|
||
|
addon=${addonfile:0:${#addonfile}-4}
|
||
|
install -d $_addondir/$addon
|
||
|
cd $_addondir/$addon
|
||
|
cp $srcdir/$addonfile $_addondir/$addon/
|
||
|
unzip $addonfile
|
||
|
rm $addonfile
|
||
|
|
||
|
if [ $(find -maxdepth 1 -type f -printf "%f\n" | wc -l) == 0 ] ; then
|
||
|
# Content was in a subfolder.
|
||
|
mv * ../
|
||
|
rmdir $_addondir/$addon
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
# Revome folders which are not actual add-ons:
|
||
|
rm -rf $_addondir/_*
|
||
|
}
|