Name:           gtk-doc
Summary:        API documentation generation tool for GTK+ and GNOME
Summary(ja):    GTK+/GNOME 用 API ドキュメント生成ツール
Version:        1.32
Release:        3%{_dist_release}
License:        LGPL
Group:          Development/Tools

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       daisuke

URL:            https://www.gtk.org/gtk-doc/
Source:         https://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}.tar.xz
Source1:        filter-requires-gtk-doc.sh
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildArch:      noarch

BuildRequires:	yelp-tools
BuildRequires:	docbook-utils
BuildRequires:	docbook-style-xsl
BuildRequires:	openjade
BuildRequires:	libxslt
BuildRequires:	vim
BuildRequires:	python3
BuildRequires:	python3-pygments

Requires:	docbook-utils
Requires:	docbook-style-xsl
Requires:	openjade
Requires:	libxslt
Requires:	vim
Requires:	diffutils
Requires:	python3-pygments

#define __find_requires %{SOURCE1}
%define __perl_requires %{SOURCE1}

%description
gtk-doc is a tool for generating API reference documentation.
It is used for generating the documentation for GTK+, GLib
and GNOME.

%prep
%setup -q
# Move this doc file to avoid name collisions
mv doc/README doc/README.docs

%build
%configure \
	--docdir=%{_datadir}/gnome/help/gtk-doc-manual \
	--with-highlight=vim
make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

sed -i -e "s|^pkg_config = .*$|pkg_config = '/usr/bin/pkg-config'|" %{buildroot}/%{_datadir}/gtk-doc/python/gtkdoc/config.py

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT


%files
%defattr(-, root, root)
%license COPYING
%doc AUTHORS ChangeLog INSTALL NEWS README doc/* examples
%{_bindir}/*
%{_datadir}/aclocal/gtk-doc.m4
%{_datadir}/gtk-doc
%dir %{_datadir}/help
%dir %{_datadir}/help/*
%{_datadir}/help/*/gtk-doc-manual
%{_datadir}/pkgconfig/*.pc
%dir %{_datadir}/cmake
%{_datadir}/cmake/GtkDoc

%changelog
* Sat Feb 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.32-3
- added R:python3-pygments.

* Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.32-2
- fixed path of pkg-config for i686.

* Sun Oct 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.32-1
- new upstream release.

* Thu Oct 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.24-1
- new upstream release

* Thu May 14 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.22-1
- new upstream release

* Wed Aug 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.21-1
- new upstream release
- remove Patch0 (gtk-doc-1.20-perl-5.12.x.patch)

* Sat Mar 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.20-1
- new upstream release
- add Patch0 (gtk-doc-1.20-perl-5.12.x.patch)

* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.19-2
- rebuild with VineSeed environment

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.19-1
- new upstream release
- remove Patch0 (gtk-doc-1.18-git20120924.patch)

* Fri Sep 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.18-2
- add Patch0 (gtk-doc-1.18-git20120924.patch)
- add BuildRequires: yelp-tools

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.18-1
- new upstream release

* Mon Jun 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.17-3
- R/BR: vim instead of vim-tiny

* Sun May 08 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.17-2
- use vim for highlighting instead of source-highlight
- drop BR:/R: source-highlight
- add BR:R: vim-tiny

* Sun Apr 10 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.17-1
- new upstream release

* Wed Jan 26 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.16-1
- new upstream release

* Sun Oct 24 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.15-3
- add BuildRequires: and Requires: source-highlight

* Mon Oct 11 2010 Shu KONNO <owa@bg.wakwak.com> 1.15-2
- rebuilt with rpm-4.8.1 for pkg-config
- s/__find_requires/__perl_requires/

* Sat May 22 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.15-1
- new upstream release

* Wed Mar 31 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14-1
- new upstream release

* Thu Mar 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.13-1
- new upstream release

* Sun Mar 22 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.11-1
- new upstream release

* Thu Mar 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.10-1vl5
- new upstream release
- added --docdir 

* Thu Sep 20 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8-0vl1
- new upstream release
- added SOURCE1 for removing dependancy
- added %post and %postun section
- added Requires(post,postun): scrollkeeper

* Sun Sep 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0vl1
- new upstream release

* Tue Apr 27 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2-1vl1
- new upstream release
- added some files %file section (based on Fedora 1.2-1)
- s/Copyright/License/

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1-0vl1
- new upstream release

* Tue Jan 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0-0vl1
- new upstream release

* Sat Sep 28 2002 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9-5vl1
- Based on Redhat, changed summary and description
  * Thu May 30 2002 Chip Turner <cturner@redhat.com>
  - add dependency filter for bogus perl dependencies

  * Thu Apr  4 2002 Jeremy Katz <katzj@redhat.com>
  - update to 0.9

* Fri Oct 12 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.5.9-1vl1
- Based on RH srpms.
  * Thu May 17 2001 Havoc Pennington <hp@redhat.com>
  - upgrade to a CVS snapshot
  - remove patches applied upstream

  * Tue Jan 16 2001 Tim Waugh <twaugh@redhat.com>
  - Replace docbook, sgml-common, and stylesheets requirements with
    docbook-utils requirement.
  - Use public identifier in custom stylesheets.

* Fri Apr 13 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.4-0vl2
- Added a build depends.

* Tue Jan  2 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.4-0vl1
- Build for Vine

* Wed Nov 15 2000 John Gotts <jgotts@linuxsavvy.com>
- Minor updates for 0.4.
* Thu Aug 26 1999 John E. Gotts <jgotts@engin.umich.edu>
- Created spec file.

