%define _docdir %{_defaultdocdir}

Summary: HOWTO, FAQ, and other documents in Japanese
Summary(ja): 日本語のHOWTO, FAQ, その他の文書です
Name: JF
Version: 20110119
Release: 1%{?_dist_release}
License: distributable
Group: Applications/Documentation
URL: http://www.linux.or.jp/JF/
Source0: http://www.linux.or.jp/JF/JFdocs/JFtxt.tar.bz2

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

Vendor: Project Vine
Distribution: Vine Linux

%description
Japanese HOWTOs (instructions for how to do things on Linux), FAQs,
etc. collected from the property of JF (Japanese FAQ) Project.
There are Japanese translations from English HOWTOs, FAQs, etc. and
documents that are originally written in Japanese. 

%description -l ja
HOWTO (Linux でいろいろなことを実現する方法を書いた文書)や FAQ
(Frequently Asked Questions:よくある質問と回答)の日本語版など JF
(Japanese FAQ Project) の資産から、Linuxの基本操作に必要な文書を集めま
した。英語版 HOWTO, mini-HOWTO, FAQ の和訳、日本固有のドキュメントなど
が含まれています。

%prep
%setup -n JFdocs -q
# remove documents prohibited to distiribute non-commercially...
# http://www.linux.or.jp/JF/copyright.html
rm -f Astronomy-HOWTO*
rm -f Chinese-HOWTO*
rm -f DHCP*
rm -f Debian-Jigdo*
rm -f Ftape-HOWTO*
rm -f GIS-GRASS*
rm -f Offline-Mailing*
rm -f Quota*
rm -f Scanner-HOWTO-mtekscan*
rm -f Securing-X-Windows*
rm -f StarOffice*
rm -f Swap-Space*

# remove unneeded documents 
rm -f Parted-README.txt
rm -f BTTV-Mini-HOWTO-0.3.txt

%build
toUTF8(){
for i in `find .` ; do
    if [ -f $i ]; then
        nkf -w8 -Lu $i >${i%.*}.new
        mv ${i%.*}.new $i
    fi
done
}

toUTF8

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_docdir}/JF

tar cf - . | (cd %{buildroot}%{_docdir}/JF && tar xfBp -)

(cd %{buildroot}%{_docdir}/JF; gzip -r --best *)

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_docdir}/JF/

%changelog
* Sat Apr  9 2011 IWAI, Masaharu <iwai@alib.jp> 20110119-1
- source as of 20110119
- update description

* Fri Mar 26 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20100222-1
- source as of 20100222
- convert to UTF8 instead of EUC-JP
- s/BuildPreReq/BuildRequires/

* Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 20090320-1
- source as of 20090320
- spec in utf-8

* Mon Apr 28 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 20080415-1
- source as of 20080415

* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20070728-0vl1
- source as of 20070728

* Fri Sep 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20060910-0vl1
- source as of 20060910

* Sat May 20 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20060412-0vl1
- source as of 20060520

* Wed Sep 14 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20050910-0vl1
- source as of 20050910

* Thu Dec 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20041213-0vl1
- source as of 20041213

* Sat Sep 25 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20040924-0vl1
- source as of 20040924
- remove Swap-Space

* Sat Mar 20 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20040316-0vl1
- source as of 20040316
- remove Swap-Space

* Wed Sep 17 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20030914-0vl1
- source as of 20030914
- remove Debian-Jigdo

* Fri Jun  6 2003 Jun Nishii <jun@vinelinux.org> 20030415-0vl1
- fix toEUC

* Wed Apr 16 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20030415-0vl1
- source as of 20030415
- remove Securing-X-Windows

* Tue Feb 18 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20030216-0vl1
- source as of 20030216

* Sun Sep 22 2002 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20020905-0vl1
- source as of 20020905
- remove Astronomy-HOWTO

* Sun Jun 2 2002 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20020415-0vl1
- source as of 20020415

* Tue Jan 15 2002 Toru Sagami <sagami@vinelinux.org> 20020115-0vl1
- source as of 20020115

* Sat Nov 17 2001 Toru Sagami <sagami@vinelinux.org>
- 20011115-0vl1

* Fri Aug 17 2001 <sagami@vinelinux.org>
- 20010815-0vl1: introduced %%{_docdir} definition

* Sun Jul 15 2001 <sagami@vinelinux.org>
- 20010715-0vl1: eliminate CR at the EOL

* Sun May 27 2001 Yasuhide OMORI <dasen@icntv.ne.jp>
- 20010527-0vl1
- modified the list of non-free documents
- comply with RFC2606 (LAN-mini-HOWTO)

* Wed Apr 18 2001 sagami@vinelinux.org
- 20010415-0vl1

* Mon Dec 25 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- 20001225-0vl1
- added Ethernet-HOWTO, which no longer prevents from commercial distributing

* Mon Sep  4 2000 Jun Nishii <jun@vinelinux.org>
- 20000831-0vl1

* Wed May 10 2000 Toru Sagami <czs14350@nifty.ne.jp>
- 20000509-0vl1
- fixed summary, Buildroot, Distribution
- fixed description by Yoshihiro Ota

* Thu Jan 27 2000 Yasuhide OOMORI <baoying@flatout.org>
- [JF-20000125-1]
- updated to 20000125.

* Thu Jul 29 1999 Jun Nishii <jun@flatout.org>
- updated to 199907

* Mon Feb 15 1999 Jun Nishii <jun@flatout.org>
- updated to 199902
- use JFeuc.tar.bz2

* Tue Feb 2 1999 Jun Nishii <jun@flatout.org>
- updated to 199901
- Now we use version number yyyymm instead of yymmdd
  to avoid 2000 y problem B)
