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