755278
# FIXME:  Figure out what to do about the gles* manpages, maybe different conflicting packages...
755278
%global codate 20190306
755278
%global commit 4547332f0f27d98601a8f5732ce8e85e09dbdb93
755278
%global shortcommit %(c=%{commit}; echo ${c:0:7})
919fd7
59e90c
Name:           gl-manpages
919fd7
Version:        1.1
c9dac1
Release:        21.%{codate}%{?dist}
59e90c
Summary:        OpenGL manpages
59e90c
919fd7
License:        MIT and Open Publication
755278
URL:            https://github.com/KhronosGroup/OpenGL-Refpages
755278
Source0:        https://github.com/KhronosGroup/OpenGL-Refpages/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
919fd7
# FIXME: Bundle mathml and the Oasis dbmathl until they are packaged
919fd7
Source2:        http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd
919fd7
Source3:        http://www.w3.org/Math/DTD/mathml2.tgz
bf0de0
# FIXME  These are the old gl-manpages source which 
bf0de0
# still have some manpages that khronos doesn't. 
bf0de0
# Ship until somebody in the know helps figuring whats what.
755278
# When matching install the khronos version.
bf0de0
Source4:        gl-manpages-1.0.1.tar.bz2
689fb5
#Silence author/version/manual etc. warnings
689fb5
Source5:        metainfo.xsl
59e90c
59e90c
BuildArch:      noarch
59e90c
755278
BuildRequires:  libxslt docbook-style-xsl docbook5-style-xsl python3
59e90c
59e90c
%description
59e90c
OpenGL manpages
59e90c
59e90c
%prep
755278
%setup -q -n OpenGL-Refpages-%{commit}
919fd7
tar xzf %{SOURCE3}
919fd7
cp -av %{SOURCE2} mathml2/
bf0de0
tar xjf %{SOURCE4}
59e90c
59e90c
59e90c
%build
689fb5
export BD=`pwd`
689fb5
xmlcatalog --create --noout \
689fb5
	--add public "-//W3C//DTD MathML 2.0//EN" "file://$BD/mathml2/mathml2.dtd" \
689fb5
	--add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file://$BD/mathml2/mathml2.dtd" \
689fb5
	--add public "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" "file://$BD/mathml2/dbmathml.dtd" \
689fb5
	--add system "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "file://$BD/mathml2/dbmathml.dtd" \
689fb5
	mathml2.cat
689fb5
export XML_CATALOG_FILES="$BD/mathml2.cat /etc/xml/catalog"
755278
make
755278
pushd gl4
689fb5
	for MANP in gl*.xml ; do
755278
		xsltproc --xinclude --nonet %{SOURCE5} $MANP | xsltproc --xinclude --nonet /usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl -
689fb5
	done
07a703
popd
919fd7
59e90c
59e90c
%install
919fd7
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/
755278
cp -n gl4/*.3G $RPM_BUILD_ROOT%{_mandir}/man3/
bf0de0
# install the old manpages source with 3gl -> 3G
bf0de0
# when matchin don't clobber the khronos version
bf0de0
for MANP in `find gl-manpages-1.0.1 -name *.3gl` ; do
bf0de0
	FN=${MANP//*\//}
419af1
	cp -a -n $MANP $RPM_BUILD_ROOT%{_mandir}/man3/${FN/.3gl/.3G}
bf0de0
done
b67d8c
find $RPM_BUILD_ROOT%{_mandir}/man3/ -type f -size -100b | xargs sed -i -e 's/\.3gl/\.3G/' -e 's,^\.so man3G/,.so man3/,'
59e90c
59e90c
59e90c
%files
59e90c
%{_mandir}/man3/*
59e90c
59e90c
59e90c
%changelog
c9dac1
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-21.20190306
c9dac1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c9dac1
4b5f33
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-20.20190306
4b5f33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4b5f33
2125a4
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-19.20190306
2125a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2125a4
755278
* Wed Mar  6 2019 Yanko Kaneti <yaneti@declera.com> - 1.1-18.20190306
755278
- Switch to the new upstream github repo sources
755278
- Build only gl4 manpages for now
755278
90f673
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-17.20161227
90f673
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
90f673
3f0cf8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-16.20161227
3f0cf8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3f0cf8
82bc57
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-15.20161227
82bc57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
82bc57
28d884
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-14.20161227
28d884
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
28d884
20adb6
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-13.20161227
20adb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
20adb6
07a703
* Wed Dec 28 2016 Yanko Kaneti <yaneti@declera.com> - 1.1-12.20161227
07a703
- Use docbook5-style-xsl for building the GL4 manpages
07a703
c7f371
* Tue Dec 27 2016 Yanko Kaneti <yaneti@declera.com> - 1.1-11.20161227
c7f371
- New upstream snapshot.
c7f371
8efe55
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-11.20140424
8efe55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8efe55
18c0d2
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-10.20140424
18c0d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
18c0d2
313b60
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9.20140424
313b60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
313b60
d395df
* Thu Apr 24 2014 Yanko Kaneti <yaneti@declera.com> - 1.1-8.%{codate}
d395df
- New upstream snapshot
d395df
- GLSL folded into man4.
d395df
- tarball tweaks
d395df
a5c889
* Tue Nov  5 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-7.%{codate}
a5c889
- New upstream snapshot.
a5c889
f1c88a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-7.20130122
f1c88a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f1c88a
3042f8
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6.20130122
3042f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3042f8
9a5c31
* Tue Jan 22 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-5.%{codate}
9a5c31
- Newer upstream snapshot. Minor upstream rearrangement.
9a5c31
- Remove checkout script from sources and add to git.
689fb5
- Try to actually use the bundled mathml2. Fix warnings.
9a5c31
b67d8c
* Wed Jan 16 2013 Yanko Kaneti <yaneti@declera.com> - 1.1-4.%{codate}
b67d8c
- Fix symlinked man references some more (#895986) 
b67d8c
419af1
* Mon Oct 15 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-3.%{codate}
419af1
- Fix symlinked man variants. 
419af1
- Preserve timestamps on the older gl-manpages.
419af1
bf0de0
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-2.%{codate}
bf0de0
- Re-add the older gl-manpages for those not present in khronos
bf0de0
919fd7
* Tue Oct  9 2012 Yanko Kaneti <yaneti@declera.com> - 1.1-1.%{codate}
919fd7
- Try building from source
919fd7
59e90c
* Wed Sep  5 2012 Yanko Kaneti <yaneti@declera.com> - 1.0.1-1
59e90c
- Initial split from mesa