diff --git a/gl-manpages.spec b/gl-manpages.spec index 952f918c6a875e9e012bc6880149884beb3fde0f..3467806a28be805ba1f056041e9c9bc30e6d9f2b 100644 --- a/gl-manpages.spec +++ b/gl-manpages.spec @@ -1,4 +1,5 @@ -%define anolis_release 1 +%define anolis_release 2 + %global codate 20190306 %global commit 4547332f0f27d98601a8f5732ce8e85e09dbdb93 %global shortcommit %(c=%{commit}; echo ${c:0:7}) @@ -12,30 +13,24 @@ Summary: OpenGL manpages License: MIT and Open Publication URL: https://github.com/KhronosGroup/OpenGL-Refpages Source0: https://github.com/KhronosGroup/OpenGL-Refpages/archive/%{commit}/%{name}-%{shortcommit}.tar.gz -# FIXME: Bundle mathml and the Oasis dbmathl until they are packaged -Source2: http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd -Source3: http://www.w3.org/Math/DTD/mathml2.tgz -# FIXME These are the old gl-manpages source which -# still have some manpages that khronos doesn't. -# Ship until somebody in the know helps figuring whats what. -# When matching install the khronos version. -Source4: gl-manpages-1.0.1.tar.bz2 -#Silence author/version/manual etc. warnings -Source5: metainfo.xsl +Source1: http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd +Source2: http://www.w3.org/Math/DTD/mathml2.tgz +Source3: gl-manpages-1.0.1.tar.bz2 +Source4: metainfo.xsl + BuildArch: noarch -BuildRequires: make -BuildRequires: libxslt docbook-style-xsl docbook5-style-xsl python3 +BuildRequires: libxslt docbook-style-xsl docbook5-style-xsl python3 make %description -OpenGL manpages +OpenGLR and OpenGL ES reference page sources, and generated HTML used as backing store for khronos.org . %prep -%setup -q -n OpenGL-Refpages-%{commit} -tar xzf %{SOURCE3} -cp -av %{SOURCE2} mathml2/ -tar xjf %{SOURCE4} +%autosetup -p1 -n OpenGL-Refpages-%{commit} +tar xzf %{SOURCE2} +cp -av %{SOURCE1} mathml2/ +tar xjf %{SOURCE3} %build @@ -50,7 +45,7 @@ export XML_CATALOG_FILES="$BD/mathml2.cat /etc/xml/catalog" make pushd gl4 for MANP in gl*.xml ; do - xsltproc --xinclude --nonet %{SOURCE5} $MANP | xsltproc --xinclude --nonet /usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl - + xsltproc --xinclude --nonet %{SOURCE4} $MANP | xsltproc --xinclude --nonet /usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl - done popd @@ -62,15 +57,19 @@ cp -n gl4/*.3G $RPM_BUILD_ROOT%{_mandir}/man3/ # when matchin don't clobber the khronos version for MANP in `find gl-manpages-1.0.1 -name *.3gl` ; do FN=${MANP//*\//} - cp -a -n $MANP $RPM_BUILD_ROOT%{_mandir}/man3/${FN/.3gl/.3G} + # the function of `cp -n` command in version 9.2 has changed, so skipped the + # failed case temporarily + cp -a -n $MANP $RPM_BUILD_ROOT%{_mandir}/man3/${FN/.3gl/.3G} || : done find $RPM_BUILD_ROOT%{_mandir}/man3/ -type f -size -100b | xargs sed -i -e 's/\.3gl/\.3G/' -e 's,^\.so man3G/,.so man3/,' - %files %{_mandir}/man3/* %changelog +* Mon Apr 17 2023 yuanhui - 1:1.1-2.20190306 +- Optimize the spec file + * Wed Jul 27 2022 Chunmei Xu - 1:1.1-1.20190306 - init from upstream