1 # Maintainer: Adam Eberlin < ae at adameberlin dot com >
6 pkgdesc="Anope is a set of IRC Services designed for flexibility and ease of use."
8 conflicts=('anope-svn')
12 makedepends=('fakeroot')
13 options=('docs' 'emptydirs' '!libtool' 'strip' 'zipman')
14 url=http://www.anope.org/
16 source=("http://downloads.sourceforge.net/anope/anope-${pkgver}-release-source.tar.gz" "anope" "anoperc")
21 mv anope-$pkgver-release-source anope-$pkgver
22 cp -r anope-$pkgver anope-$pkgver-build
23 cd anope-$pkgver-build
25 ./configure --with-instdir=${srcdir}/pkg --with-permissions=077 --with-debugsym --with-makebin=
27 mkdir -p ${srcdir}/pkg
30 make install || return 1
32 # install -dm755 "${pkgdir}/var/log/anope"
33 # install -m755 -D "${srcdir}/anope" "${pkgdir}/etc/rc.d/anope"
34 # install -m755 -D "${srcdir}/anoperc" "${pkgdir}/usr/bin/anope/anoperc"
36 ##################################################################
37 # Fix file/directory structure used by Anope
41 # ${srcdir}/pkg/data/services.pid -> /var/run/anope.pid
42 # ${srcdir}/pkg/data/logs -> /var/log/anope
43 # ${srcdir}/pkg/data -> /etc/anope
44 # ${srcdir}/pkg/bin/services -> /usr/bin/services
48 # ${srcdir}/pkg/bin -> ${pkgdir}/usr/bin
49 # ${srcdir}/pkg/data -> ${pkgdir}/etc/anope
51 ##################################################################
53 # sed "s;`echo OLDPATH | sed 's/\//\\//g'`;`echo NEWPATH | sed 's/\//\\//g'`;g" OLDFILE > ${pkgdir}/NEWFILE
55 sed "s;`echo ${srcdir}/pkg/data/services.pid | sed 's/\//\\//g'`;`echo /var/run/anope.pid | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/anoperc > ${srcdir}/pkg/bin/anoperc.new
56 sed "s;`echo ${srcdir}/pkg/data/logs | sed 's/\//\\//g'`;`echo /var/log/anope | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/anoperc.new > ${srcdir}/pkg/bin/anoperc
57 sed "s;`echo ${srcdir}/pkg/data | sed 's/\//\\//g'`;`echo /etc/anope | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/anoperc > ${srcdir}/pkg/bin/anoperc.new
58 sed "s;`echo ${srcdir}/pkg/bin/services | sed 's/\//\\//g'`;`echo /usr/bin/services | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/anoperc.new > ${srcdir}/pkg/bin/anoperc
59 rm ${srcdir}/pkg/bin/anoperc.new
61 sed "s;`echo ${srcdir}/pkg/data/services.pid | sed 's/\//\\//g'`;`echo /var/run/anope.pid | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/services > ${srcdir}/pkg/bin/services.new
62 sed "s;`echo ${srcdir}/pkg/data/logs | sed 's/\//\\//g'`;`echo /var/log/anope | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/services.new > ${srcdir}/pkg/bin/services
63 sed "s;`echo ${srcdir}/pkg/data | sed 's/\//\\//g'`;`echo /etc/anope | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/services > ${srcdir}/pkg/bin/services.new
64 sed "s;`echo ${srcdir}/pkg/bin/services | sed 's/\//\\//g'`;`echo /usr/bin/services | sed 's/\//\\//g'`;g" ${srcdir}/pkg/bin/services.new > ${srcdir}/pkg/bin/services
65 rm ${srcdir}/pkg/bin/services.new
67 # install -dm755 "${srcdir}/pkg/bin" "${pkgdir}/usr/bin"
68 # install -dm744 "${srcdir}/pkg/data" "${pkgdir}/etc/anope"
69 # install -dm644 "${srcdir}/anope-$pkgver/docs" "${pkgdir}/usr/share/anope"
71 install -dm744 "${pkgdir}/etc"
72 mv "${srcdir}/pkg/data" "${pkgdir}/etc/anope"
73 install -dm755 "${pkgdir}/usr"
74 mv "${srcdir}/pkg/bin" "${pkgdir}/usr/bin"
75 install -dm744 "${pkgdir}/usr/share"
76 mv "${srcdir}/anope-$pkgver/docs" "${pkgdir}/usr/share/anope"
78 install -dm744 "${pkgdir}/var/log/anope"
79 install -Dm755 "${srcdir}/anope" "${pkgdir}/etc/rc.d/anope"
80 install -Dm644 "${srcdir}/anope-$pkgver/Changes" "${pkgdir}/usr/share/anope/CHANGES"