mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-12-21 22:18:48 -05:00
Add inspircd
This commit is contained in:
parent
a65c388e0a
commit
ee02004ef1
68
src/inspircd/PKGBUILD
Normal file
68
src/inspircd/PKGBUILD
Normal file
@ -0,0 +1,68 @@
|
||||
# Maintainer: Maxime Poulin <maxpoulin64@gmail.com>
|
||||
# Contributor: Damian Nowak <damian.nowak@atlashost.eu>
|
||||
# Contributor: Kyle Fuller <inbox@kylefuller.co.uk>
|
||||
# Contributor: jibi <jibi@paranoici.org>
|
||||
|
||||
pkgname='inspircd'
|
||||
pkgver='2.0.26'
|
||||
pkgrel='1'
|
||||
pkgdesc='A stable, modern and lightweight IRC daemon'
|
||||
arch=('any')
|
||||
url='http://www.inspircd.org/'
|
||||
license=('GPL2')
|
||||
conflicts=('inspircd')
|
||||
provides=('inspircd')
|
||||
depends=('perl' 'openssl')
|
||||
makedepends=('pkg-config' 'geoip')
|
||||
optdepends=('geoip: m_geoip')
|
||||
install='inspircd.install'
|
||||
source=("https://github.com/inspircd/inspircd/archive/v$pkgver.tar.gz"
|
||||
"https://raw.githubusercontent.com/inspircd/inspircd-extras/master/2.0/m_rehashsslsignal.cpp"
|
||||
'inspircd.service')
|
||||
sha512sums=('950982629eab0dabeac9e7f2ab6e8b923bc5dafa978280cb91aa28c40997b7cfac2e4d39d74bb4c9cdb8f818205cc17bf782ec86f0aae966cb9c47bbf8143d1a'
|
||||
'a5f2a01bbc3e3ba0d5979d5146818edc3c6cfe975f1cdd84b7bb8ceb6ea734d2b3e1cfa8a41551b3ef622df508baddcc0c6f6fe79239026eed6c23cc9e31984f'
|
||||
'5a16a7c237693ffc6a108358f339b6aa2451fb16430561848ae869f890199b38fab6a13640bcc35cf1d07e32d7e5fff405d88668ee05ddaffc2ef61cb42ee832')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/inspircd-${pkgver}"
|
||||
|
||||
cp "${srcdir}/m_rehashsslsignal.cpp" src/modules/extra/
|
||||
|
||||
./configure \
|
||||
--enable-extras=m_geoip.cpp \
|
||||
--enable-extras=m_rehashsslsignal.cpp \
|
||||
--enable-extras=m_ssl_openssl.cpp
|
||||
# --enable-extras=m_ldapauth.cpp \
|
||||
# --enable-extras=m_ldapoper.cpp \
|
||||
# --enable-extras=m_mysql.cpp \
|
||||
# --enable-extras=m_regex_pcre.cpp \
|
||||
# --enable-extras=m_regex_posix.cpp
|
||||
# --enable-extras=m_sqlite3.cpp
|
||||
|
||||
./configure \
|
||||
--enable-openssl \
|
||||
--uid=0 \
|
||||
--prefix=/usr/lib/inspircd \
|
||||
--binary-dir=/usr/bin \
|
||||
--module-dir=/usr/lib/inspircd/modules \
|
||||
--config-dir=/etc/inspircd \
|
||||
--data-dir=/var/lib/inspircd \
|
||||
--log-dir=/var/log/inspircd \
|
||||
--enable-epoll
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "${srcdir}"/inspircd.service "${pkgdir}"/usr/lib/systemd/system/inspircd.service
|
||||
install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd" "${pkgdir}/var/lib/inspircd"
|
||||
|
||||
cd "${srcdir}/inspircd-${pkgver}"
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
mkdir -p "${pkgdir}"/usr/share/inspircd
|
||||
mv "${pkgdir}"/etc/inspircd/examples "${pkgdir}"/usr/share/inspircd/examples
|
||||
|
||||
rm -rf "${pkgdir}"/usr/lib/inspircd/logs
|
||||
rm -rf "${pkgdir}"/usr/lib/inspircd/data
|
||||
}
|
21
src/inspircd/inspircd.install
Normal file
21
src/inspircd/inspircd.install
Normal file
@ -0,0 +1,21 @@
|
||||
create_user() {
|
||||
getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd >/dev/null
|
||||
getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d /var/lib/inspircd -s /bin/false inspircd >/dev/null
|
||||
}
|
||||
|
||||
post_install() {
|
||||
create_user
|
||||
echo '==> You will need to create a config file for inspircd'
|
||||
echo '==> cp /usr/share/inspircd/examples/inspircd.conf.example /etc/inspircd/inspircd.conf'
|
||||
echo '==> You will need to change the pidfile. To do this you can insert the following into your config.'
|
||||
echo '==> <pid file="/var/lib/inspircd/inspircd.pid">'
|
||||
echo '==> Remember to use absolute paths in your config directory and not relative paths like you would do with a user-based inspircd install.'
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
create_user
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
getent passwd inspircd &>/dev/null && userdel inspircd
|
||||
}
|
17
src/inspircd/inspircd.service
Normal file
17
src/inspircd/inspircd.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=InspIRCd IRC daemon
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/lib/inspircd/inspircd.pid
|
||||
ExecStart=/usr/lib/inspircd/inspircd start
|
||||
ExecReload=/usr/lib/inspircd/inspircd rehash
|
||||
ExecStop=/usr/lib/inspircd/inspircd stop
|
||||
Restart=always
|
||||
User=inspircd
|
||||
Group=inspircd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user