File doxygen.spec of Package doxygen

# norootforbuild

%if %suse_version >= 900
%if %{?_without_wizard:1}0
%else
%define with_wizard 1
%endif
%endif

Name:				doxygen
Version:			1.5.9
Release:			0
Summary:			Automated C/C++/Java Documentation Generator
Source:			http://ftp.stack.nl/pub/users/dimitri/doxygen-%{version}.src.tar.gz
Source1:			doxywizard.desktop
Source2:			ftp://ftp.stack.nl/pub/users/dimitri/doxygen_manual-%{version}.pdf.zip
Patch1:			doxygen-arm.diff
Patch3:			doxygen-libpng.diff
Patch5:			doxygen-64archs.diff
Patch7:			doxygen-fix-isatty.patch
URL:				http://www.stack.nl/~dimitri/doxygen/
Group:			Development/Tools/Doc Generators
License:			GNU General Public License (GPL)
BuildRoot:		%{_tmppath}/build-%{name}-%{version}
%if %suse_version >= 1010
Suggests:		graphviz
%endif
BuildRequires:	flex bison make gcc-c++ libstdc++-devel
BuildRequires:	libpng-devel zlib-devel
BuildRequires:	sed python graphviz unzip ghostview
BuildRequires:	autoconf automake libtool update-desktop-files
%if %{?with_wizard:1}0
BuildRequires:	libqt4-devel
%endif
%if %suse_version >= 1030
BuildRequires:	texlive
BuildRequires:	graphviz-gd
%else
BuildRequires:	tetex
%endif
Obsoletes:		doxygen-docs

%description
Doxygen is a documentation system for C++, C, Java, Objective-C, IDL (Corba
and Microsoft flavors), Python and to some extent PHP, C# and D.
It can generate an online class browser (in HTML) and an offline reference
manual (in LaTeX) from a set of documented source files. The documentation is
extracted directly from the sources.

It is not required, but when you install the "graphviz" package, doxygen will
be able to generate various nice graphs.




Authors:
--------
    Dimitri van Heesch <dimitri@stack.nl>

%if %{?with_wizard:1}0
%package -n doxywizard
Summary:			GUI Wizard Frontend to edit Doxygen configuration files
Group:			Development/Tools/Doc Generators
Requires:		%{name} = %{version}-%{release}
Obsoletes:		doxygen-wizard
Provides:		doxygen-wizard

%description -n doxywizard
This additional package includes "doxywizard", which is a graphical frontend
to edit Doxygen configuration files. It requires QT3.




Authors:
--------
    Dimitri van Heesch <dimitri@stack.nl>
%endif #with_wizard

%package doc
Summary:			Documentation for doxygen
Group:			Development/Tools/Doc Generators

%description doc
This subpackage contains the user and reference guide for doxygen,
kept in here:
  %{_docdir}/%{name}/

%debug_package
%prep
%setup -q
%patch1
%patch3
%if "%{_lib}"=="lib64"
%patch5
%endif
%patch7
%{?suse_update_libdir:%{suse_update_libdir tmake/lib/linux-g++/tmake.conf}}
%__perl -pi -e "s#TMAKE_CFLAGS_RELEASE.*=.*#TMAKE_CFLAGS_RELEASE=%{optflags}#;" tmake/lib/linux-g++/tmake.conf

%__unzip -p "%{SOURCE2}" > doxygen_manual.pdf

%build
%__install -d RPMDOC
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
./configure \
	--prefix "%{_prefix}" \
	--shared \
	--release \
	--docdir RPMDOC \
	--install "%__install" \
	--make "%__make" \
	--perl "%__perl"

%__make %{?jobs:-j%{jobs}}
%__make docs

%if %{?with_wizard:1}0
pushd addon/doxywizard
%__make qmake \
		  QTDIR="%{_usr}" \
		  MAKE="%__make" \
		  HAVE_DOT=/usr/bin/dot
%if "%{_lib}"=="lib64"
%__sed -i 's,/lib ,/lib64 ,g' Makefile.doxywizard
%endif
%__sed -i 's,-lqt ,-lqt-mt ,g' Makefile.doxywizard
%__make %{?jobs:-j%{jobs}} \
		  QTDIR="%{_usr}" \
		  MAKE="%__make" \
		  HAVE_DOT=/usr/bin/dot
popd
%endif

%install
MAN1DIR=$(echo "%{_mandir}" | %__sed 's,^%{_prefix}/,,')/man1

%__make INSTALL="%{buildroot}%{_prefix}" \
		  MAN1DIR="${MAN1DIR}" \
		  MAKE="%__make" \
		  install

%if %{?with_wizard:1}0
pushd addon/doxywizard
%__make INSTALL="%{buildroot}%{_prefix}" \
		  MAN1DIR="${MAN1DIR}" \
		  MAKE="%__make" \
		  install
popd #addon/doxywizard
%__install -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/doxywizard.desktop"
%suse_update_desktop_file -r doxywizard Development Documentation
%endif

