2011-08-04 10:38:16 +00:00
|
|
|
#
|
|
|
|
# spec file for package atheme
|
|
|
|
#
|
2016-05-04 09:33:15 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-08-04 10:38:16 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-05-31 13:20:04 +00:00
|
|
|
|
2011-08-04 10:38:16 +00:00
|
|
|
Name: atheme
|
2012-05-31 13:20:04 +00:00
|
|
|
%define lname libathemecore1
|
2016-05-04 09:33:15 +00:00
|
|
|
Version: 7.2.6
|
2012-05-31 13:20:04 +00:00
|
|
|
Release: 0
|
|
|
|
Url: http://atheme.net/
|
|
|
|
Summary: A portable, secure set of open source, modular IRC services
|
|
|
|
License: MIT
|
|
|
|
Group: Productivity/Networking/IRC
|
|
|
|
|
|
|
|
#Git-Clone: git://github.com/atheme/atheme
|
2016-05-04 09:33:15 +00:00
|
|
|
Source: https://github.com/atheme/atheme/archive/%name-%version.tar.gz
|
2014-10-09 14:34:42 +00:00
|
|
|
Source9: example.conf
|
2012-05-31 13:20:04 +00:00
|
|
|
Patch1: atheme-lockmodes.diff
|
2016-05-04 09:33:15 +00:00
|
|
|
Patch2: atheme-nodate.diff
|
|
|
|
Patch3: atheme-serno.diff
|
2016-05-04 10:08:18 +00:00
|
|
|
Patch4: 0001-Do-not-copy-more-bytes-than-were-allocated.patch
|
|
|
|
Patch5: 0001-chanserv-flags-make-Anope-FLAGS-compatibility-an-opt.patch
|
2011-08-04 10:38:16 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-05-31 13:20:04 +00:00
|
|
|
BuildRequires: cracklib-devel
|
2012-06-06 20:48:38 +00:00
|
|
|
BuildRequires: fdupes
|
2012-01-12 15:50:35 +00:00
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: openldap2-devel
|
2014-10-09 14:34:42 +00:00
|
|
|
BuildRequires: pkg-config
|
2014-07-31 17:00:13 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2014-07-20 20:18:24 +00:00
|
|
|
BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0.g185
|
2012-05-31 13:20:04 +00:00
|
|
|
BuildRequires: pkgconfig(libpcre)
|
2014-07-20 20:18:24 +00:00
|
|
|
BuildRequires: pkgconfig(libqrencode)
|
2006-11-25 04:24:53 +00:00
|
|
|
%define atheme_home /var/lib/atheme
|
|
|
|
%define atheme_log /var/log/atheme
|
2014-10-09 14:34:42 +00:00
|
|
|
%define atheme_run /run/atheme
|
2011-08-02 07:52:16 +00:00
|
|
|
Requires(pre): pwdutils
|
|
|
|
|
2006-11-25 04:24:53 +00:00
|
|
|
%description
|
2012-05-31 13:20:04 +00:00
|
|
|
Atheme is a portable, secure set of open source, modular IRC services
|
|
|
|
released under the BSD license, designed to run on many IRCds.
|
|
|
|
|
|
|
|
Unlike alternative packages, Atheme's core is minimalistic, providing
|
|
|
|
only core functionality. Atheme is a complete services set, excluding
|
|
|
|
features designed for oper abuse.
|
|
|
|
|
|
|
|
%package -n %lname
|
|
|
|
Summary: The Atheme IRC Services core library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
Atheme is a portable, secure set of open source, modular IRC services
|
|
|
|
released under the BSD license, designed to run on many IRCds.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for the Atheme IRC Services core
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname = %version
|
|
|
|
|
|
|
|
%description devel
|
2012-11-21 00:03:06 +00:00
|
|
|
Atheme is a portable, secure set of open source, modular IRC services
|
|
|
|
released under the BSD license, designed to run on many IRCds.
|
2006-11-25 04:24:53 +00:00
|
|
|
|
2012-05-31 13:20:04 +00:00
|
|
|
This package contains the development headers for the library found
|
|
|
|
in %lname.
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%prep
|
2016-05-04 09:33:15 +00:00
|
|
|
%setup -qn %name-%name-%version
|
2016-05-04 10:08:18 +00:00
|
|
|
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
2016-05-04 09:33:15 +00:00
|
|
|
# nudge atheme in the direction of using the system-provided libmowgli
|
2014-07-20 20:18:24 +00:00
|
|
|
rm -Rf libmowgli-2
|
2016-05-04 09:33:15 +00:00
|
|
|
# ignore contrib modules
|
2014-12-04 09:34:58 +00:00
|
|
|
mkdir -p libmowgli-2 modules/contrib
|
|
|
|
touch libmowgli-2/Makefile modules/contrib/Makefile
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%build
|
2012-11-21 00:03:06 +00:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2016-05-04 09:33:15 +00:00
|
|
|
export RUNDIR="/run"
|
2012-11-21 00:03:06 +00:00
|
|
|
%endif
|
2006-11-25 04:24:53 +00:00
|
|
|
%configure \
|
2012-05-31 13:20:04 +00:00
|
|
|
--sysconfdir="%_sysconfdir/%name" \
|
|
|
|
--bindir="%_sbindir" \
|
|
|
|
--docdir="%_docdir/%name" \
|
2006-11-25 04:24:53 +00:00
|
|
|
--enable-fhs-paths \
|
|
|
|
--enable-warnings \
|
2010-03-09 23:23:44 +00:00
|
|
|
--enable-large-net \
|
2016-05-04 09:33:15 +00:00
|
|
|
--with-pcre
|
2006-11-25 04:24:53 +00:00
|
|
|
|
2011-08-02 07:52:16 +00:00
|
|
|
make %{?_smp_mflags}
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%install
|
2012-11-21 00:03:06 +00:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2016-05-04 09:33:15 +00:00
|
|
|
export RUNDIR="/run"
|
2012-11-21 00:03:06 +00:00
|
|
|
%endif
|
2012-05-31 13:20:04 +00:00
|
|
|
b="%buildroot";
|
2016-05-04 09:33:15 +00:00
|
|
|
%make_install DOCDIR="%_docdir/%name"
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
# additional documentation
|
2012-05-31 13:20:04 +00:00
|
|
|
mkdir -p "$b/%_docdir/%name"
|
|
|
|
install -m 0644 contrib/*.php contrib/*.pl TODO "$b/%_docdir/%name"
|
2006-11-25 04:24:53 +00:00
|
|
|
|
2012-11-21 00:03:06 +00:00
|
|
|
mkdir -p "$b/%_unitdir" "$b/%_libexecdir/tmpfiles.d";
|
2014-07-31 17:00:13 +00:00
|
|
|
ln -s service "$b/%_sbindir/rcatheme"
|
2014-10-09 14:34:42 +00:00
|
|
|
cat >"$b/%_unitdir/atheme.service" <<-EOF
|
|
|
|
[Unit]
|
|
|
|
Description=Atheme IRC Services
|
|
|
|
[Service]
|
|
|
|
ExecStart=/usr/sbin/atheme-services -n
|
|
|
|
User=atheme
|
|
|
|
Group=atheme
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
EOF
|
|
|
|
cat >"$b/%_prefix/lib/tmpfiles.d/atheme.conf" <<-EOF
|
|
|
|
d /run/atheme 0755 atheme atheme -
|
|
|
|
EOF
|
2012-11-21 00:03:06 +00:00
|
|
|
|
2014-10-10 20:25:01 +00:00
|
|
|
mv "$b/%_sysconfdir/%name"/*example "$b/%_docdir/%name/"
|
|
|
|
install -pm0644 "%{S:9}" "$b/%_sysconfdir/%name/atheme.conf"
|
2010-03-09 23:23:44 +00:00
|
|
|
%find_lang %name
|
2012-11-23 18:51:34 +00:00
|
|
|
%fdupes %buildroot/%_prefix
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%pre
|
2011-08-02 07:52:16 +00:00
|
|
|
/usr/bin/getent group atheme >/dev/null 2>/dev/null || \
|
2016-05-04 09:33:15 +00:00
|
|
|
/usr/sbin/groupadd -r atheme >/dev/null || :
|
2011-08-02 07:52:16 +00:00
|
|
|
/usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \
|
2012-11-19 19:42:31 +00:00
|
|
|
/usr/sbin/useradd -r -g atheme -s /bin/false \
|
2012-11-23 18:29:42 +00:00
|
|
|
-c "Atheme IRC Services daemon" -d "%atheme_home" \
|
2016-05-04 09:33:15 +00:00
|
|
|
atheme >/dev/null || :
|
2012-11-21 00:03:06 +00:00
|
|
|
%service_add_pre atheme.service
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%post
|
2012-11-21 00:03:06 +00:00
|
|
|
%service_add_post atheme.service
|
2014-08-09 12:48:24 +00:00
|
|
|
systemd-tmpfiles --create atheme.conf || :
|
2012-11-21 00:03:06 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun atheme.service
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%postun
|
2012-11-21 00:03:06 +00:00
|
|
|
%service_del_postun atheme.service
|
2006-11-25 04:24:53 +00:00
|
|
|
|
2014-10-09 14:34:42 +00:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
2012-06-06 20:48:38 +00:00
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
2012-05-31 13:20:04 +00:00
|
|
|
%files -f %name.lang
|
|
|
|
%defattr(-,root,root)
|
2014-10-09 14:34:42 +00:00
|
|
|
%dir %attr(750,root,atheme) %_sysconfdir/%name/
|
2012-05-31 13:20:04 +00:00
|
|
|
%config(noreplace) %attr(640,root,atheme) %_sysconfdir/%name/atheme.conf
|
2014-10-09 14:34:42 +00:00
|
|
|
%config(noreplace) %attr(644,root,atheme) %_sysconfdir/%name/atheme.motd
|
2012-05-31 13:20:04 +00:00
|
|
|
%_sbindir/atheme-services
|
2014-10-09 14:34:42 +00:00
|
|
|
%_sbindir/dbverify
|
|
|
|
%_sbindir/ecdsakeygen
|
2014-07-31 17:00:13 +00:00
|
|
|
%_sbindir/rcatheme
|
2014-10-09 14:34:42 +00:00
|
|
|
%_libdir/%name/
|
|
|
|
%_datadir/%name/
|
|
|
|
%_docdir/%name/
|
2012-05-31 13:20:04 +00:00
|
|
|
%dir %attr(750,atheme,atheme) %atheme_home
|
|
|
|
%dir %attr(750,atheme,atheme) %atheme_log
|
2012-11-21 00:03:06 +00:00
|
|
|
%_unitdir/*.service
|
2014-10-09 14:34:42 +00:00
|
|
|
%_libexecdir/tmpfiles.d/
|
2012-05-31 13:20:04 +00:00
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libathemecore.so.1*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2014-10-09 14:34:42 +00:00
|
|
|
%_includedir/atheme/
|
2012-05-31 13:20:04 +00:00
|
|
|
%_libdir/libathemecore.so
|
|
|
|
%_libdir/pkgconfig/atheme-services.pc
|
2006-11-25 04:24:53 +00:00
|
|
|
|
|
|
|
%changelog
|