summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Bergeron2017-10-21 19:53:18 +0000
committerTrevor Bergeron2017-10-21 19:53:18 +0000
commitd97151845681a3a9aec727c2d1962d4cedef9a58 (patch)
tree0c565a5667ca66c21e7fe8efba96696094dece1b
downloadaur-d97151845681a3a9aec727c2d1962d4cedef9a58.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD87
-rw-r--r--atheme.install20
-rw-r--r--atheme.service12
4 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3cdb37c3d1d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = atheme
+ pkgdesc = IRC services
+ pkgver = 7.2.9
+ pkgrel = 1
+ url = http://www.atheme.org/atheme/
+ install = atheme.install
+ arch = i686
+ arch = x86_64
+ license = custom:ISC
+ depends = qrencode
+ optdepends = pcre: for pcre support
+ optdepends = perl: for Perl support
+ optdepends = cracklib: cracklib support in NickServ
+ optdepends = libldap: LDAP support
+ conflicts = libmowgli
+ conflicts = xtheme
+ conflicts = atheme-git
+ backup = etc/atheme/atheme.conf
+ backup = etc/atheme/atheme.motd
+ source = https://github.com/atheme/atheme/releases/download/v7.2.9/atheme-7.2.9.tar.bz2
+ source = atheme.service
+ sha256sums = a87a046aa73fc4a97a11d41cc08c60b835135ba20bb173ca888b40e0d6b54b27
+ sha256sums = ee9ad7658434451184872c21c7fd38196d22d1dfb6b1f37bcfaf8c363d50296f
+
+pkgname = atheme
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a07ab843699
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Original: Maxime Poulin <maxpoulin64@gmail.com>
+# Maintainer: Trevor Bergeron <trevor@sec.gd>
+
+# Build options (yes/no/default)
+_large_network=default
+_pcre=default
+_perl=default
+_contrib=default
+_cracklib=default
+_ldap=default
+
+pkgname=atheme
+pkgver=7.2.9
+pkgrel=1
+pkgdesc="IRC services"
+arch=("i686" "x86_64")
+url="http://www.atheme.org/atheme/"
+license=('custom:ISC')
+# qrencode seems to be optional at build time but with no easy way to disable
+# it aside from uninstalling qrencode
+depends=('qrencode')
+conflicts=('libmowgli' 'xtheme' 'atheme-git')
+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=("https://github.com/atheme/atheme/releases/download/v${pkgver}/atheme-${pkgver}.tar.bz2"
+ "atheme.service"
+)
+sha256sums=('a87a046aa73fc4a97a11d41cc08c60b835135ba20bb173ca888b40e0d6b54b27'
+ 'ee9ad7658434451184872c21c7fd38196d22d1dfb6b1f37bcfaf8c363d50296f')
+
+build() {
+ cd "atheme-$pkgver"
+
+ _configure="./configure --prefix=/usr --enable-fhs-paths"
+ _configure+=" --sysconfdir=/etc/atheme --localstatedir=/var"
+
+ # By default, if you have libmowgli-2.so, it doesn't bother to build it.
+ # So it finds the version installed by atheme, doesn't build it, then when
+ # you install the new build, it's gone and atheme doesn't start.
+ # It's then absent from the system for the next build, so it's included.
+ # I can never get my saturday morning back.
+ _configure+=" --with-libmowgli=no"
+
+ [[ $_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 "atheme-$pkgver"
+ make DESTDIR="$pkgdir/" install
+ install -Dm0644 "$srcdir/atheme.service" "$pkgdir/usr/lib/systemd/system/atheme.service"
+
+ cd "$pkgdir"
+ rm -r var
+ install -dm755 -o142 -g142 var/lib/atheme/
+
+ install -d usr/share/licenses/atheme/
+ mv usr/share/doc/atheme/LICENSE usr/share/licenses/atheme/LICENSE
+
+ 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
+}
diff --git a/atheme.install b/atheme.install
new file mode 100644
index 00000000000..7000e05dbb1
--- /dev/null
+++ b/atheme.install
@@ -0,0 +1,20 @@
+create_user() {
+ getent group atheme &>/dev/null \
+ || groupadd -g 142 atheme
+
+ getent passwd atheme &>/dev/null \
+ || useradd atheme -u 142 -g 142 \
+ -d /var/lib/atheme -s /bin/false
+}
+
+post_install() {
+ create_user
+}
+
+post_upgrade() {
+ create_user
+}
+
+post_remove() {
+ getent passwd atheme &>/dev/null && userdel atheme
+}
diff --git a/atheme.service b/atheme.service
new file mode 100644
index 00000000000..2334559fad4
--- /dev/null
+++ b/atheme.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Atheme IRC services
+
+[Service]
+Type=simple
+User=atheme
+Group=atheme
+ExecStart=/usr/bin/atheme-services -n -p /var/lib/atheme/pid
+Restart=always
+
+[Install]
+WantedBy=network.target