updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / battlejump-levels / PKGBUILD
blob6249efa2c9a4144236cc81ae816d50c03d0858f2
1 # Maintener: Deather <deather.jeuxlinux@gmail.com>
3 pkgname=battlejump-levels
4 pkgver=1.0
5 pkgrel=2
6 pkgdesc="All unofficial levels from the official website."
7 arch=('i686' 'x86_64')
8 url="http://www.battlejump.com/unofficialLevels"\
9 "-en-battle-jump-level-manager.html"
10 # License not been set because it is composed of 
11 # multiple licenses
12 license=('')
13 depends=('battlejump')
14 install="${pkgname}.install"
16 build(){
17         # Get the zip with another way because the md5sum is variable
18         _level_zip="all-custom-levels.zip"
19         _source="http://www.battlejump.com/${_level_zip}"
20         _name_folder_battlejump="battlejump"
21         _name_folder_levels="Levels"
22         _name_folder_downloaded="Downloaded"
24         _path_level_custom="usr/share/${_name_folder_battlejump}/"\
25 "${_name_folder_levels}/${_name_folder_downloaded}"
26         
27         _save_downloaded_file=".downloaded"
29         cd ${srcdir}
30         
31         if test -e "../${_level_zip}"; then
32                 msg "Zip file is already downloaded"
33                 cp "../${_level_zip}" "${srcdir}"
34         else
35                 msg "Downloading zip file ..."
36                 wget "${_source}" 1>/dev/null 2>/dev/null
37         fi
39         mkdir -p "${pkgdir}/${_path_level_custom}"
41         cd "${pkgdir}/${_path_level_custom}"
42         msg "Decompressing zip file ..."
43         unzip "${srcdir}/${_level_zip}" 1>/dev/null
45         msg "Levels are decompressed in /usr/share/battlejump/"\
46 "Levels/Downloaded"
48         ls | grep -v "readme.txt" > "${_save_downloaded_file}"