makedeb
RPG Maker 2003 Runtime Package (Japanese)
Click here to go back to the commit logs for rpg2003-rtp.
Hash: e840a063a460fe9f507c9e53e74d0f0d6a747904
Message: [fix] making it a valid package
Provide glue environment variables for easyrpg-player
diff --git a/.SRCINFO b/.SRCINFO
index 98dc189..49a8cc2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,19 @@
pkgbase = rpg2003-rtp
- pkgdesc = RPGMaker 2003 Runtime Package
- pkgver = 100
+ pkgdesc = RPG Maker 2003 Runtime Package (Japanese)
+ pkgver = 2003
pkgrel = 1
- url = http://www.rpgmakerweb.com/download/additional/run-time-packages
+ url = https://tkool.jp/support/download/rpg2003/rtp
arch = any
license = custom: commercial
- makedepends = unarchiver
makedepends = unshield-git
makedepends = convmv
+ makedepends = glibc
+ optdepends = easyrpg-player: game engine for using the RTP
noextract = 2003rtp.zip
- source = http://tkool.jp/assets/files/2003rtp.zip
- md5sums = 8b15ba45ae77cf06b59bff2ead633c4c
+ source = https://tkool.jp/assets/files/2003rtp.zip
+ source = rpg2003-rtp.sh
+ sha256sums = d388b183cc3a8206db53f58db4ea88c6661c9cf289c03aea1bf9ccd425f49cd1
+ sha256sums = bbf30c73a2a9933c930dc306b01e4dc70790f450567d319e0e0f1602f2e863cd
pkgname = rpg2003-rtp
diff --git a/PKGBUILD b/PKGBUILD
index fa02584..a2f3e8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,43 @@
-# Maintainer: maz-1 <ohmygod19993 at gmail dot com>
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+# Contributor: maz-1 <ohmygod19993 at gmail dot com>
+
pkgname=rpg2003-rtp
-pkgver=100
+pkgver=2003
pkgrel=1
-pkgdesc="RPGMaker 2003 Runtime Package"
-url='http://www.rpgmakerweb.com/download/additional/run-time-packages'
+pkgdesc="RPG Maker 2003 Runtime Package (Japanese)"
arch=('any')
+url="https://tkool.jp/support/download/rpg2003/rtp"
license=('custom: commercial')
-makedepends=('unarchiver' 'unshield-git' 'convmv')
-source=("http://tkool.jp/assets/files/2003rtp.zip")
-md5sums=('8b15ba45ae77cf06b59bff2ead633c4c')
-noextract=2003rtp.zip
+makedepends=('unshield-git' 'convmv' 'glibc')
+optdepends=('easyrpg-player: game engine for using the RTP')
+source=("https://tkool.jp/assets/files/2003rtp.zip"
+ "$pkgname.sh")
+sha256sums=('d388b183cc3a8206db53f58db4ea88c6661c9cf289c03aea1bf9ccd425f49cd1'
+ 'bbf30c73a2a9933c930dc306b01e4dc70790f450567d319e0e0f1602f2e863cd')
+noextract=('2003rtp.zip')
+
+prepare() {
+ # extract
+ bsdtar --strip-components 1 --include='*.exe' -xf 2003rtp.zip
+ bsdtar --include='*.txt' -O -xf 2003rtp.zip > TOS-sjis.txt
+ bsdtar -xf RPG2003RTP.exe
+ unshield -R -d rtp x data1.cab
+ # cleanup
+ rm -rf rtp/_*
+ convmv -f SHIFT-JIS -t UTF-8 -r --qfrom --notest rtp
+ iconv -f SHIFT-JIS -t UTF-8 TOS-sjis.txt > TOS.txt
+ mv rtp/"RPGツクール2003_ランタイムパッケージ" 2003
+}
package() {
- cd "$srcdir"
- unar -encoding SHIFT-JIS 2003rtp.zip
- cd "2003RTPセットアップ"
- unar RPG2003RTP.exe
- cd RPG2003RTP
- unshield -R x data1.cab
- convmv -r -f SHIFT-JIS -t utf-8 --notest .
-
- mkdir -p "$pkgdir/opt/"
- cp -r "${srcdir}/2003RTPセットアップ/RPG2003RTP/RPGツクール2003_ランタイムパッケージ/RTP" "$pkgdir/opt/$pkgname"
- install -Dm644 "$srcdir/2003RTPセットアップ/使用規約.txt" "$pkgdir/opt/$pkgname/使用規約.txt"
+ # data
+ install -d "$pkgdir"/usr/share/rtp
+ cp -r 2003/RTP "$pkgdir"/usr/share/rtp/2003
+ # sane permissions
+ find "$pkgdir"/usr/share/rtp -type d -exec chmod 0755 {} \;
+ find "$pkgdir"/usr/share/rtp -type f -exec chmod 0644 {} \;
+ # export environment variables
+ install -Dm0755 $pkgname.sh "$pkgdir"/etc/profile.d/$pkgname.sh
+ # license
+ install -Dm0644 TOS.txt "$pkgdir"/usr/share/licenses/$pkgname/TOS.txt
}
diff --git a/rpg2003-rtp.sh b/rpg2003-rtp.sh
new file mode 100644
index 0000000..41b6ce1
--- /dev/null
+++ b/rpg2003-rtp.sh
@@ -0,0 +1,10 @@
+RTP=/usr/share/rtp/2003
+
+if [ -z "$RPG2K3_RTP_PATH" ]; then
+ RPG2K3_RTP_PATH=$RTP
+else
+ # add to end of path list
+ RPG2K3_RTP_PATH=${RPG2K3_RTP_PATH}:$RTP
+fi
+
+export RPG2K3_RTP_PATH