summaryrefslogtreecommitdiff
path: root/community/libircclient/PKGBUILD
blob: cba8f34e7a2d74c65ab04231491477e3559b5d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $Id: PKGBUILD 93508 2013-07-04 20:56:31Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <barthalion@gmail.com>
# Maintainer:  SpepS <dreamspepser at yahoo dot it>
# Contributor: Marcel Wysocki <maci@satgnu.net>
# Contributor: coolkehon <coolkehon at g m a i l>

pkgname=libircclient
pkgver=1.7
pkgrel=1
pkgdesc='Small but powerful library, which implements client-server IRC protocol'
arch=('i686' 'x86_64')
url='http://www.ulduzsoft.com/libircclient/'
depends=('glibc')
makedepends=('python2-sphinx' 'python2-rst2pdf') 
license=('GPL')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('968370276f7cf21302f504f9bce1fc99')

build() {
  cd $pkgname-$pkgver

  # add fPIC flag for x86_64
  [[ "$CARCH" = "x86_64" ]] && export CFLAGS="$CFLAGS -fPIC"

  sed -e "/install/s/lib/all/" \
      -e "/DESTDIR/s/\.a/\.so/g" \
      -e "s/@\/include/&\/$pkgname/" \
      -i src/Makefile.in

  ./configure --prefix=/usr \
              --libdir=/usr/lib \
              --enable-shared
  cd src && make

  cd ../doc
  sed -i 's/sphinx-build/sphinx-build2/g' Makefile 
  make singlehtml man
}

package() {
  cd $pkgname-$pkgver/src
  make DESTDIR="$pkgdir" install

  install -d "$pkgdir"/usr/share/doc/$pkgname
  cp -a ../doc/_build/singlehtml/* "$pkgdir"/usr/share/doc/$pkgname
  cp -a ../doc/_build/man "$pkgdir"/usr/share

  install -d "$pkgdir"/usr/share/$pkgname/examples
  install -Dm644 ../examples/* \
    "$pkgdir"/usr/share/$pkgname/examples
}