# Set this to "1" if you want to build doxywizard
%define wizard 1

Summary: A documentation system for C/C++.
Summary(ja): C/C++ 向けドキュメンテーションシステム
Name: doxygen
Version: 1.7.5.1
Release: 1%{?_dist_release}
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Patch0: doxygen-1.7.1-config.patch
Patch1: doxygen-1.7.5-timestamp.patch
Group: Development/Tools
License: GPLv2
URL: http://www.stack.nl/~dimitri/doxygen/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: perl texlive texlive-collection-fontutils ghostscript gettext
BuildRequires: flex bison
%if %{wizard}
BuildRequires: qt4-devel => 4.4
%endif
#Requires: libgcc libstdc++34 graphviz

%description
Doxygen can generate an online class browser (in HTML) and/or a
reference manual (in LaTeX) from a set of documented source files. The
documentation is extracted directly from the sources. Doxygen can
also be configured to extract the code structure from undocumented
source files.

%package doxywizard
Summary: A GUI for creating and editing configuration files.
Group: Applications/Development
Requires: %{name} = %{version}-%{release}

%description doxywizard
Doxywizard is a GUI for creating and editing configuration files that
are used by doxygen.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .config
%patch1 -p1 -b .timestamp

%build
unset QTDIR
export OLD_PO_FILE_INPUT=yes

./configure \
    --prefix %{_prefix} \
    --shared \
%if %{wizard}
     --with-doxywizard \
%endif
     --release

make %{?_smp_mflags} all
make docs

%install
rm -rf $RPM_BUILD_ROOT

export OLD_PO_FILE_INPUT=yes
make install DESTDIR=$RPM_BUILD_ROOT

%if !%{wizard}
rm $RPM_BUILD_ROOT%{_mandir}/man1/doxywizard.*
%endif

# convert into utf-8
iconv --from=ISO-8859-1 --to=UTF-8 LANGUAGE.HOWTO > LANGUAGE.HOWTO.new
touch -r LANGUAGE.HOWTO LANGUAGE.HOWTO.new
mv LANGUAGE.HOWTO.new LANGUAGE.HOWTO

sed -i -e "s|#!perl|#!/usr/bin/perl|" examples/tag/html/installdox

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc LANGUAGE.HOWTO LICENSE README examples html
%{_bindir}/doxygen
%{_bindir}/doxytag
%{_mandir}/man1/doxygen.*
%{_mandir}/man1/doxytag.*

%if %{wizard}
%files doxywizard
%defattr(-,root,root)
%{_bindir}/doxywizard
%{_mandir}/man1/doxywizard.*
%endif

%changelog
* Wed Nov 02 2011 NAKAMURA Kenta <kenta@vinelinux.org> - 1.7.5.1-1
- new upstream release
- updated Patch0 and 1

* Mon Oct 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.6.1-1
- new upstream release
- added Patch0, 1 from Fedora
  * Mon Aug 24 2009 Than Ngo <than@redhat.com> - 1.6.0-2
  - fix #516339, allow to enable/disable timstamp to avoid the multilib issue
    HTMP_TIMESTAMP is disable by default
- enabled doxywizard

* Tue Dec  9 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.5.7.1-1
- new upstream release
- disable doxywizard

* Thu May 29 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.5.6-1
- new upstream release

* Thu Feb 21 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.5.5-0vl1
- new upstream release

* Mon May 14 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.5.2-0vl1
- new upstream release

* Thu May 10 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.7-0vl3
- rebuild with libstdc++34

* Sun Oct 15 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.4.7-0vl2
- add BuildRequires: flex

* Fri Sep 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.7-0vl1
- new upstream release
- changed doxygen-doxywizard Group to Applications/Development

* Sat Aug 05 2006 NAKAMURA Kenta <kenta@vinelinux.org> 1.4.5-0vl2
- added doxygen-1.4.5-libdir.patch for x86_64 and ppc64 archtecture

* Tue Nov 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.4.5-0vl1
- new upstream release

* Fri Jul 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.4.4-0vl1
- new upstream release
- update Requires

* Wed Jun  1 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.4.3-0vl2
- build for VineSeed

* Wed Jun  1 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.4.3-0vl1
- new upstream release
- build for Vine3.1
- LANG=C when build and install
- add man pages

* Mon Jan 24 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.4.1-0vl1
- new upstream release
- BuildPrereq: qt-devel => 3.2

* Tue Dec  7 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3.9.1-0vl1
- source upgrade

