summaryrefslogtreecommitdiff
path: root/community/libircclient/PKGBUILD
blob: edad3bacf1340cb8c006381272fc4bffed99e8ad (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
52
53
54
55
# 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.6
pkgrel=1
pkgdesc="A small but powerful library, which implements client-server IRC protocol."
arch=('i686' 'x86_64' 'mips64el')
url="http://www.ulduzsoft.com/libircclient/"
depends=('glibc')
license=('GPL')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('eb6a2c4e91862cc10de3b13b198cfa23')

build() {
  cd "$srcdir/$pkgname-$pkgver"

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

  ## Makefile.in fixes:
  #  invalid `lib` requisite for `install` target
  #  install shared lib instead of static
  #  headers in /usr/include/$pkgname
  sed -e "/install/s/lib/all/" \
      -e "/DESTDIR/s/\.a/\.so/g" \
      -e "s/@\/include/&\/$pkgname/" \
      -i src/Makefile.in

  ./configure --prefix=/usr \
              --enable-shared

  cd src &&  make CFLAGS="$CFLAGS"
}

package() {
  cd "$srcdir/$pkgname-$pkgver/src"

  make DESTDIR="$pkgdir/" install

  # doc
  install -d "$pkgdir/usr/share/doc/$pkgname"
  cp -a ../doc/{html,rfc1459.txt} \
    "$pkgdir/usr/share/doc/$pkgname"

  # man
  cp -a ../doc/man "$pkgdir/usr/share"

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