Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

pkgbuild-opengl-manpages

By: a guest on Jul 5th, 2013  |  syntax: Bash  |  size: 2.35 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Mainainer: Joskar
  2. # Contributor: Pierre Neidhardt <ambrevar@gmail.com>
  3.  
  4. pkgname=opengl-manpages-svn
  5. pkgver=22276
  6. pkgrel=1
  7. pkgdesc="OpenGL Reference Pages converted to manpages"
  8. provides=(opengl-manpages)
  9. license=('custom')
  10. arch=(any)
  11. url="https://www.opengl.org/sdk/docs/man/"
  12. makedepends=('subversion' 'libxslt' 'docbook-xsl' 'docbook-mathml' 'w3c-mathml2' 'sed')
  13. source=(LICENSE SGI-FreeSoftwareLicenseB OpenPublicationLicense
  14.     svn+https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man2
  15.     svn+https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man3
  16.     svn+https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man4
  17.     svn+https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/manglsl)
  18. noextract=()
  19. md5sums=('5fc9b93540b47782c64095176204c7e3'
  20.     '1ac705a20a0b78c7c00512507bee5cec'
  21.     'e2c59eccf33187f4605e116bdf3a8ffb'
  22.     'SKIP' 'SKIP' 'SKIP' 'SKIP')
  23.  
  24. pkgver() {
  25.     cd 'man4'
  26.     svnversion | tr -d [A-z]
  27. }
  28.  
  29. prepare ()
  30. {
  31.     if [ -d "$srcdir/man2" ]; then
  32.         sed -i 's/glDrawElementsInstanced.xml//' "$srcdir/man2/xhtml/Makefile"
  33.     fi
  34.  
  35.     if [ -d "$srcdir/manglsl" ]; then
  36.         cp -r "$srcdir/man4/usr" "$srcdir/manglsl/"
  37.     fi
  38. }
  39.  
  40. build() {
  41.     for i in "2" "3" "4" "glsl"; do
  42.         cd "man$i"
  43.         msg "Starting build..."
  44.         sed -i 's@xsl/current/xhtml@xsl/current/manpages@' xhtml/opengl-man.xsl
  45.         make ROOT=.
  46.         sed -i 's@\[FIXME: author\]@Khronos Group@g' xhtml/*
  47.         sed -i 's@\[FIXME: source\]@Khronos Group@g' xhtml/*
  48.         sed -i 's@\[FIXME: manual\]@OpenGL Reference Pages@g' xhtml/*
  49.         MANCAT="$i"; [ "$i" = "glsl" ] && MANCAT="0"
  50.         sed -i 's/"3G"/"'$MANCAT'G"/' xhtml/*.3G
  51.         cd ..
  52.     done
  53. }
  54.  
  55. package() {
  56.     for i in "2" "3" "4" "glsl"; do
  57.         cd "man$i/xhtml"
  58.         MANCAT="$i"; [ "$i" = "glsl" ] && MANCAT="0"
  59.         mkdir -p "$pkgdir/usr/share/man/man$MANCAT"
  60.         for j in *.3G; do
  61.             cp "$j" "$pkgdir/usr/share/man/man${MANCAT}/${j%3G}${MANCAT}G"
  62.         done
  63.         cd ../..
  64.     done
  65.  
  66.     mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
  67.     cp "$srcdir/SGI-FreeSoftwareLicenseB" "$pkgdir/usr/share/licenses/$pkgname"
  68.     cp "$srcdir/OpenPublicationLicense" "$pkgdir/usr/share/licenses/$pkgname"
  69.     cp "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
  70. }