summaryrefslogtreecommitdiff
path: root/community/ircservices/PKGBUILD
blob: 62c0a58b7e4451b568c6c5b8f9ae3a748de2ddd4 (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
# $Id: PKGBUILD 50648 2011-06-29 10:57:48Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=ircservices
pkgver=5.1.24
pkgrel=1
pkgdesc="Services for IRC (NickServ, ChanServ, MemoServ)"
arch=(i686 x86_64)
url="http://www.ircservices.za.net/"
license=('GPL')
depends=('glibc')
makedepends=('patch')
options=('!makeflags' 'emptydirs')
install=ircservices.install
#source=(http://www.ircservices.za.net/download/ircservices-$pkgver.tar.gz
source=(http://achurch.org/services/tarballs/ircservices-$pkgver.tar.gz
	path-patch.patch
	ircservices)
md5sums=('d4f531537aeed230026cf5560f221ecb'
         '7e4bbf6fb398323afc8e85656ec82c13'
         'd5d6409ab04b3a715f9adc29a4fb8a2d')

build() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np0 <../path-patch.patch
  ./configure -prefix /usr
  sed -i 's#getline#xgetline#' lang/langcomp.c
  make
  sed -i "s#DATDEST=/usr/lib/ircservices#DATDEST=$pkgdir/usr/lib/ircservices#" ./Makefile.inc
  sed -i "s#BINDEST=/usr/sbin#BINDEST=$pkgdir/usr/sbin#" ./Makefile.inc
}

package() {
  cd $srcdir/$pkgname-$pkgver
  install -d -m 0755 $pkgdir/usr/sbin
  install -d -m 0755 $pkgdir/usr/lib
  install -d -m 0755 $pkgdir/etc/ircd
  make DESTDIR=$pkgdir install

  install -D -m 0755 $srcdir/ircservices $pkgdir/etc/rc.d/ircservices
  cd $pkgdir && chmod -R ugo+r * && chmod 0755 ./usr/sbin/ircservices
  find -type d -exec chmod 0755 {} \;
  install -d -m 0755 $pkgdir/var/lib/ircd
  cd ./var/lib/ircd
  ln -s /usr/lib/ircservices/modules modules
  ln -s /usr/lib/ircservices/languages languages
  ln -s /usr/lib/ircservices/helpfiles helpfiles
  ln -s /etc/ircd/ircservices.conf ircservices.conf
  ln -s /etc/ircd/modules.conf modules.conf

  mkdir -p $pkgdir/var/log/ircd
  mv $pkgdir/usr/lib/ircservices/*.conf $pkgdir/etc/ircd/
}