summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5d9e64f93d3dcc9f6c9a2efde651fd762ceb436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

pkgbase='th06-demo'
pkgname=('th06-demo-data' 'th06-demo-wine' 'th06-demo-pytouhou')
pkgver=0.13
pkgrel=3
url='http://www16.big.or.jp/~zun/html/th06.html'
arch=('any')
license=('custom')
makedepends=('convmv' 'icoutils')
source=('http://www16.big.or.jp/~zun/data/soft/kouma_tr013.lzh'
        "$pkgbase-wine.desktop" "$pkgbase-wine.sh"
        "$pkgbase-pytouhou.desktop" "$pkgbase-pytouhou.sh")
sha1sums=('dfeb4dd358c6613ec4d8b701d41672ca75b6a0c9'
          '333378812ca70ba6c075abef71e6743e8cd331ca'
          '96bdc21f1e4f14bfeb19ff7025e83e658ec50f33'
          '93d2273e95886b29dfd94af22a485b0b50706ba8'
          '4591e137f7948508140c5014d11eacad41b63b0d')

prepare() {
  cd "$srcdir"
  convmv -f CP932 -t UTF-8 -r --notest .
}

package_th06-demo-data() {
  pkgdesc='Embodiment of Scarlet Devil trial version. Sixth game of the Touhou Project series; data files.'

  cd "$srcdir/東方紅魔郷 体験版"

  install -dm755 "$pkgdir/usr/share/$pkgbase"
  install -m755 *.exe "$pkgdir/usr/share/$pkgbase"
  install -m644 *.DAT "$pkgdir/usr/share/$pkgbase"

  install -dm755 "$pkgdir/usr/share/doc/$pkgbase/html"
  install -m644 *.txt 'マニュアル/index.html' "$pkgdir/usr/share/doc/$pkgbase"
  install -m644 マニュアル/html/* "$pkgdir/usr/share/doc/$pkgbase/html"

  install -dm755 "$pkgdir/usr/share/pixmaps"
  wrestool -x -o th06-demo.ico 東方紅魔郷.exe
  install -m644 th06-demo.ico "$pkgdir/usr/share/pixmaps"

  # Here we convert the ico file to png, not sure if it’s worth it.
  icotool -x th06-demo.ico
  install -m644 th06-demo_1_32x32x8.png  "$pkgdir/usr/share/pixmaps/th06-demo.png"
}

package_th06-demo-wine() {
  pkgdesc='Embodiment of Scarlet Devil trial version. Sixth game of the Touhou Project series; Wine version.'
  depends=("$pkgbase-data" 'wine')
  optdepends=('timidity++: for MIDI musics')

  install -dm755 "$pkgdir/usr/share/applications"
  install -m644 "$pkgname.desktop" "$pkgdir/usr/share/applications"

  install -dm755 "$pkgdir/usr/bin"
  install -m755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}

package_th06-demo-pytouhou() {
  pkgdesc='Embodiment of Scarlet Devil trial version. Sixth game of the Touhou Project series; PyTouhou version.'
  depends=("$pkgbase-data" 'pytouhou-hg')

  install -dm755 "$pkgdir/usr/share/applications"
  install -m644 "$pkgname.desktop" "$pkgdir/usr/share/applications"

  install -dm755 "$pkgdir/usr/bin"
  install -m755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}