Created
August 30, 2018 20:20
-
-
Save Un1Gfn/920a7f7787fbf028cbd7e2b1fa945e44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Darren Wu <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')> | |
_gemname=aozora4reader | |
pkgname=aozoras | |
pkgver=1 | |
pkgrel=1 | |
pkgdesc='furikana & aozora4reader & aozora-pakejji' | |
arch=('any') | |
url='https://github.com/takahashim/aozora4reader' | |
# furikana # http://xymtex.my.coocan.jp/fujitas2/texlatex/index.html | |
# aozora4reader # https://tatsu-zine.com/aozora/ | |
# aozora4reader # https://github.com/takahashim/aozora4reader | |
# aozora-kindle # http://a2k.aill.org/ | |
# aozora-pakejji # http://psitau.kitunebi.com/aozora.html | |
license=('unknown' | |
'MIT' | |
'unknown') | |
depends=('ruby-bundler' | |
'ruby-rake' | |
'ruby-rdoc' | |
'texlive-langjapanese') | |
makedepends=('nkf') | |
options=(!emptydirs) | |
source=("http://xymtex.my.coocan.jp/fujitas2/texlatex/tategumi/furikana.sty" | |
"https://rubygems.org/downloads/$_gemname-$pkgver.gem" | |
"http://psitau.kitunebi.com/aozora.zip" | |
"aozora.rb.patch") | |
noextract=("$_gemname-$pkgver.gem") | |
sha1sums=('6d8837b1e72bc63386800bdc862fb2117a4a55b3' | |
'2f7b94253c7dc188b35c56ae87d9a41c9e4a3989' | |
'ff8324ef6db0a019ba14f28776307bf6d3a3cef4' | |
'8d0037054afd5f7b0dc45f38c3e077d50aca98c1') | |
package() { | |
# prepare | |
_RESDIR="$pkgdir"/usr/share/texmf-dist/tex/platex/ | |
mkdir -p "$_RESDIR" | |
# furikana | |
nkf -w furikana.sty >"$_RESDIR"/furikana.sty | |
# aozora4reader | |
local _gemdir="$(ruby -e'puts Gem.default_dir')" | |
gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem | |
rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem" | |
pushd "$_RESDIR" | |
ln -s ../../../../lib/ruby/gems/2.5.0/gems/aozora4reader-1.2.1/sty/aozora.sty aozora.sty | |
ln -s ../../../../lib/ruby/gems/2.5.0/gems/aozora4reader-1.2.1/sty/aozora4reader.sty aozora4reader.sty | |
ln -s ../../../../lib/ruby/gems/2.5.0/gems/aozora4reader-1.2.1/sty/aozorakindle.sty aozorakindle.sty | |
popd | |
# aozora-pakejji | |
pushd aozora | |
cp 1010crop.sty "$_RESDIR/" | |
patch <../aozora.rb.patch | |
cp aozora.rb "$pkgdir"/usr/bin/az2tex; chmod +x "$pkgdir"/usr/bin/az2tex | |
cp azlogo.eps "$_RESDIR/" | |
cp dvi2nak "$pkgdir"/usr/bin/dvi2nak; chmod +x "$pkgdir"/usr/bin/dvi2nak | |
popd | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment