## -*- coding: utf-8-unix -*-
## NOTE: This spec file is generated by tlpdb2rpmspec 2015-2: 
## tlpdb2rpmspec collection-langjapanese

%global _use_internal_dependency_generator 0
%global __find_provides %{nil}
%global __find_requires %{nil}

Summary: TeX Live: Japanese
Summary(ja): TeX Live: Japanese
Name: texlive-collection-langjapanese
Version: 2015
Release: 2%{?_dist_release}
License: Freely redistributable without restriction, LPPL, BSD, GPL+, GPLv2+
Group: Applications/Publishing
URL:http://www.tug.org/texlive/

Source0: bxbase.doc.tar.xz
Source1: bxbase.tar.xz
Source2: bxcjkjatype.doc.tar.xz
Source3: bxcjkjatype.tar.xz
Source4: bxjscls.doc.tar.xz
Source5: bxjscls.source.tar.xz
Source6: bxjscls.tar.xz
Source7: convbkmk.doc.tar.xz
Source8: convbkmk.tar.xz
Source9: ipaex.doc.tar.xz
Source10: ipaex.tar.xz
Source11: japanese.doc.tar.xz
Source12: japanese.source.tar.xz
Source13: japanese.tar.xz
Source14: japanese-otf.doc.tar.xz
Source15: japanese-otf.source.tar.xz
Source16: japanese-otf.tar.xz
Source17: japanese-otf-uptex.doc.tar.xz
Source18: japanese-otf-uptex.source.tar.xz
Source19: japanese-otf-uptex.tar.xz
Source20: jfontmaps.doc.tar.xz
Source21: jfontmaps.source.tar.xz
Source22: jfontmaps.tar.xz
Source23: jsclasses.doc.tar.xz
Source24: jsclasses.source.tar.xz
Source25: jsclasses.tar.xz
Source26: lshort-japanese.doc.tar.xz
Source27: lshort-japanese.tar.xz
Source28: luatexja.doc.tar.xz
Source29: luatexja.source.tar.xz
Source30: luatexja.tar.xz
Source31: ptex.doc.tar.xz
Source32: ptex.source.tar.xz
Source33: ptex.tar.xz
Source34: ptex2pdf.doc.tar.xz
Source35: ptex2pdf.tar.xz
Source36: pxbase.doc.tar.xz
Source37: pxbase.tar.xz
Source38: pxchfon.doc.tar.xz
Source39: pxchfon.tar.xz
Source40: pxcjkcat.doc.tar.xz
Source41: pxcjkcat.tar.xz
Source42: pxjahyper.doc.tar.xz
Source43: pxjahyper.tar.xz
Source44: pxrubrica.doc.tar.xz
Source45: pxrubrica.source.tar.xz
Source46: pxrubrica.tar.xz
Source47: uptex.doc.tar.xz
Source48: uptex.source.tar.xz
Source49: uptex.tar.xz
Source50: wadalab.doc.tar.xz
Source51: wadalab.tar.xz
Source52: zxjafbfont.doc.tar.xz
Source53: zxjafbfont.tar.xz
Source54: zxjatype.doc.tar.xz
Source55: zxjatype.tar.xz

Requires: texlive = %{version}
Requires: texlive-collection-langcjk = %{version}

Requires(post):		texlive = %{version}
Requires(postun):	texlive = %{version}

BuildArch:	noarch
Buildroot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	munepi

%description
The TeX Live software distribution offers a complete TeX system for a
variety of Unix, Macintosh, Windows and other platforms. It
encompasses programs for editing, typesetting, previewing and printing
of TeX documents in many different languages, and a large collection
of TeX macros and font libraries.

The distribution includes extensive general documentation about TeX,
as well as the documentation for the included software packages.

This package is a collection of Japanese: 
Support for Japanese; additional packages in collection-
langcjk.

This package contains the following CTAN packages: 
bxbase: BX bundle base components.
bxcjkjatype: Typeset Japanese with pdfLaTeX and CJK.
bxjscls: Document classes based on jsclasses.
convbkmk: Correct platex/uplatex bookmarks in PDF created with hyperref.
ipaex: IPA and IPAex fonts from Information-technology Promotion Agency, Japan.
japanese: A substitute for a babel package for Japanese.
japanese-otf: Advanced font selection for platex and its friends.
japanese-otf-uptex: Support for Japanese OTF files in upLaTeX.
jfontmaps: Font maps and configuration tools for Japanese fonts.
jsclasses: Classes tailored for use with Japanese.
lshort-japanese: Japanese version of A Short Introduction to LaTeX2e
luatexja: Typeset Japanese with lua(la)tex.
ptex: A TeX system for publishing in Japanese.
ptex2pdf: Convert Japanese TeX documents to PDF.
pxbase: Tools for use with (u)pLaTeX.
pxchfon: Japanese font setup for pLaTeX and upLaTeX.
pxcjkcat: LaTeX interface for the CJK category codes of upTeX.
pxjahyper: Hyperref support for pLaTeX.
pxrubrica: 
uptex: Unicode version of pTeX.
wadalab: Wadalab (Japanese) font packages.
zxjafbfont: Fallback CJK font support for xeCJK.
zxjatype: Standard conforming typesetting of Japanese, for XeLaTeX.

%description -l ja
TeX Live ソフトウェアディストリビューションは、
さまざまな Unix, Macintosh, Windows、および
他のプラットホームに対して完全な TeX システムを提供します。
多くの異なった言語を含む TeX ドキュメントの
編集、組版、閲覧、印刷するためのプログラム、
そして、TeX マクロやフォントライブラリの大きなコレクションを
同梱しています。

このディストリビューションは
同梱しているソフトウェアパッケージのためのドキュメントばかりでなく、
TeX に関するたくさんの一般的なドキュメントを含んでいます。

このパッケージは以下のようなパッケージ集です。
Japanese: 
Support for Japanese; additional packages in collection-
langcjk.

このパッケージは以下の CTAN パッケージを含んでいます： 
bxbase: BX bundle base components.
bxcjkjatype: Typeset Japanese with pdfLaTeX and CJK.
bxjscls: Document classes based on jsclasses.
convbkmk: Correct platex/uplatex bookmarks in PDF created with hyperref.
ipaex: IPA and IPAex fonts from Information-technology Promotion Agency, Japan.
japanese: A substitute for a babel package for Japanese.
japanese-otf: Advanced font selection for platex and its friends.
japanese-otf-uptex: Support for Japanese OTF files in upLaTeX.
jfontmaps: Font maps and configuration tools for Japanese fonts.
jsclasses: Classes tailored for use with Japanese.
lshort-japanese: Japanese version of A Short Introduction to LaTeX2e
luatexja: Typeset Japanese with lua(la)tex.
ptex: A TeX system for publishing in Japanese.
ptex2pdf: Convert Japanese TeX documents to PDF.
pxbase: Tools for use with (u)pLaTeX.
pxchfon: Japanese font setup for pLaTeX and upLaTeX.
pxcjkcat: LaTeX interface for the CJK category codes of upTeX.
pxjahyper: Hyperref support for pLaTeX.
pxrubrica: 
uptex: Unicode version of pTeX.
wadalab: Wadalab (Japanese) font packages.
zxjafbfont: Fallback CJK font support for xeCJK.
zxjatype: Standard conforming typesetting of Japanese, for XeLaTeX.

%package doc
Summary: TeX Live: Documentation files of %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}

%description doc
This package contains documentation files of %{name}.

%prep
%setup -c -n %{name}-%{version}
%__tar -xvf %{SOURCE1}
%__tar -xvf %{SOURCE2}
%__tar -xvf %{SOURCE3}
%__tar -xvf %{SOURCE4}
%__tar -xvf %{SOURCE5}
%__tar -xvf %{SOURCE6}
%__tar -xvf %{SOURCE7}
%__tar -xvf %{SOURCE8}
%__tar -xvf %{SOURCE9}
%__tar -xvf %{SOURCE10}
%__tar -xvf %{SOURCE11}
%__tar -xvf %{SOURCE12}
%__tar -xvf %{SOURCE13}
%__tar -xvf %{SOURCE14}
%__tar -xvf %{SOURCE15}
%__tar -xvf %{SOURCE16}
%__tar -xvf %{SOURCE17}
%__tar -xvf %{SOURCE18}
%__tar -xvf %{SOURCE19}
%__tar -xvf %{SOURCE20}
%__tar -xvf %{SOURCE21}
%__tar -xvf %{SOURCE22}
%__tar -xvf %{SOURCE23}
%__tar -xvf %{SOURCE24}
%__tar -xvf %{SOURCE25}
%__tar -xvf %{SOURCE26}
%__tar -xvf %{SOURCE27}
%__tar -xvf %{SOURCE28}
%__tar -xvf %{SOURCE29}
%__tar -xvf %{SOURCE30}
%__tar -xvf %{SOURCE31}
%__tar -xvf %{SOURCE32}
%__tar -xvf %{SOURCE33}
%__tar -xvf %{SOURCE34}
%__tar -xvf %{SOURCE35}
%__tar -xvf %{SOURCE36}
%__tar -xvf %{SOURCE37}
%__tar -xvf %{SOURCE38}
%__tar -xvf %{SOURCE39}
%__tar -xvf %{SOURCE40}
%__tar -xvf %{SOURCE41}
%__tar -xvf %{SOURCE42}
%__tar -xvf %{SOURCE43}
%__tar -xvf %{SOURCE44}
%__tar -xvf %{SOURCE45}
%__tar -xvf %{SOURCE46}
%__tar -xvf %{SOURCE47}
%__tar -xvf %{SOURCE48}
%__tar -xvf %{SOURCE49}
%__tar -xvf %{SOURCE50}
%__tar -xvf %{SOURCE51}
%__tar -xvf %{SOURCE52}
%__tar -xvf %{SOURCE53}
%__tar -xvf %{SOURCE54}
%__tar -xvf %{SOURCE55}

