c7f3713
%global codate 20161227
919fd7e
59e90c6
Name:           gl-manpages
919fd7e
Version:        1.1
3f0cf8d
Release:        16.%{codate}%{?dist}
59e90c6
Summary:        OpenGL manpages
59e90c6
919fd7e
License:        MIT and Open Publication
59e90c6
URL:            http://www.opengl.org/wiki/Getting_started/XML_Toolchain_and_Man_Pages
919fd7e
# see Source1
919fd7e
Source0:        gl-manpages-%{version}-%{codate}.tar.xz
919fd7e
Source1:        make-gl-man-snapshot.sh
919fd7e
# FIXME: Bundle mathml and the Oasis dbmathl until they are packaged
919fd7e
Source2:        http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd
919fd7e
Source3:        http://www.w3.org/Math/DTD/mathml2.tgz
bf0de0a
# FIXME  These are the old gl-manpages source which 
bf0de0a
# still have some manpages that khronos doesn't. 
bf0de0a
# Ship until somebody in the know helps figuring whats what.
bf0de0a
# When matching install the kronos version.
bf0de0a
Source4:        gl-manpages-1.0.1.tar.bz2
689fb53
#Silence author/version/manual etc. warnings
689fb53
Source5:        metainfo.xsl
59e90c6
59e90c6
BuildArch:      noarch
59e90c6
07a703a
BuildRequires:  libxslt docbook-style-xsl docbook5-style-xsl
59e90c6
59e90c6
%description
59e90c6
OpenGL manpages
59e90c6
59e90c6
%prep
919fd7e
%setup -q -n %{name}-%{version}-%{codate}
919fd7e
tar xzf %{SOURCE3}
919fd7e
cp -av %{SOURCE2} mathml2/
bf0de0a
tar xjf %{SOURCE4}
59e90c6
59e90c6
59e90c6
%build
d395dfc
# FIXME Figure out what to do about the GLSL builtin functions
689fb53
export BD=`pwd`
689fb53
xmlcatalog --create --noout \
689fb53
	--add public "-//W3C//DTD MathML 2.0//EN" "file://$BD/mathml2/mathml2.dtd" \
689fb53
	--add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file://$BD/mathml2/mathml2.dtd" \
689fb53
	--add public "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" "file://$BD/mathml2/dbmathml.dtd" \
689fb53
	--add system "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "file://$BD/mathml2/dbmathml.dtd" \
689fb53
	mathml2.cat
689fb53
export XML_CATALOG_FILES="$BD/mathml2.cat /etc/xml/catalog"
07a703a
for MAN in man3 man2 ; do
919fd7e
	pushd $MAN
689fb53
	for MANP in gl*.xml ; do
689fb53
		xsltproc --nonet %{SOURCE5} $MANP | xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl -
689fb53
	done
919fd7e
	popd
919fd7e
done
07a703a
pushd man4
07a703a
for MANP in gl*.xml ; do
07a703a
	xsltproc --xinclude --nonet %{SOURCE5} $MANP | xsltproc --xinclude --nonet /usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl -
07a703a
done
07a703a
popd
919fd7e
59e90c6
59e90c6
%install
919fd7e
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/
9a5c312
cp -n {man4,man3,man2}/*.3G $RPM_BUILD_ROOT%{_mandir}/man3/
bf0de0a
# install the old manpages source with 3gl -> 3G
bf0de0a
# when matchin don't clobber the khronos version
bf0de0a
for MANP in `find gl-manpages-1.0.1 -name *.3gl` ; do
bf0de0a
	FN=${MANP//*\//}
419af14
	cp -a -n $MANP $RPM_BUILD_ROOT%{_mandir}/man3/${FN/.3gl/.3G}
bf0de0a
done
b67d8ca
find $RPM_BUILD_ROOT%{_mandir}/man3/ -type f -size -100b | xargs sed -i -e 's/\.3gl/\.3G/' -e 's,^\.so man3G/,.so man3/,'
59e90c6
59e90c6
59e90c6
%files
59e90c6
%{_mandir}/man3/*
59e90c6
59e90c6
59e90c6
%changelog
3f0cf8d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-16.20161227
3f0cf8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3f0cf8d
82bc57a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-15.20161227
82bc57a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
82bc57a
28d8843
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-14.20161227
28d8843
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
28d8843
20adb6b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-13.20161227
20adb6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
20adb6b
07a703a
* Wed Dec 28 2016 Yanko Kaneti <yaneti@declera.com> - 1.1-12.20161227
07a703a
- Use docbook5-style-xsl for building the GL4 manpages
07a703a
c7f3713
* Tue Dec 27 2016 Yanko Kaneti <yaneti@declera.com> - 1.1-11.20161227
c7f3713
- New upstream snapshot.
c7f3713
8efe558
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-11.20140424
8efe558
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8efe558
18c0d2d
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-10.20140424
18c0d2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
18c0d2d
313b602
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9.20140424
313b602
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
313b602
d395dfc
* Thu Apr 24 2014 Yanko Kaneti <yaneti@declera.com> - 1.1-8.%{codate}
d395dfc
- New upstream snapshot
d395dfc
- GLSL folded into man4.
d395dfc
- tarball tweaks
d395dfc
a5c889a
* Tue Nov  5 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-7.%{codate}
a5c889a
- New upstream snapshot.
a5c889a
f1c88a0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-7.20130122
f1c88a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f1c88a0
3042f8b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6.20130122
3042f8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3042f8b
9a5c312
* Tue Jan 22 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-5.%{codate}
9a5c312
- Newer upstream snapshot. Minor upstream rearrangement.
9a5c312
- Remove checkout script from sources and add to git.
689fb53
- Try to actually use the bundled mathml2. Fix warnings.
9a5c312
b67d8ca
* Wed Jan 16 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-4.%{codate}
b67d8ca
- Fix symlinked man references some more (#895986) 
b67d8ca
419af14
* Mon Oct 15 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-3.%{codate}
419af14
- Fix symlinked man variants. 
419af14
- Preserve timestamps on the older gl-manpages.
419af14
bf0de0a
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-2.%{codate}
bf0de0a
- Re-add the older gl-manpages for those not present in khronos
bf0de0a
919fd7e
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-1.%{codate}
919fd7e
- Try building from source
919fd7e
59e90c6
* Wed Sep  5 2012 Yanko Kaneti <yaneti@declera.com> - 1.0.1-1
59e90c6
- Initial split from mesa