* Sun May 16 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3.7-0vl1
- source upgrade
- remove %%{_bindir}/doxysearch from %%files
- remove about Vine2.6

* Tue Dec 16 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3.3-0vl2
- build for VineSeed

* Tue Dec 16 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3.3-0vl1
- source upgrade
- add BuildPrereq: graphviz and Requires: graphviz
- change spec to build both VineSeed and Vine2.5/2.6

* Sat May 31 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3.1-0vl1
- source upgrade

* Sat May 17 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3-0vl1
- source upgrade

* Wed Jan  8 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3-0vl0.3
- source upgrade to 1.3-rc3
- enable %%configure --with-doxywizard

* Wed Jan  8 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3-0vl0.1
- source upgrade to 1.3-rc2
- add BuildPrereq: libpng-devel
- add Requires: XFree86-gl libexpat to %%package doxywizard
- add LICENSE to %%docs
- disable %%configure --with-doxywizard

* Fri Jan  3 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.18-0vl1
- source upgrade
- build with new toolchains
- delete Patch2

* Tue Aug  5 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.17-0vl1
- source upgrade
- build with qt-3.0.5

* Sun Jun  9 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 1.2.16-0vl1
- source update to 1.2.16

* Thu May 09 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 1.2.15-0vl1
- source update to 1.2.15

* Sat Mar 23 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 1.2.14-3vl1
- build for VineSeed
- delete Epoch

* Fri Mar  8 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.13-3
- rebuild against qt 3.0.2

* Tue Feb 26 2002 Than Ngo <than@redhat.com> 1.2.14-2
- rebuild against qt 2.3.2

* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.14-1
- 1.2.14

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Sun Jan 06 2002 Than Ngo <than@redhat.com> 1.2.13.1-1
- update to 1.2.13.1
- fixed build doxywizard with qt3

* Sun Dec 30 2001 Jeff Johnson <jbj@redhat.com> 1.2.13-1
- update to 1.2.13

* Sun Nov 18 2001 Than Ngo <than@redhat.com> 1.2.12-1
- update to 1.2.12
- s/Copyright/License

* Wed Sep 12 2001 Tim Powers <timp@redhat.com>
- rebuild with new gcc and binutils

* Wed Jun 13 2001 Than Ngo <than@redhat.com>
- update tp 1.2.8.1
- make doxywizard as separat package
- fix to use install as default

* Tue Jun 05 2001 Than Ngo <than@redhat.com>
- update to 1.2.8

* Tue May 01 2001 Than Ngo <than@redhat.com>
- update to 1.2.7
- clean up specfile
- patch to use RPM_OPT_FLAG

* Wed Mar 14 2001 Jeff Johnson <jbj@redhat.com>
- update to 1.2.6

* Wed Feb 28 2001 Trond Eivind Glomsrød <teg@redhat.com>
- rebuild

* Tue Dec 26 2000 Than Ngo <than@redhat.com>
- update to 1.2.4
- remove excludearch ia64
- bzip2 sources

* Mon Dec 11 2000 Than Ngo <than@redhat.com>
- rebuild with the fixed fileutils

* Mon Oct 30 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.3.

* Sun Oct  8 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.2.
- enable doxywizard.

* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
- 1.2.1 is latest stable, so we upgrade before Winston is released.

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Tue Jul  4 2000 Jakub Jelinek <jakub@redhat.com>
- Rebuild with new C++

* Fri Jun 30 2000 Florian La Roche <laroche@redhat.de>
- fix QTDIR detection

* Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
- compile on x86 w/o optimization, revert when compiler fixed!!

* Wed Jun 07 2000 Preston Brown <pbrown@redhat.com>
- use newer RPM macros

* Tue Jun  6 2000 Jeff Johnson <jbj@redhat.com>
- add to distro.

* Tue May  9 2000 Tim Powers <timp@redhat.com>
- rebuilt for 7.0

* Wed Feb  2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- recompile with current Qt (2.1.0/1.45)

* Wed Jan  5 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.0.0.
- recompile with qt-2.0.1 if available.
- relocatable package.

* Mon Nov  8 1999 Tim Powers <timp@redhat.com>
-updated to 0.49-991106

* Tue Jul 13 1999 Tim Powers <timp@redhat.com>
- updated source
- cleaned up some stuff in the spec file

* Thu Apr 22 1999 Jeff Johnson <jbj@redhat.com>
- Create Power Tools 6.0 package.