makedeb


rpg2000-rtp 201906-1


RPG Maker 2000 Runtime Package (Japanese)

Viewing /PKGBUILD.

View raw.

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

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: carstene1ns (AUR) <arch carsten-teibes de> - http://git.io/ctPKG
pkgname=rpg2000-rtp
pkgver=201906
pkgrel=1
pkgdesc="RPG Maker 2000 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/2000rtp.zip"
        "https://tkool.jp/products/rtp/RTP_patchk_190612.zip")
sha256sums=('c130f0078c0d6ecc3404f94af8258e4557ab85c3b204397c7f21dbc57efeef8e'
            '3041c57af04675b990da5709928fe7794cac2e4b21f6b526a81d310b353db3ad')
noextract=('2000rtp.zip' 'RTP_patchk_190612.zip')

prepare() {
  # cleanup
  rm -rf rtp 2000 RTP_patchk_190612
  # extract
  bsdtar --strip-components 1 --include='*.exe' -xf 2000rtp.zip
  bsdtar --include='*.txt' -O -xf 2000rtp.zip > "TOS-raw.txt"
  bsdtar -xf RPG2000RTP.exe
  unshield -R -d rtp x data1.cab
  bsdtar -xf RTP_patchk_190612.zip
  # convert text
  convmv -f SHIFT-JIS -t UTF-8 -r --qfrom --notest rtp 
  convmv -f SHIFT-JIS -t UTF-8 -r --qfrom --notest RTP_patchk_190612
  iconv -f ms932 -t UTF-8 "TOS-raw.txt" > "TOS.txt"
  iconv -f ms932 -t UTF-8 RTP_patchk_190612/"RTPの修正ファイルについて.txt" > "PatchNotes.txt"
  # apply patch
  mv rtp/"RPGツクール2000_ランタイムパッケージ" 2000
  rm 2000/RTP/Harmony.dll
  mv RTP_patchk_190612/"モンスター.png" 2000/RTP/FaceSet
  mv RTP_patchk_190612/"主人公3.png" 2000/RTP/CharSet
  mv RTP_patchk_190612/{"基本","ダンジョン","船","内装","外観"}.png 2000/RTP/ChipSet
}

package() {
  # data
  install -Dm0644 2000/RPG2000.ico "$pkgdir"/usr/share/games/rtp/RPG2000.ico
  cp -r 2000/RTP "$pkgdir"/usr/share/games/rtp/2000
  # link from /usr/share/rtp
  install -dm644 "$pkgdir"/usr/share/rtp/
  ln -sf /usr/share/games/rtp/2000 "$pkgdir"/usr/share/rtp/2000
  ln -sf /usr/share/games/rtp/RPG2000.ico "$pkgdir"/usr/share/rtp/RPG2000.ico
  # 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
  # patch doc
  install -Dm0644 "PatchNotes.txt" -t "$pkgdir"/usr/share/doc/$pkgname
}