%build

%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}

%__mkdir_p %{buildroot}%{_datadir}

## move texmf-dist to /usr/share/texmf-dist
[ -d texmf-dist ] && %__mv texmf-dist %{buildroot}%{_tl_texmfdist}/ ||:

## move texmf to /usr/share/texmf
[ -d texmf ] && %__mv texmf %{buildroot}%{_tl_texmfmain}/ ||:

## move tlpkg to /usr/share/tlpkg
[ -d tlpkg ] && %__mv tlpkg %{buildroot}%{_datadir}/ ||:

## move all non-arch binaries to /usr/bin
[ -d bin ] && %__mv bin %{buildroot}%{_prefix}/ ||:

## move others into /usr/share/texmf-dist
%__mkdir_p %{buildroot}%{_tl_texmfdist}
%__cp -a * %{buildroot}%{_tl_texmfdist}/ ||:
%__rm -rf * ||:


## remove duplicated files between texlive and texlive-collection-*
## NOTE: We provides texmf.cnf and updmap{-hdr,}.cfg from texlive
## remove unpacked files
x=(
scripts/context/stubs/unix/mtxrun
scripts/ptex2pdf/ptex2pdf.lua
scripts/texlive/fmtutil.pl
scripts/texlive/texconfig-dialog.sh 
scripts/texlive/texconfig-sys.sh 
scripts/texlive/texconfig.sh 
scripts/texlive/texlinks.sh 
scripts/texlive/tlmgr.pl 
scripts/texlive/updmap.pl
texconfig/tcfmgr 
web2c/fmtutil.cnf
web2c/mktex.opt 
web2c/mktexdir 
web2c/mktexdir.opt 
web2c/mktexnam 
web2c/mktexnam.opt 
web2c/mktexupd 
web2c/texmf.cnf 
web2c/updmap-hdr.cfg 
web2c/updmap.cfg 
install-tl
)
if [ -d %{buildroot}%{_tl_texmfdist} ]; then
pushd %{buildroot}%{_tl_texmfdist}
%__rm -f ${x[@]} ||:
popd
fi

## Files list
find %{buildroot} -type f -or -type l | \
    %__sed -e "s|%{buildroot}||g" > filelist.full

find %{buildroot}%{_tl_texmfdist} -type d | \
    %__sed -e "s|^%{buildroot}|%dir |" \
           -e "s|$|/|"             >> filelist.full

## subpackages
grep "/texmf-dist/doc/" filelist.full > filelist.doc
cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
%__mv -f filelist.tmp filelist.full

%clean
%__rm -rf %{buildroot}

%post
%_tl_touch_run texhash
%_tl_touch_run mtxrun

[ -f %{_tl_texmfdist}/web2c/updmap.cfg ] || exit 0

    %_tl_enable_map KanjiMap otf-cktx.map
    %_tl_enable_map KanjiMap otf-@kanjiEmbed@.map
    %_tl_enable_map KanjiMap otf-up-@kanjiEmbed@.map
    %_tl_enable_map KanjiMap ptex-@kanjiEmbed@@kanjiVariant@.map
    %_tl_enable_map KanjiMap morisawa.map
    %_tl_enable_map KanjiMap uptex-@kanjiEmbed@@kanjiVariant@.map
    %_tl_enable_map Map dgj.map
    %_tl_enable_map Map dmj.map
    %_tl_enable_map Map mc2j.map
    %_tl_enable_map Map mcj.map
    %_tl_enable_map Map mr2j.map
    %_tl_enable_map Map mrj.map

