New package: anope-2.0.6
closes #8762 Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
This commit is contained in:
parent
84b13777ab
commit
68a01e41a4
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
exec anopeservices \
|
||||
--confdir=/etc/anope \
|
||||
--dbdir=/var/lib/anope \
|
||||
--localedir=/usr/share/locale \
|
||||
--logdir=/var/log/anope \
|
||||
--modulesdir=/usr/lib/anope \
|
||||
--nofork
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/src/language.cpp b/src/language.cpp
|
||||
index 8b7b0ee..9a97093 100644
|
||||
--- src/language.cpp
|
||||
+++ src/language.cpp
|
||||
@@ -75,7 +75,7 @@ const char *Language::Translate(const NickCore *nc, const char *string)
|
||||
|
||||
#if GETTEXT_FOUND
|
||||
|
||||
-#ifdef __USE_GNU_GETTEXT
|
||||
+#if defined(__USE_GNU_GETTEXT) && defined(_nl_msg_cat_cntr)
|
||||
extern "C" int _nl_msg_cat_cntr;
|
||||
#endif
|
||||
|
||||
@@ -87,7 +87,7 @@ const char *Language::Translate(const char *lang, const char *string)
|
||||
if (!lang || !*lang)
|
||||
lang = Config->DefLanguage.c_str();
|
||||
|
||||
-#ifdef __USE_GNU_GETTEXT
|
||||
+#if defined(__USE_GNU_GETTEXT) && defined(_nl_msg_cat_cntr)
|
||||
++_nl_msg_cat_cntr;
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
# Template file for 'anope'
|
||||
pkgname=anope
|
||||
version=2.0.6
|
||||
revision=1
|
||||
wrksrc="${pkgname}-${version}-source"
|
||||
build_style=cmake
|
||||
configure_args="-DINSTDIR=../install -DRUNGROUP=_anope -DDEFUMASK=077
|
||||
-DUSE_PCH=OFF"
|
||||
short_desc="Set of IRC Services designed for flexibility and ease of use"
|
||||
maintainer="ametisf <ametisf@gmail.com>"
|
||||
license="GPL-2.0-only"
|
||||
homepage="https://www.anope.org/"
|
||||
distfiles="https://github.com/anope/anope/releases/download/${version}/anope-${version}-source.tar.gz"
|
||||
checksum=546377755af33f5497a1f5811dfab7d289eaf07b644e4babd1de8d95b9936816
|
||||
|
||||
system_accounts="_anope"
|
||||
make_dirs="
|
||||
/etc/anope 755 root root
|
||||
/var/lib/anope 755 _anope _anope
|
||||
/var/log/anope 755 _anope _anope"
|
||||
|
||||
pre_configure() {
|
||||
# prevent cmake from building include/version and running
|
||||
# because it breaks cross compiling (cmake can't differentiate
|
||||
# between CXX and CXX_FOR_HOST)
|
||||
rm -v include/CMakeLists.txt
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
# replace removed include/version functionality
|
||||
(
|
||||
source src/version.sh
|
||||
echo "#define VERSION_EXTRA \"$VERSION_EXTRA\""
|
||||
echo "#define VERSION_MAJOR $VERSION_MAJOR"
|
||||
echo "#define VERSION_MINOR $VERSION_MINOR"
|
||||
echo "#define VERSION_PATCH $VERSION_PATCH"
|
||||
) > build/include/version.h
|
||||
echo "#define BUILD ${revision}" > build/include/build.h
|
||||
}
|
||||
|
||||
do_install() {
|
||||
cd build
|
||||
make install
|
||||
|
||||
cd ${wrksrc}/install
|
||||
|
||||
vbin bin/anopesmtp
|
||||
vbin bin/services anopeservices
|
||||
|
||||
for conffile in conf/*example.conf; do
|
||||
vsconf ${conffile}
|
||||
done
|
||||
|
||||
vmkdir /usr/share/anope
|
||||
vcopy data/* /usr/share/anope
|
||||
|
||||
vmkdir /usr/lib/anope
|
||||
vcopy lib/modules /usr/lib/anope
|
||||
|
||||
vcopy locale /usr/share
|
||||
|
||||
vsv anope
|
||||
}
|
Loading…
Reference in New Issue