25cfdd
%global codate 20130122
25cfdd
25cfdd
Name:           gl-manpages
25cfdd
Version:        1.1
df56de
Release:        7.%{codate}%{?dist}
25cfdd
Summary:        OpenGL manpages
25cfdd
25cfdd
License:        MIT and Open Publication
25cfdd
URL:            http://www.opengl.org/wiki/Getting_started/XML_Toolchain_and_Man_Pages
25cfdd
# see Source1
25cfdd
Source0:        gl-manpages-%{version}-%{codate}.tar.xz
25cfdd
Source1:        make-gl-man-snapshot.sh
25cfdd
# FIXME: Bundle mathml and the Oasis dbmathl until they are packaged
25cfdd
Source2:        http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd
25cfdd
Source3:        http://www.w3.org/Math/DTD/mathml2.tgz
25cfdd
# FIXME  These are the old gl-manpages source which 
25cfdd
# still have some manpages that khronos doesn't. 
25cfdd
# Ship until somebody in the know helps figuring whats what.
25cfdd
# When matching install the kronos version.
25cfdd
Source4:        gl-manpages-1.0.1.tar.bz2
25cfdd
#Silence author/version/manual etc. warnings
25cfdd
Source5:        metainfo.xsl
25cfdd
25cfdd
BuildArch:      noarch
25cfdd
25cfdd
BuildRequires:  libxslt docbook-style-xsl
25cfdd
25cfdd
%description
25cfdd
OpenGL manpages
25cfdd
25cfdd
%prep
25cfdd
%setup -q -n %{name}-%{version}-%{codate}
25cfdd
tar xzf %{SOURCE3}
25cfdd
cp -av %{SOURCE2} mathml2/
25cfdd
tar xjf %{SOURCE4}
25cfdd
25cfdd
25cfdd
%build
25cfdd
# FIXME Figure out how to build the GLSL manpages
25cfdd
export BD=`pwd`
25cfdd
xmlcatalog --create --noout \
25cfdd
	--add public "-//W3C//DTD MathML 2.0//EN" "file://$BD/mathml2/mathml2.dtd" \
25cfdd
	--add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file://$BD/mathml2/mathml2.dtd" \
25cfdd
	--add public "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" "file://$BD/mathml2/dbmathml.dtd" \
25cfdd
	--add system "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "file://$BD/mathml2/dbmathml.dtd" \
25cfdd
	mathml2.cat
25cfdd
export XML_CATALOG_FILES="$BD/mathml2.cat /etc/xml/catalog"
25cfdd
for MAN in man4 man3 man2 ; do
25cfdd
	pushd $MAN
25cfdd
	for MANP in gl*.xml ; do
25cfdd
		xsltproc --nonet %{SOURCE5} $MANP | xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl -
25cfdd
	done
25cfdd
	popd
25cfdd
done
25cfdd
25cfdd
25cfdd
%install
25cfdd
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/
25cfdd
cp -n {man4,man3,man2}/*.3G $RPM_BUILD_ROOT%{_mandir}/man3/
25cfdd
# install the old manpages source with 3gl -> 3G
25cfdd
# when matchin don't clobber the khronos version
25cfdd
for MANP in `find gl-manpages-1.0.1 -name *.3gl` ; do
25cfdd
	FN=${MANP//*\//}
25cfdd
	cp -a -n $MANP $RPM_BUILD_ROOT%{_mandir}/man3/${FN/.3gl/.3G}
25cfdd
done
25cfdd
find $RPM_BUILD_ROOT%{_mandir}/man3/ -type f -size -100b | xargs sed -i -e 's/\.3gl/\.3G/' -e 's,^\.so man3G/,.so man3/,'
25cfdd
25cfdd
25cfdd
%files
25cfdd
%{_mandir}/man3/*
25cfdd
25cfdd
25cfdd
%changelog
df56de
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1-7.20130122
df56de
- Mass rebuild 2013-12-27
df56de
25cfdd
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6.20130122
25cfdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
25cfdd
25cfdd
* Tue Jan 22 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-5.%{codate}
25cfdd
- Newer upstream snapshot. Minor upstream rearrangement.
25cfdd
- Remove checkout script from sources and add to git.
25cfdd
- Try to actually use the bundled mathml2. Fix warnings.
25cfdd
25cfdd
* Wed Jan 16 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-4.%{codate}
25cfdd
- Fix symlinked man references some more (#895986) 
25cfdd
25cfdd
* Mon Oct 15 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-3.%{codate}
25cfdd
- Fix symlinked man variants. 
25cfdd
- Preserve timestamps on the older gl-manpages.
25cfdd
25cfdd
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-2.%{codate}
25cfdd
- Re-add the older gl-manpages for those not present in khronos
25cfdd
25cfdd
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-1.%{codate}
25cfdd
- Try building from source
25cfdd
25cfdd
* Wed Sep  5 2012 Yanko Kaneti <yaneti@declera.com> - 1.0.1-1
25cfdd
- Initial split from mesa