forked from pool/atheme
- Fix useradd invocation: -o is useless without -u and newer versions of pwdutils/shadowutils fail on this now. This did not cause errors as it's masked away with || ;; OBS-URL: https://build.opensuse.org/request/show/141955 OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=43
168 lines
4.8 KiB
RPMSpec
168 lines
4.8 KiB
RPMSpec
#
|
|
# spec file for package atheme
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: atheme
|
|
%define pkg_name atheme-services
|
|
%define lname libathemecore1
|
|
Version: 7.0.2
|
|
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
|
|
#DL-URL: http://atheme.net/downloads/atheme-services-6.0.10.tar.bz2
|
|
Source: %name-services-%version.tar.xz
|
|
Source1: atheme.init
|
|
Patch1: atheme-lockmodes.diff
|
|
Patch2: atheme-config.diff
|
|
Patch3: atheme-pkgconfig.diff
|
|
Patch4: atheme-pkgconfig2.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: cracklib-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: openldap2-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: xz
|
|
BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0
|
|
BuildRequires: pkgconfig(libpcre)
|
|
%define atheme_home /var/lib/atheme
|
|
%define atheme_log /var/log/atheme
|
|
%define atheme_run /var/run/atheme
|
|
Requires(pre): pwdutils
|
|
|
|
%description
|
|
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
|
|
|
|
This package contains the development headers for the library found
|
|
in %lname.
|
|
|
|
%prep
|
|
%setup -qn %name-services-%version
|
|
%patch -P 1 -P 2 -P 3 -P 4 -p1
|
|
# use system libmowgli
|
|
rm -Rf libmowgli*;
|
|
|
|
%build
|
|
%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030
|
|
export CFLAGS="%optflags -fstack-protector"
|
|
%endif
|
|
%configure \
|
|
--sysconfdir="%_sysconfdir/%name" \
|
|
--bindir="%_sbindir" \
|
|
--docdir="%_docdir/%name" \
|
|
--enable-fhs-paths \
|
|
--enable-warnings \
|
|
--enable-large-net \
|
|
--with-pcre \
|
|
--enable-contrib
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
b="%buildroot";
|
|
%makeinstall DOCDIR="%_docdir/%name"
|
|
|
|
# additional documentation
|
|
mkdir -p "$b/%_docdir/%name"
|
|
install -m 0644 contrib/*.php contrib/*.pl TODO "$b/%_docdir/%name"
|
|
#mv -v "$b/%_sysconfdir/%name/atheme.chk.sample" "$b/%_docdir/%name"
|
|
|
|
# init scripts
|
|
install -Dm 0755 "%{S:1}" "$b/%_sysconfdir/init.d/%name";
|
|
ln -sf "%_sysconfdir/init.d/%name" "$b/%_sbindir/rc%name";
|
|
|
|
# config files
|
|
# TODO: check if we should change any defaults and patch it.
|
|
cp -v "$b/%_sysconfdir/%name"/atheme.conf{.example,}
|
|
cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,}
|
|
%find_lang %name
|
|
%fdupes %buildroot
|
|
|
|
%pre
|
|
/usr/bin/getent group atheme >/dev/null 2>/dev/null || \
|
|
/usr/sbin/groupadd -r atheme >/dev/null || :;
|
|
/usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \
|
|
/usr/sbin/useradd -r -g atheme -s /bin/false \
|
|
-c "%name daemon" -d "%atheme_home" atheme >/dev/null || :;
|
|
|
|
%preun
|
|
%stop_on_removal %name
|
|
|
|
%post
|
|
%fillup_and_insserv %name
|
|
|
|
%postun
|
|
%restart_on_update %name
|
|
%insserv_cleanup
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
%files -f %name.lang
|
|
%defattr(-,root,root)
|
|
%_sysconfdir/init.d/%name
|
|
%_sbindir/rc%name
|
|
%dir %attr(750,root,atheme) %_sysconfdir/%name
|
|
%config(noreplace) %attr(640,root,atheme) %_sysconfdir/%name/atheme.conf
|
|
%config(noreplace) %attr(640,root,atheme) %_sysconfdir/%name/atheme.motd
|
|
%_sysconfdir/%name/*example
|
|
%_sbindir/dbverify
|
|
%_sbindir/atheme-services
|
|
%_libdir/%name
|
|
%_datadir/%name
|
|
%doc %_docdir/%name
|
|
%dir %attr(750,atheme,atheme) %atheme_home
|
|
%dir %attr(750,atheme,atheme) %atheme_run
|
|
%dir %attr(750,atheme,atheme) %atheme_log
|
|
|
|
%files -n %lname
|
|
%defattr(-,root,root)
|
|
%_libdir/libathemecore.so.1*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%_includedir/atheme
|
|
%_libdir/libathemecore.so
|
|
%_libdir/pkgconfig/atheme-services.pc
|
|
|
|
%changelog
|