Custom Search
A | A | A | Report content





# Maintainer: Jack Mitchell <jack@embed.me.uk>

pkgname=libwebsockets-git
pkgver=20130317
pkgrel=1

pkgdesc="C Websockets Server Library"
arch=(i686 x86_64)
url='http://git.warmcat.com/cgi-bin/cgit/libwebsockets'
license=(LGPL)

depends=('openssl')
makedepends=(git cmake)
provides=('libwebsockets')

_gitroot="git://git.warmcat.com/libwebsockets"
_gitbranch="master"
_gitname="libwebsockets"

source=()
md5sums=()

build() {

  msg "Building ${pkgname}..."

  if [ -d "$_gitname" ] ; then
    warning 'Repository directory already exists!'
    cd "$_gitname"
    git checkout master
    msg2 "Pulling..."
    git pull "$_gitroot" master
  else
    msg2 "Cloning $_gitroot repository..."
    git clone "$_gitroot" "$_gitname"
    cd "$_gitname"
    git checkout "$_gitbranch"
  fi

  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DWITHOUT_DEBUG=1 \
    -DWITHOUT_TESTAPPS=1 \
    -DWITHOUT_TEST_CLIENT=1 \
    -DWITHOUT_TEST_FRAGGLE=1 \
    -DWITHOUT_TEST_PING=1 \
    -DWITHOUT_TEST_SERVER=1 \
    -DWITHOUT_TEST_SERVER_EXTPOLL=1 \
    -DWITH_SSL=1

  make
}

package() {
  msg "Packaging ${pkgname}..."
  cd "$_gitname"
  make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et: