Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Dec 27th, 2010  |  syntax: None  |  size: 0.71 KB  |  hits: 79  |  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. build() {
  2.  
  3.    cd ${srcdir}/
  4.  
  5.     msg "Connecting to the GIT server...."
  6.     if [[ -d ${srcdir}/${_gitname} ]] ; then
  7.         cd ${_gitname}
  8.         git pull origin
  9.         msg "The local files are updated..."
  10.     else
  11.         git clone ${_gitroot}
  12.     fi
  13.  
  14.     msg "GIT checkout done."
  15.  
  16.     msg "Starting make for: ${pkgname}"
  17.  
  18.     if [[ -d ${srcdir}/${_gitname}-build ]]; then
  19.        msg "Cleaning the previous build directory..."
  20.        rm -rf ${srcdir}/${_gitname}-build
  21.     fi
  22.  
  23.     git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
  24.  
  25.     cd ${srcdir}/${_gitname}-build
  26.  
  27.   sed -i 's/^add_subdirectory(\ doc\ )/#add_subdirectory(\ doc\ )/' CMakeLists.txt
  28.  
  29.   cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
  30.   make
  31. }