gl-manpages/gl-manpages.spec

64 lines
2.2 KiB
RPMSpec
Raw Normal View History

Name: gl-manpages
Version: 1.1
2019-12-30 15:58:08 +08:00
Release: 18
Summary: OpenGL manpages
License: MIT and Open Publication
URL: http://www.opengl.org/wiki/Getting_started/XML_Toolchain_and_Man_Pages
2019-12-30 15:58:08 +08:00
Source0: http://ftp.vcu.edu/pub/gnu_linux/archlinux/other/mesa/gl-manpages-1.0.1.tar.bz2
Source1: make-gl-man-snapshot.sh
Source2: http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd
Source3: http://www.w3.org/Math/DTD/mathml2.tgz
Source4: gl-manpages-1.0.1.tar.bz2
Source5: metainfo.xsl
BuildArch: noarch
BuildRequires: libxslt docbook-style-xsl docbook5-style-xsl
%description
Manual pages for OpenGL.
%prep
%autosetup -n %{name}-%{version}-20161227
tar xzf %{SOURCE3}
cp -av %{SOURCE2} mathml2/
tar xjf %{SOURCE4}
%build
xmlcatalog --create --noout \
--add public "-//W3C//DTD MathML 2.0//EN" "file://`pwd`/mathml2/mathml2.dtd" \
--add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file://`pwd`/mathml2/mathml2.dtd" \
--add public "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" "file://`pwd`/mathml2/dbmathml.dtd" \
--add system "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "file://`pwd`/mathml2/dbmathml.dtd" \
mathml2.cat
# Define for xsltproc
export XML_CATALOG_FILES="`pwd`/mathml2.cat /etc/xml/catalog"
for MAN in man3 man2 ; do
cd $MAN
for MANP in gl*.xml ; do
xsltproc --nonet %{SOURCE5} $MANP | xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl -
done
cd ..
done
cd man4
for MANP in gl*.xml ; do
xsltproc --xinclude --nonet %{SOURCE5} $MANP | xsltproc --xinclude --nonet /usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl -
done
%install
install -d $RPM_BUILD_ROOT%{_mandir}/man3/
cp -n {man4,man3,man2}/*.3G $RPM_BUILD_ROOT%{_mandir}/man3/
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}
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
* Sat Nov 30 2019 Alex Chao <zhaolei746@huawei.com> - 1.1-17
- Package init