PKGBUILDs/community/ultimate-ircd/PKGBUILD
2009-10-09 21:15:33 -05:00

56 lines
2 KiB
Bash

# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=ultimate-ircd
pkgver=3.0.2
pkgrel=1
pkgdesc="ultimate irc server"
arch=(i686 x86_64)
url="http://www.shadow-realm.org/"
license=("GPL")
depends=(glibc)
makedepends=(patch)
conflicts=(ircd)
provides=(ircd)
backup=()
install=ircd.install
source=(http://downloads.sourceforge.net/sourceforge/ultimate/Ultimate$pkgver.tar.bz2 \
ultimate-ircd \
conf-fix.patch)
md5sums=('8bc14b97d22a3ce3415cc0540ae459f6'
'6578a4b5cd8559db5de38179a175a025'
'5e0f2a02e12675ac070a148c3234e111')
build() {
cd $startdir/src/Ultimate$pkgver
./configure --prefix=/usr --enable-chinese-nick
for i in `find -type f -name Makefile`; do
echo Patching $i...
sed -i "s#prefix = /usr#prefix = $startdir/pkg/usr#" $i
sed -i "s#libexecdir = \${bindir}#libexecdir = $startdir/pkg/usr/lib/ircd#" $i
sed -i "s#sysconfdir = \${prefix}/etc#sysconfdir = $startdir/pkg/etc/ircd#" $i
sed -i "s#localstatedir = \${prefix}#localstatedir = $startdir/pkg/var#" $i
sed -i "s#networksubdir = \${prefix}/etc/networks#networksubdir = $startdir/pkg/etc/ircd/networks#" $i
sed -i "s#\$(localstatedir)/logs#\$(localstatedir)/log/ircd#" $i
done
cd include && patch -N <../../conf-fix.patch && cd ..
make || return 1
mkdir -p $startdir/pkg/usr/bin && \
mkdir -p $startdir/pkg/var/log/ircd && \
mkdir -p $startdir/pkg/etc/ircd/networks && \
make install && \
rm -f $startdir/pkg/usr/ircd && \
rm -f $startdir/pkg/usr/kill && \
rm -f $startdir/pkg/usr/rehash && \
cd $startdir/pkg/usr/bin && \
mv mkpasswd irc-mkpasswd && \
mv ssl-cert.sh irc-ssl-cert.sh && \
mv ssl-search.sh irc-ssl-search.sh && \
install -D -m 0755 $startdir/src/ultimate-ircd $startdir/pkg/etc/rc.d/ultimate-ircd && \
install -d -m 0755 $startdir/pkg/var/run/ircd && \
install -d -m 0755 $startdir/pkg/var/lib/ircd
}