summaryrefslogtreecommitdiff
path: root/community/ircii-pana/PKGBUILD
blob: e7325cac81f49109ce0c51ccabe1a114ab215941 (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
56
57
58
59
60
# $Id: PKGBUILD 68217 2012-03-19 12:39:02Z lfleischer $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@seznam.cz>
# inspired by Gentoo: http://kambing.ui.edu/gentoo-portage/net-irc/bitchx/files/

pkgname=ircii-pana
pkgver=1.1
pkgrel=5
pkgdesc='A console-based IRC client - AKA BitchX.'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.bitchx.org'
license=('GPL2')
depends=('ncurses')
makedepends=('patch')
source=("http://downloads.sourceforge.net/bitchx/${pkgname}-${pkgver}-final.tar.gz" \
        "bitchx-${pkgver}-gcc43.diff" \
        "bitchx-${pkgver}-inline.diff" \
        "bitchx-${pkgver}-freenode.diff" \
        "bitchx-${pkgver}-latin1.diff" \
        "bitchx-${pkgver}-64bit.diff"
        "bitchx-${pkgver}-open_missing_mode.patch")

md5sums=('611d2dda222f00c10140236f4c331572'
         'e1efc5e52658e6651918e07a116bce18'
         '4824ffd55d51099dd9ee035f4b78d6bf'
         '741e91dd6267d3436c43756429342217'
         '9316105f23a67a9bb7ecfc7485dcd098'
         'c86f7758db7f438d726fd447dd4a83b0'
         'a80f431488bf3e0e9f0d650d23a08aba')

build() {
  cd "${srcdir}/BitchX"

  patch -Np1 -i "${srcdir}/bitchx-${pkgver}-gcc43.diff"
  patch -Np1 -i "${srcdir}/bitchx-${pkgver}-inline.diff"
  patch -Np1 -i "${srcdir}/bitchx-${pkgver}-freenode.diff"
  patch -Np1 -i "${srcdir}/bitchx-${pkgver}-latin1.diff"

  # add build fix (needed when building with "-D_FORTIFY_SOURCE=2")
  patch -Np0 -i "${srcdir}/bitchx-${pkgver}-open_missing_mode.patch"

  [ "$CARCH" == "x86_64" ] && patch -Np1 -i "${srcdir}/bitchx-${pkgver}-64bit.diff"

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/BitchX"

  make prefix="${pkgdir}/usr" install

  # we don't want to link to ${pkgdir}, correcting it then
  cd "${pkgdir}/usr/bin"
  rm -f BitchX && ln -s "BitchX-${pkgver}-final" BitchX

  # correcting man page
  rm -rf "${pkgdir}/usr/man"
  install -Dm644 "${srcdir}/BitchX/doc/BitchX.1" "${pkgdir}/usr/share/man/man1/BitchX.1"
}