This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 8th, 2011  |  syntax: Bash  |  size: 2.76 KB  |  views: 195  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Alessio Sergi <asergi at archlinux dot us>
  2. # Contributor: Aaron Hurt <ahurt at anbcs dot com>
  3.  
  4. pkgname=avant-window-navigator-bzr
  5. _realname=avant-window-navigator
  6. pkgver=829
  7. pkgrel=1
  8. pkgdesc="Fully customisable dock-like window navigator"
  9. arch=('i686' 'x86_64')
  10. url="https://launchpad.net/awn"
  11. license=('GPL2' 'LGPL2.1')
  12. depends=('gconf' 'dbus-python' 'desktop-file-utils' 'hicolor-icon-theme' \
  13.          'libgtop' 'libdesktop-agnostic' 'libwnck' 'pyxdg' 'xdg-utils')
  14. makedepends=('bzr' 'gnome-common' 'gtk-doc' 'intltool' 'vala')
  15. optdepends=('dockmanager: for helpers support')
  16. provides=(${_realname})
  17. conflicts=(${_realname})
  18. options=('!libtool')
  19. install=${pkgname}.install
  20.  
  21. _bzrtrunk="lp:awn"
  22. _bzrmod="awn"
  23.  
  24. build() {
  25.   cd "${srcdir}"
  26.  
  27.   msg "Connecting to the server...."
  28.  
  29.   if [ -d ${_bzrmod} ]; then
  30.     bzr up ${_bzrmod}
  31.     msg "The local files are updated."
  32.   else
  33.     bzr co ${_bzrtrunk} ${_bzrmod}
  34.   fi
  35.  
  36.   msg "BZR checkout done or server timeout"
  37.   msg "Starting make..."
  38.  
  39.   rm -rf "${_bzrmod}-build"
  40.   cp -r "${_bzrmod}" "${_bzrmod}-build"
  41.   cd "${_bzrmod}-build"
  42.  
  43.   export PYTHON="/usr/bin/python2"
  44.   ./autogen.sh --prefix=/usr \
  45.                --sysconfdir=/usr/share \
  46.                --disable-pymod-checks
  47.  
  48.   sed -i 's/-Werror=implicit-function-declaration//' libawn/Makefile
  49.   sed -i 's/-Werror=nested-externs//' libawn/Makefile
  50.  
  51.   sed -i 's/-Werror=implicit-function-declaration//' src/Makefile
  52.   sed -i 's/-Werror=nested-externs//' src/Makefile
  53.  
  54.   sed -i 's/-Werror=implicit-function-declaration//' applets/quick-prefs/Makefile
  55.   sed -i 's/-Werror=nested-externs//' applets/quick-prefs/Makefile
  56.  
  57.   sed -i 's/-Werror=undef//' applets/separator/Makefile
  58.   sed -i 's/-Werror=undef//' applets/taskmanager/Makefile
  59.  
  60.   sed -i 's/-Werror=implicit-function-declaration//' applets/taskmanager/Makefile
  61.   sed -i 's/-Werror=nested-externs//' applets/taskmanager/Makefile
  62.  
  63.   sed -i 's|${prefix}/etc|${prefix}/share|' Makefile
  64.  
  65.   str='\(.*"theme_tooltip_outline_color".*\)'
  66.   sed -i "s|${str}|#\1|" awn-settings/awnSettings.py
  67.  
  68.   # python2 fix
  69.   sed -i 's_with ("python"_with ("python2"_' applet-activation/main.c
  70.   for file in $(find . -name '*.py' -print); do
  71.       sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' ${file}
  72.       sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' ${file}
  73.   done
  74.  
  75.   make
  76. }
  77.  
  78. package() {
  79.   cd "${srcdir}/${_bzrmod}-build"
  80.  
  81.   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
  82.  
  83.   install -d -m755 "${pkgdir}/usr/share/gconf/schemas"
  84.   gconf-merge-schema "${pkgdir}/usr/share/gconf/awn.schemas" \
  85.     "${pkgdir}"/usr/share/gconf/schemas/*.schemas
  86.  
  87.   rm -f "${pkgdir}"/usr/share/gconf/schemas/*.schemas
  88.   mv "${pkgdir}"/usr/share/gconf/{,schemas/}awn.schemas
  89. }
clone this paste RAW Paste Data