diff options
author | fabish | 2018-07-15 17:27:33 +0200 |
---|---|---|
committer | fabish | 2018-07-15 17:27:33 +0200 |
commit | beefe9b2d09dddb06bbdd7fd893fdbef5168137d (patch) | |
tree | 2ffc0c49ecf5325a6b1f320f11058c8df1a3ff89 /PKGBUILD | |
parent | e12f2ee71c1d125c6c0ba36d30154e6cd9e5c243 (diff) | |
download | aur-beefe9b2d09dddb06bbdd7fd893fdbef5168137d.tar.gz |
split out the data to my git repo, replace echo with printf, restructure some parts
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 149 |
1 files changed, 74 insertions, 75 deletions
@@ -1,7 +1,7 @@ # Maintainer: Fabian <plusfabi[AT+thegoogleadress]> pkgname=pokemon-revolution-online-bin -pkgver=0.98.4.1.mystical.lugia +pkgver=0.98.4.2.rootsedition pkgrel=1 pkgdesc="A free-to-play, fan-made, MMO game that is predicated around the official Pokémon games." arch=('x86_64') @@ -12,91 +12,90 @@ makedepends=('unzip' 'xdg-utils') optdepends=('gtk2: required for the Unity ScreenSelector plugin') conflicts=('pokemon-revolution-online') install="INSTALL" -source=('net.pokemon-revolution-online.desktop' 'pokemonrevolution' 'copyright' 'pokemonrevolution.svg') -sha256sums=('64b5c6c47cd0705ff743fe3a14a0c71899db29f70f699d94cdf6f54e3fa13d00' - 'bc75525666fb273d7303e4baaaff386fd927d06c927b02141ee5ba8cac0e426f' - 'df736901de54dce3b191bd9744732f7b9970ab3cbdece8d7fbd7122e69ce32d5' - '54b5f40a5385eba58385c49b7ba6a4485d531acdb6289c3cb97dcf6825750956') +__DATA_VER=0.1.1 +source=("https://gitlab.com/fabish_random/pokemon-revolution-online-data/-/archive/${__DATA_VER}/pokemon-revolution-online-data-${__DATA_VER}.zip") +sha256sums=('533d250127b85054f4aa087857b130e7a21525ce6382aefd63adb564f4125212') + package() { - cd "${srcdir}" + cd "${srcdir}" - # Variables - ## i know this isn't a good thing and nobody wants to see this on aur, but it'll make things easier for me #Fabian - ## directory files naming is usually VNAMING_Data, binary VNAMING.x86_64 - __VNAMING="PROLinux" ##like PROLinux95_45_data, PROLinux95_45.x86_64 + # Variables + ## directory files naming is usually VNAMING_Data, binary VNAMING.x86_64 + __VNAMING="PRO" ##like PROLinux95_45_data, PROLinux95_45.x86_64 - __DLDIR=$(xdg-user-dir DOWNLOAD) ##downloaddirectory - __DDLA="https://tiny.cc/PROLinux" ##download link - __DDLFN="PROLinux.zip" ##filename - __DDLFSHA256="d2424bdbd17a78697a4507669a1dcdd112038de52ada7cef4728f7f1354da18f" #sha256sum + __DLDIR=$(xdg-user-dir DOWNLOAD) ##download directory + __DDLA="https://tiny.cc/PROLinux" ##download link + __DDLFN="PROLINUX.zip" ##filename + __DDLFSHA256="2e506cfb5bbe70695eeac4ca52b57b6668cc8ac0a502de08fac976780be4b038" #sha256sum - ## "Something's missing"? -> No One Cares - Atreyu c; - if [ ! -f ${__DLDIR}/${__DDLFN} ]; then - { - echo "${__DLDIR}/${__DDLFN} not found, please download it" - echo "Download: ${__DDLA}" - exit 1 - } - fi - ## lets check the sha256sum - if [ "$(sha256sum ${__DLDIR}/${__DDLFN} | awk '{print $1}')" != "${__DDLFSHA256}" ]; then - { - echo "${__DLDIR}/${__DDLFN} SHA256 MISMATCH, please remove the old file before downloading" - echo "rm \"${__DLDIR}/${__DDLFN}\"" - echo "Download: ${__DDLA}" - echo - echo "maybe this pkgbuild is out-of-date. please report this:" - echo "https://aur.archlinux.org/packages/pokemon-revolution-online-bin/" - exit 1 - } - fi + ## Check for the download file + if [ ! -f ${__DLDIR}/${__DDLFN} ]; then + { + printf "${__DLDIR}/${__DDLFN} not found, please download it\n" + printf "Download: ${__DDLA}\n" + exit 1 + } + fi + ## sha256sum check + if [ "$(sha256sum ${__DLDIR}/${__DDLFN} | awk '{printf $1}')" != "${__DDLFSHA256}" ]; then + { + printf "${__DLDIR}/${__DDLFN} SHA256 MISMATCH, please remove the old file before downloading\n" + printf "rm \"${__DLDIR}/${__DDLFN}\"\n" + printf "Download: ${__DDLA}\n\n" + printf "maybe this pkgbuild is out-of-date. please report this:\n" + printf "https://aur.archlinux.org/packages/pokemon-revolution-online-bin/\n" + exit 1 + } + fi - #bsdtar -x -p -f "${__DLDIR}/${__DDLFN}" - ## we're using unzip for now, since bsdtar cant handle the zip file - ## bsdtar: Invalid central directory signature - ## bsdtar: Error exit delayed from previous errors. - unzip "${__DLDIR}/${__DDLFN}" + #bsdtar -x -p -f "${__DLDIR}/${__DDLFN}" + ## we're using unzip for now, since bsdtar cant handle the zip file + ## bsdtar: Invalid central directory signature + ## bsdtar: Error exit delayed from previous errors. + /usr/bin/unzip "${__DLDIR}/${__DDLFN}" - # CREATE FOLDERS - ## copy the folderstructure of the original without content. - /usr/bin/find "." -type d -exec \ - install -d -m755 "${pkgdir}/opt/Pokemon Revolution/{}" \; + # CREATE FOLDERS + ## copy the folderstructure of the original without content. + /usr/bin/find "." -type d -exec \ + /usr/bin/install -d -m755 "${pkgdir}/opt/Pokemon Revolution/{}" \; - # MOVE CONTENT - ## minimize memory usage by using mv instead of install - ## this also fits more in our "permissions" to use it hashtag copyright, hashtag do NOT modify anything - /usr/bin/find "./${__VNAMING}_Data" \ - -type f -exec /usr/bin/mv "{}" "${pkgdir}/opt/Pokemon Revolution/{}" \; -exec /usr/bin/chmod 644 "${pkgdir}/opt/Pokemon Revolution/{}" \; - ## move to new position - /usr/bin/mv "${srcdir}/${__VNAMING}.x86_64" "${pkgdir}/opt/Pokemon Revolution/${__VNAMING}.x86_64" - ## set permission - /usr/bin/chmod 755 "${pkgdir}/opt/Pokemon Revolution/${__VNAMING}.x86_64" + # MOVE CONTENT + ## minimize memory usage by using mv instead of install + ## this also fits more in our "permissions" to use it hashtag copyright, hashtag do NOT modify anything + /usr/bin/find "./${__VNAMING}_Data" \ + -type f \ + -exec /usr/bin/mv "{}" "${pkgdir}/opt/Pokemon Revolution/{}" \; \ + -exec /usr/bin/chmod 644 "${pkgdir}/opt/Pokemon Revolution/{}" \; + ## move to new position + /usr/bin/mv "${srcdir}/${__VNAMING}.x86_64" "${pkgdir}/opt/Pokemon Revolution/${__VNAMING}.x86_64" + ## set permission + /usr/bin/chmod 755 "${pkgdir}/opt/Pokemon Revolution/${__VNAMING}.x86_64" - #MOVE ICON - ## cause we can not use the iroginal icon, we use a *.svg version. - install -D -m644 "${srcdir}/pokemonrevolution.svg" \ - "${pkgdir}/usr/share/pixmaps/pokemonrevolution.svg" + #MOVE ICON + ## cause we can not use the iroginal icon, we use a *.svg version. + /usr/bin/install -D -m644 "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/pokemonrevolution.svg" \ + "${pkgdir}/usr/share/pixmaps/pokemonrevolution.svg" - # DESKTOP FILE - ## Set the path to our pokemon scriptfile - /usr/bin/sed -i "s/GAMEEXECPATHSETBYPKGBUILD/\/usr\/bin\/pokemonrevolution/" "${srcdir}/net.pokemon-revolution-online.desktop" - ## let's Install the *.desktop file - install -D -m644 "${srcdir}/net.pokemon-revolution-online.desktop" \ - "${pkgdir}/usr/share/applications/net.pokemon-revolution-online.desktop" + # DESKTOP FILE + ## Set the path to our pokemon scriptfile + /usr/bin/sed -i "s/GAMEEXECPATHSETBYPKGBUILD/\/usr\/bin\/pokemonrevolution/" "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/net.pokemon-revolution-online.desktop" + ## let's Install the *.desktop file + /usr/bin/install -D -m644 "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/net.pokemon-revolution-online.desktop" \ + "${pkgdir}/usr/share/applications/net.pokemon-revolution-online.desktop" - # START SCRIPT - ## set the correct directory - /usr/bin/sed -i "s/GAMEDIRNAMESETBYPKGBUILD/\/opt\/Pokemon\ Revolution/" "${srcdir}/pokemonrevolution" - ## set the correct filename - /usr/bin/sed -i "s/GAMEBINARYNAMESETBYPKGBUILD/${__VNAMING}.x86_64/" "${srcdir}/pokemonrevolution" + # START SCRIPT + ## set the correct directory + /usr/bin/sed -i "s/GAMEDIRNAMESETBYPKGBUILD/\/opt\/Pokemon\ Revolution/" "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/pokemonrevolution" + ## set the correct filename + /usr/bin/sed -i "s/GAMEBINARYNAMESETBYPKGBUILD/${__VNAMING}.x86_64/" "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/pokemonrevolution" - ## move it! - install -D -m755 "${srcdir}/pokemonrevolution" \ - "${pkgdir}/usr/bin/pokemonrevolution" + ## move it! + /usr/bin/install -D -m755 "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/pokemonrevolution" \ + "${pkgdir}/usr/bin/pokemonrevolution" - # COPYRIGHT FILE - ## move the copyright text - install -D -m644 "${srcdir}/copyright" \ - "${pkgdir}/usr/share/licenses/pokemon-revolution-online-bin/copyright" + # COPYRIGHT FILE + ## move the copyright text + /usr/bin/install -D -m644 "${srcdir}/pokemon-revolution-online-data-${__DATA_VER}/pkg_copyright" \ + "${pkgdir}/usr/share/licenses/pokemon-revolution-online-bin/copyright" } |