-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
79 lines (66 loc) · 1.89 KB
/
PKGBUILD
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Maintainer: Maxime Poulin <[email protected]>
# Build options (yes/no/default)
_large_network=default
_pcre=default
_perl=default
_contrib=default
_cracklib=default
_ldap=default
pkgname=atheme
pkgver=7.2.6
pkgrel=1
pkgdesc="Atheme IRC services"
arch=("i686" "x86_64")
url="http://www.atheme.org/atheme/"
license=('MIT')
depends=('bash')
conflicts=('libmowgli' 'atheme')
optdepends=(
'pcre: for pcre support'
'perl: for Perl support'
'cracklib: cracklib support in NickServ'
'libldap: LDAP support'
)
backup=(
'etc/atheme/atheme.conf'
'etc/atheme/atheme.motd'
)
install=atheme.install
source=(
"atheme::git+https://github.com/atheme/atheme.git#tag=atheme-$pkgver"
"system.service"
)
md5sums=("SKIP" "SKIP")
prepare() {
cd "$srcdir/atheme"
git submodule update --init
}
build() {
cd "$srcdir/atheme"
_configure="./configure --prefix=/usr --enable-fhs-paths"
_configure+=" --sysconfdir=/etc/atheme --localstatedir=/var"
[[ $_large_network = yes ]] && _configure+=" --enable-large-net"
[[ $_contrib = yes ]] && _configure+=" --enable-contrib"
[[ $_pcre = yes ]] && _configure+=" --with-pcre"
[[ $_pcre = no ]] && _configure+=" --without-pcre"
[[ $_pcre = yes ]] && _configure+=" --with-pcre"
[[ $_pcre = no ]] && _configure+=" --without-pcre"
eval $_configure
make
}
package() {
cd "$srcdir/atheme"
make DESTDIR="$pkgdir/" install
install -Dm0644 "$srcdir/system.service" "$pkgdir/usr/lib/systemd/system/atheme.service"
cd "$pkgdir"
rm -r var
install -dm755 -o142 -g142 var/lib/atheme/
chmod 0755 etc/atheme/
chmod 0644 etc/atheme/*
install -dm755 usr/share/doc/atheme/config/
mv etc/atheme/atheme.conf.example etc/atheme/atheme.conf
mv etc/atheme/atheme.conf.operserv-example usr/share/doc/atheme/config/
mv etc/atheme/atheme.conf.userserv-example usr/share/doc/atheme/config/
mv etc/atheme/atheme.motd.example etc/atheme/atheme.motd
rm etc/atheme/atheme.cron.example
}