echo -n > doxygen.docfiles
for x in LANGUAGE.HOWTO LICENSE PLATFORMS README VERSION; do
	 %__install -D -m0644 "$x" "%{buildroot}%{_docdir}/%{name}/$x"
	 echo "%doc %{_docdir}/%{name}/$x" >> doxygen.docfiles
done
echo -n > doxygen-doc.docfiles
for x in examples html doxygen_manual.pdf; do
	 %__cp -a "$x" "%{buildroot}%{_docdir}/%{name}/$x"
	 echo "%doc %{_docdir}/%{name}/$x" >> doxygen-doc.docfiles
done

%clean
%__rm -rf "%{buildroot}"

%files -f doxygen.docfiles
%defattr(-,root,root)
%dir %doc %{_docdir}/%{name}
%{_bindir}/doxygen
%{_bindir}/doxytag
%doc %{_mandir}/man1/doxygen.1*
%doc %{_mandir}/man1/doxytag.1*

%if %{?with_wizard:1}0
%files -n doxywizard
%defattr(-,root,root)
%{_bindir}/doxywizard
%doc %{_mandir}/man1/doxywizard.1*
%{_datadir}/applications/doxywizard.desktop
%endif #with_wizard

%files doc -f doxygen-doc.docfiles
%defattr(-,root,root)
%dir %doc %{_docdir}/%{name}

%changelog
* Thu Apr 30 2009 Pascal Bleser <pascal.bleser@opensuse.org> 1.5.9
- update to 1.5.9:
  * this release primarily focuses on bugfixes
  * new feature: ability to include source code in the LaTeX/PDF output

* Sat Dec 27 2008 Pascal Bleser <guru@unixtech.be> 1.5.8
- update to 1.5.8:
  * updated wizard, which now uses Qt4 and provides more convenience in
    configuring and running doxygen
  * a new Qt Help generator, which no longer requires an external tool to
    postprocess the output
  * an option had been added that allows configuring the parser that doxygen
    will use for a given file extension
  * a large number of bugs have been fixed

* Sun Oct  5 2008 Pascal Bleser <guru@unixtech.be> 1.5.7.1
- update to 1.5.7.1:
  * fixes the problem where doxygen stops with an error when GENERATE_HTML was
    set to NO
  * includes a couple of other fixes
  * it is now possible to set the size of the font for dot generated graphs

* Sun Sep 28 2008 Pascal Bleser <guru@unixtech.be> 1.5.7
- update to 1.5.7:
  * adds support for generating Qt help files (qch)
  * the layout of the output can be tuned via a template layout file
  * new commands were added to support object-oriented C programs
  * a large number of bugs have been fixed

* Sun May 18 2008 Pascal Bleser <guru@unixtech.be> 1.5.6
- new upstream version

* Sun Oct 28 2007 Pascal Bleser <guru@unixtech.be> 1.5.4
- moved to openSUSE Build Service
- html/examples/pdf splitted out into -doc subpackage
- added -fno-strict-aliasing
- new upstream version

* Fri Jul 27 2007 Pascal Bleser <guru@unixtech.be> 1.5.3-1
- new upstream version

* Thu Apr  5 2007 Pascal Bleser <guru@unixtech.be> 1.5.2-1
- don't build PDF using Latex, just pull it from the website

* Sun Oct 29 2006 Pascal Bleser <guru@unixtech.be> 1.5.1-1
- new upstream version

* Tue Oct 17 2006 Pascal Bleser <guru@unixtech.be> 1.5.0-1
- added setting CFLAGS and CXXFLAGS
- new upstream version

* Sun Jun 11 2006 Pascal Bleser <guru@unixtech.be> 1.4.7-1
- added binary stripping on SUSE < 9.3
- added Suggests for graphviz (on >= 10.1)
- removed Packager and Distribution, injected by rpmmacros
- moved non-patch stuff to build section
- added -j to make
- new upstream version

* Fri Dec 30 2005 Pascal Bleser <guru@unixtech.be> 1.4.6-1
- added doxywizard x86_64 patch
- new upstream version
- rewrote spec file

* Wed Oct  5 2005 Pascal Bleser <guru@unixtech.be> 1.4.5-1
- ported SUSE Linux 10.0 doxygen RPM patches
- added desktop file
- added debuginfo support
- new upstream version

* Wed Aug  3 2005 Pascal Bleser <guru@unixtech.be> 1.4.4-1
- version 1.4.4

* Mon May 16 2005 Pascal Bleser <guru@unixtech.be> 1.4.3-1
- version 1.4.3

* Sun Apr  3 2005 Pascal Bleser <guru@unixtech.be> 1.4.2-2
- renamed doxygen-wizard to doxywizard to comply with SUSE's packages

* Tue Mar 29 2005 Pascal Bleser <guru@unixtech.be> 1.4.2-1
- added manpages
- version 1.4.2

* Mon Jan 31 2005 Pascal Bleser <guru@unixtech.be> 1.4.1-2
- made doxywizard optional

* Wed Jan 12 2005 Pascal Bleser <guru@unixtech.be> 1.4.1-1
- version 1.4.1

* Sat Jan  1 2005 Pascal Bleser <guru@unixtech.be> 1.4.0-1
- rewrote spec-file

# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End:
openSUSE Build Service is sponsored by