Permalink
Browse files

opengl-man-pages: don't create new dir

  • Loading branch information...
1 parent eb7c33a commit 5e0d638e2b7ab7c18d759cb65561d83f9f8cd91a Andrew Wong committed Apr 25, 2013
Showing with 31 additions and 19 deletions.
  1. +31 −19 opengl-man-pages/PKGBUILD
View
@@ -1,5 +1,6 @@
# $Id: PKGBUILD 151284 2012-02-25 12:42:20Z pierre $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
+# Description: Man pages and docs for OpenGL 3.3 and GLSL
pkgname=opengl-man-pages
_svndate=20130425
@@ -21,8 +22,10 @@ mksource() {
[[ -d ${pkgname}-source ]] || mkdir -d ${pkgname}-source
pushd ${pkgname}-source
[[ -x /usr/bin/svn ]] || (echo "svn not found. Install subversion." && return 1)
- svn co --username anonymous --password anonymous https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man3/ man3
- svn co --username anonymous --password anonymous https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/manglsl/ manglsl
+ svn co --username anonymous --password anonymous \
+ https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man3/ man3
+ svn co --username anonymous --password anonymous \
+ https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/manglsl/ manglsl
find . -maxdepth 2 -type d -name .svn -exec rm -rf {} \;
tar -cvJf ../${pkgname}_${_svndate}.tar.xz man3/* manglsl/*
popd
@@ -31,41 +34,50 @@ mksource() {
build() {
export ROOT="${srcdir}/man3"
- [[ -d "${srcdir}/build" ]] || mkdir "${srcdir}/build"
+ cd "${srcdir}/man3"
+ make
- cd "${srcdir}/build"
+ # OpenGL 3.3 xml manpages: convert xml to 3G
+ find . -maxdepth 1 -type f -name "*.xml" \
+ -exec xsltproc --noout --nonet \
+ /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl {} \;
- make -C ../man3
- make -C ../manglsl
-
- # Fix XML mismatches
- find ../manglsl -maxdepth 1 -type f -name \*.xml -exec \
- sed -i 's/#VARTABLECOLS#/<tgroup cols="1"> #VARTABLECOLS#/' {} \;
-
- find ../man3 -maxdepth 1 -type f -name \*.xml -exec \
- xsltproc --noout --nonet /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl {} \;
-
- find . -maxdepth 1 -type f -name \*.3G \
+ # OpenGL 3.3 3G manpages: fix docbook's manual and source variables
+ find . -maxdepth 1 -type f -name "*.3G" \
-exec sed -i 's/\[FIXME: manual\]/OpenGL 3.3 Reference/' {} \; \
-exec sed -i 's/\[FIXME: source\]/opengl-man-pages/' {} \;
- find ../manglsl -maxdepth 1 -type f -name \*.xml -exec \
- xsltproc --noout --nonet /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl {} \;
+ cd ../manglsl
+ make
- find . -maxdepth 1 -type f -name \*.3G \
+ # GLSL xml manpages: fix xml mismatches, convert xml to 3G
+ find . -maxdepth 1 -type f -name "*.xml" \
+ -exec sed -i 's/#VARTABLECOLS#/<tgroup cols="1"> #VARTABLECOLS#/' {} \; \
+ -exec xsltproc --noout --nonet \
+ /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl {} \;
+
+ # GLSL 3G manpages: fix docbook's manual and source variables
+ find . -maxdepth 1 -type f -name "*.3G" \
-exec sed -i 's/\[FIXME: manual\]/OpenGL Shading Language (GLSL) Reference/' {} \; \
-exec sed -i 's/\[FIXME: source\]/opengl-man-pages/' {} \;
+
+ # GLSL xhtml docs: fix index's css href, open links in current window
+ sed -i 's/href=".*opengl-man\.css"/href="opengl-man.css"/' xhtml/index.html
}
package() {
cd "${srcdir}"
+ # Install man pages
install -dm755 "${pkgdir}/usr/share/man/man3"
- install -Dm644 build/*.3G "${pkgdir}/usr/share/man/man3/"
+ install -Dm644 man3/*.3G "${pkgdir}/usr/share/man/man3/"
+ install -Dm644 manglsl/*.3G "${pkgdir}/usr/share/man/man3/"
+ # Install docs
install -dm755 "${pkgdir}/usr/share/doc/${pkgname}/opengl3"
install -Dm644 man3/xhtml/* "${pkgdir}/usr/share/doc/${pkgname}/opengl3"
install -dm755 "${pkgdir}/usr/share/doc/${pkgname}/glsl"
install -Dm644 manglsl/xhtml/* "${pkgdir}/usr/share/doc/${pkgname}/glsl"
+ # Install license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

0 comments on commit 5e0d638

Please sign in to comment.