%define name trac
%define version 0.12.4
%define release 1%{?_dist_release}
%define japanize ja1

Summary: A web-based software project management and bug/issue tracking system
Summary(ja): Web ベースのソフトウェアプロジェクト管理およびバグ追跡システム
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://www.i-act.co.jp/project/products/downloads/Trac-%{version}.%{japanize}.zip
Patch0: trac-0.12.2.ja1-default_charset.patch
License: modified BSD-style License
Group: Applications/Development
URL: http://trac.edgewall.org/

BuildArch: noarch
Requires: python, python-genshi >= 0.6, python-setuptools >= 0.6b1
Requires: python >= 2.6
BuildRequires: python-devel, python-genshi >= 0.6, python-setuptools >= 0.6b1
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: iwaim

%description
Trac is an enhanced wiki and issue tracking system for software
development projects. Trac uses a minimalistic approach to
web-based software project management. Our mission is to help
developers write great software while staying out of the way.
Trac should impose as little as possible on a team's established
development process and policies.

%description -l ja
Trac はソフトウェア開発プロジェクトのマネージメントにおける
最小限のアプローチを提供する Web アプリケーションです。
ソフトウェア開発の上でのチケット解決、機能追加、および
すべての工程において、効果的なトラッキングとハンドリングを
簡素化することを目標としています。
Trac の全てのアスペクトは、一つの目標のもとに設計されています。
古びた方法でプロジェクトを運営している、ソフトウェア開発者の
助けとなること。そのために、チームが既に確立している
開発プロセスと開発ポリシーに影響をなるべく与えないこと。 

%prep
%setup -q -n Trac-%{version}.%{japanize}
%patch0 -p1

%build
%{__python} setup.py build

%install
rm -rf ${RPM_BUILD_ROOT}
%{__python} setup.py install --root=${RPM_BUILD_ROOT}
%{__mkdir } ${RPM_BUILD_ROOT}%{python_sitelib}/tracext

## deleting files
%{__rm} -f contrib/trac-svn-post-commit-hook.cmd
%{__rm} -rf contrib/rpm

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING* ChangeLog* README* RELEASE* TESTING-README* THANKS* UPGRADE*
%doc doc sample-plugins wiki-macros contrib
%{_bindir}/*
%{python_sitelib}/Trac-*.egg-info
%{python_sitelib}/trac
%{python_sitelib}/tracopt
%dir %{python_sitelib}/tracext

%changelog
* Tue Jan  1 2013 IWAI, Masaharu <iwai@alib.jp> 0.12.4-1
- new upstream release
- add Packager
- drop vl5's code

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12.2-2
- rebuild with python-2.7.2

* Sun Apr 10 2011 IWAI, Masaharu <iwai@alib.jp> 0.12.2-1
- new upstream release
- update default_charset patch (Patch0)
- drop unnecessary fix_sourceforge2trac.py patch (Patch1)
- update {Build,}Requires: python-genshi version
- add files %%{python_sitelib}/tracopt

* Mon Dec  6 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.7-1
- new upstream release
- add BuildRequires: unzip

* Mon Mar 22 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.6-2
- update Requires
  - update R: python >= 2.6 for VineSeed (vl6)
  - add R: python, pysqlite for other version (cf. vl5)
- add %%{python_sitelib}/tracext dir in %%files
- fix 0.11.6-1 changelog: s/BR:/Requires:/

* Wed Mar 17 2010 Shu KONNO <owa@bg.wakwak.com> 0.11.6-1
- updated Trac to 0.11.6.ja1
- rebuilt with python-2.6
- dropt Requires: pysqlite (included in python-2.6)

* Sat Apr 25 2009 IWAI, Masaharu <iwai@alib.jp> 0.11.4-1
- new upstream release
- update default charset patch (Patch0)
  - add patching default wiki page

* Mon Apr  6 2009 IWAI, Masaharu <iwai@alib.jp> 0.11.3-2
- add Requires: pysqlite
- fix 0.11.3-1 changelog
  - update Requires and BuildRequires

* Sun Apr  5 2009 IWAI, Masaharu <iwai@alib.jp> 0.11.3-1
- new upstream release
- update License value
- update default_charset patch (Patch0)
- update %%files section
- add fix sourceforge2trac.py.patch (Patch1)
- update Requires
  - drop clearsilver, silvercity, pysqlite, python-pyxml, subversion-python
  - add python-genshi >= 0.5, python-setuptools >= 0.6b1
- update BuildRequires
  - add python-genshi >= 0.5, python-setuptools >= 0.6b1

* Mon Oct 20 2008 Shu KONNO <owa@bg.wakwak.com> 0.10.5-2
- added %%python_sitelib macro to be independent of platforms
- added BuildArch: noarch

* Mon Oct 20 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.10.5-1
- upgraded to 0.10.5, the newest 0.10.x line, including security and bug fixes
- spec in UTF-8
- modified Patch0 to set utf-8 as default encoding

* Wed Aug 22 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.10.4-0vl1
- initial build for Vine Linux
- add Patch0 to change default_charset to euc-jp