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