summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30156927c56d2223ba9c73bc9311d4b820bea9a0 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
pkgname='kanjitomo'
pkgdesc="identify Japanese characters from images or screen"
pkgver=1.0.4
pkgrel=4
arch=('any')
license=('custom')
url="http://kanjitomo.net"
source=("KanjiTomo.zip::http://kanjitomo.net/download.php")
sha256sums=('db3e7f23019b65435c236c3922700e78b8747ea980d74298a1d08ff36a38a31c')
depends=('java-environment')
backup=("etc/kanjitomo.conf")

package () {
  cd "$srcdir/KanjiTomo"
  # install
  mkdir -p "$pkgdir/usr/share/$pkgname"
  cp -r data images lib wallpaper KanjiTomo.jar "$pkgdir/usr/share/$pkgname"
  # licenses
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
  cp LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/${pkgname}_license"
  sed -n '/## ACKNOWLEDGEMENTS ##/,$p' README.txt > "$pkgdir/usr/share/licenses/$pkgname/libraries_license_information"
  # starter
  mkdir -p "$pkgdir/usr/bin/"
  echo -e "#!/bin/bash\ncd /usr/share/kanjitomo\nexec java -Xmx1200m -jar KanjiTomo.jar -run" > "$pkgdir/usr/bin/$pkgname"
  chmod +x "$pkgdir/usr/bin/$pkgname"
  # default config
  mkdir -p "$pkgdir/etc"
  cp config.txt "$pkgdir/etc/kanjitomo.conf"
  ln -s "/etc/kanjitomo.conf" "$pkgdir/usr/share/$pkgname/config.txt"
  sed -i "s/ENABLE_HOTKEYS=0/ENABLE_HOTKEYS=1/" "$pkgdir/etc/kanjitomo.conf"
  # desktopfile
  mkdir -p "$pkgdir/usr/share/applications/"
  echo -e "[Desktop Entry]\nName=$pkgname\nComment=$pkgdesc\nExec=/usr/bin/$pkgname\nTerminal=false\nType=Application\nCategories=Education\nIcon=$pkgname" \
    > "$pkgdir/usr/share/applications/$pkgname.desktop"
  # desktopfile image, feel free to remove
  mkdir -p "$pkgdir/usr/share/pixmaps/"
  echo -n "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AYKDQ0DHhIYQgAAAB1pVFh0Q29tbWVudAAAAAAAQ3Jl
YXRlZCB3aXRoIEdJTVBkLmUHAAALOElEQVR42u1abY8cRxF+qqf37mwL/hfYjp0XHJxAbGRBkEGA
sCAkjmPHYBQCIUGgoAgFKzEQAklQwOaHhSi+253phw9d3V3dM7N33K3yhVtrtJ7bme7qeq+nSoCb
RPVJt2KuYP7mAPSA9M0rvT63jL+R+sMQL+kBoT6b1u0AeggcAA/AgcK4Bxfxd3SA+Pg8O91wwKZo
9pHwdjElAs4slhbShema9zp9ZiseRgaAQ/wTgx4qER7iHgwABjCv7fSQTmnw8Vna/Q0NG6DZA0tM
f5xZIHESZpOu4b5rDjdErrPXZwPAPf19qLUDRgll2zDLFy2o9sTGaPbAqlkkqRDLt+iipB7A62Vf
Y7NpOmgfv/OB+qKOTGYTAAmGed686w0D2gMenWYPUQZQCvECY4fJbtlwOQDoIHCqwt5wVwwDgvEP
DpHhS4ArfW5lhEJEegYj+aGRoKhP2AzNagLWvvQleiMBs1H6n4jalNeNfaNexoaxMHbrzJUEZv3Q
oNpgmeJ0r2HCvo9Gc2QABZCuEEWZsC0alxOdlVQqyeLZ9VsgoLV5YSRAOv0WoxV7jS9BdKTZwYVa
khuiOTJAnFG1KXtyxoNyxg599qySbdZKi4Ds1E6Nztg3IxPojU9geV/0WYr6kM3Q7LMtiiXKNR7U
67qDsVuCMkCo6i0phFktCLWHx0JpYRPCrM2HOpokreFQmEFujGYf36GxQ5Ok5INs6+G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