updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / anope / PKGBUILD
blob5fd02abbed568c6756c0614ee83ce82cfe0290c9
1 # Maintainer: Adam Eberlin < ae at adameberlin dot com >
3 pkgname=anope
4 pkgver=1.9.0
5 pkgrel=1
6 pkgdesc="Anope is a set of IRC Services designed for flexibility and ease of use."
7 arch=('i686' 'x86_64')
8 conflicts=('anope-svn')
9 depends=()
10 license=('GPL') 
11 optdepends=("mysql")
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")
17 md5sums=()
19 build() {
20         cd ${srcdir}
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
29         make || return 1
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
38   #
39   # String Replacement:
40   #
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
45   #
46   # File Relocation:
47   #
48   #     ${srcdir}/pkg/bin                               -> ${pkgdir}/usr/bin
49   #     ${srcdir}/pkg/data              -> ${pkgdir}/etc/anope
50   #
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"
83 # vim:syntax=sh