makedeb


rpg2003-rtp 2003-1


RPG Maker 2003 Runtime Package (Japanese)

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for rpg2003-rtp.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: carstene1ns (AUR) <arch carsten-teibes de> - http://git.io/ctPKG
# Contributor: maz-1 (AUR) <ohmygod19993 at gmail dot com>
pkgname=rpg2003-rtp
pkgver=2003
pkgrel=1
pkgdesc="RPG Maker 2003 Runtime Package (Japanese)"
arch=('all')
url="https://tkool.jp/products/rtp.html"
license=('custom: commercial')
makedepends=('unshield' 'convmv')
optdepends=('easyrpg-player: game engine for using the RTP')
source=("https://tkool.jp/products/rtp/2003rtp.zip")
sha256sums=('d388b183cc3a8206db53f58db4ea88c6661c9cf289c03aea1bf9ccd425f49cd1')
noextract=('2003rtp.zip')

prepare() {
  # cleanup
  rm -rf rtp 2003
  # extract
  bsdtar --strip-components 1 --include='*.exe' -xf 2003rtp.zip
  bsdtar --include='*.txt' -O -xf 2003rtp.zip > TOS-raw.txt
  bsdtar -xf RPG2003RTP.exe
  unshield -R -d rtp x data1.cab
  # convert text
  convmv -f SHIFT-JIS -t UTF-8 -r --qfrom --notest rtp
  iconv -f SHIFT-JIS -t UTF-8 TOS-raw.txt > TOS.txt
  # adjust
  mv rtp/"RPGツクール2003_ランタイムパッケージ" 2003
  rm 2003/RTP/Harmony.dll
}

package() {
  # data
  install -d "$pkgdir"/usr/share/games/rtp
  cp -r 2003/RTP "$pkgdir"/usr/share/games/rtp/2003
  # link from /usr/share/rtp
  install -dm755 "$pkgdir"/usr/share/rtp/
  ln -sf /usr/share/games/rtp/2003 "$pkgdir"/usr/share/rtp/2003
  # sane permissions
  find "$pkgdir"/usr/share/games/rtp -type d -exec chmod 0755 {} \;
  find "$pkgdir"/usr/share/games/rtp -type f -exec chmod 0644 {} \;
  # license
  install -Dm0644 "TOS.txt" -t "$pkgdir"/usr/share/doc/$pkgname
}