%_tl_touch_run fmtutil

exit 0


%postun
if [ "$1" = 0 ]; then
    %_tl_touch_run texhash

    [ -f %{_tl_texmfdist}/web2c/updmap.cfg ] || exit 0

    %_tl_disable_map otf-cktx.map
    %_tl_disable_map otf-@kanjiEmbed@.map
    %_tl_disable_map otf-up-@kanjiEmbed@.map
    %_tl_disable_map ptex-@kanjiEmbed@@kanjiVariant@.map
    %_tl_disable_map morisawa.map
    %_tl_disable_map uptex-@kanjiEmbed@@kanjiVariant@.map
    %_tl_disable_map dgj.map
    %_tl_disable_map dmj.map
    %_tl_disable_map mc2j.map
    %_tl_disable_map mcj.map
    %_tl_disable_map mr2j.map
    %_tl_disable_map mrj.map

fi

exit 0

%posttrans
%{_tl_exec_texhash}
%{_tl_exec_mtxrun}
%{_tl_exec_updmap}
%{_tl_exec_fmtutil}
exit 0


%files -f filelist.full
%defattr(-,root,root,-)

%files -f filelist.doc doc
%defattr(-,root,root,-)

%changelog
* Sun May 24 2015 Munehiro Yamamoto <munepi@vinelinux.org> 2015-2
- TeX Live 2015/pretest
- synced tlnet to 20150522 (TeX Live 2015/pretest)

* Sun Apr 26 2015 Munehiro Yamamoto <munepi@vinelinux.org> 2015-1
- TeX Live 2015/pretest
- synced tlnet to 20150426 (TeX Live 2015/pretest)

* Wed Apr 01 2015 Munehiro Yamamoto <munepi@vinelinux.org> 2014-4
- synced tlnet to 20150401

* Tue Oct 28 2014 Munehiro Yamamoto <munepi@vinelinux.org> 2014-3
- synced tlnet to 20141028

* Sun Jul 06 2014 Munehiro Yamamoto <munepi@vinelinux.org> 2014-2
- synced tlnet to 20140706

* Sun May 25 2014 Munehiro Yamamoto <munepi@vinelinux.org> 2014-1
- upgraded to TeX Live 2014

* Sun Apr 06 2014 Munehiro Yamamoto <munepi@vinelinux.org> 2013-6
- synced tlnet to 20140406

* Wed Dec 18 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2013-5
- synced tlnet to 20131218

* Fri Nov 01 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2013-4
- synced tlnet to 20131101

* Wed Oct 02 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2013-3
- synced tlnet to 20131002

* Thu Sep 19 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2013-2
- synced tlnet to 20130919

* Fri Aug 23 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2013-1
- upgraded to TeX Live 2013
  - used tlnet archives
  - synced tlnet to 20130823
- added macros.texlive

* Fri Aug 10 2012 Munehiro Yamamoto <munepi@vinelinux.org> 2012-1
- updated to TeX Live 2012

* Sat Dec 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2011-2
- updated tlpdb2rpmspec.sh.in and dot.vtlpkg.conf.in: 
  - set external dependencies (texlive-collection-binextra, 
    texlive-collection-fontutils)

* Sun Oct 30 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2011-1
- updated to TeX Live 2011
- merged texlive-vtlpkg-2009-osx.patch from OSXWS
- added %doc README (%files)

* Wed Mar 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4
- applied texlive-vtlpkg-2009-vine.patch
  - remove arch dependent binaries
- updated tlpdb2rpmspec.sh.in: 
  - improved tlpdb4a()
  - make symlinks of core script utils (texlive-collection-binextra, 
    texlive-collection-context, texlive-collection-fontutils, 
    texlive-collection-langgreek, texlive-collection-langindic, 
    texlive-collection-latex, texlive-collection-latexextra, 
    texlive-collection-latexrecommended, texlive-collection-pictures, 
    texlive-collection-pstricks, texlive-collection-science)

* Wed Jan 12 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
- updated tlpdb2rpmspec.sh.in: 
  - improved %post

* Sun Sep 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
- updated tlpdb2rpmspec.sh.in: 
  - removed arch dependent binaries (texlive-collection-latexextra)
  - improved updmap process in %post and %postun
  - fixed perl path

* Fri Jul 30 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
- initial build
