2007-01-16 00:25:01 +01:00
|
|
|
#
|
2011-05-30 16:01:44 +02:00
|
|
|
# spec file for package memcached
|
2007-01-16 00:25:01 +01:00
|
|
|
#
|
2024-01-29 18:18:15 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-01-16 00:25:01 +01:00
|
|
|
#
|
2008-09-08 01:33:00 +02: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.
|
|
|
|
|
2018-10-03 16:28:48 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:25:01 +01:00
|
|
|
#
|
|
|
|
|
2012-11-11 01:21:18 +01:00
|
|
|
|
2017-11-23 15:59:50 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2018-08-21 09:03:54 +02:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-23 15:59:50 +01:00
|
|
|
%endif
|
2020-03-31 10:00:45 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without tls
|
|
|
|
%else
|
|
|
|
%bcond_with tls
|
|
|
|
%endif
|
2024-02-26 11:51:59 +01:00
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
%bcond_without sysusers
|
|
|
|
%bcond_without tmpfiles
|
|
|
|
%else
|
|
|
|
%bcond_with sysusers
|
|
|
|
%bcond_with tmpfiles
|
|
|
|
%endif
|
2007-01-16 00:25:01 +01:00
|
|
|
Name: memcached
|
2024-01-29 18:18:15 +01:00
|
|
|
Version: 1.6.23
|
2012-04-03 08:52:26 +02:00
|
|
|
Release: 0
|
2015-02-23 17:45:39 +01:00
|
|
|
Summary: A high-performance, distributed memory object caching system
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Networking/Other
|
2022-02-21 11:24:18 +01:00
|
|
|
URL: https://memcached.org/
|
|
|
|
Source: https://www.memcached.org/files/%{name}-%{version}.tar.gz
|
2015-02-23 17:45:39 +01:00
|
|
|
Source2: %{name}.sysconfig
|
2012-08-14 17:57:28 +02:00
|
|
|
Source4: memcached.service
|
2024-02-26 11:51:59 +01:00
|
|
|
Source5: %{name}-sysusers.conf
|
|
|
|
Source6: %{name}-tmpfiles.conf
|
2021-12-05 20:05:44 +01:00
|
|
|
Patch0: harden_memcached.service.patch
|
2015-02-23 17:45:39 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: cyrus-sasl-devel
|
2020-06-10 20:32:01 +02:00
|
|
|
BuildRequires: libevent-devel >= 2.0
|
2015-02-23 17:45:39 +01:00
|
|
|
BuildRequires: libtool
|
2022-11-15 16:36:46 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Conflicts: memcached-unstable
|
2020-03-31 10:00:45 +02:00
|
|
|
%if %{with tls}
|
|
|
|
BuildRequires: openssl-devel >= 1.1.0
|
2020-12-05 18:15:38 +01:00
|
|
|
BuildRequires: perl
|
2020-03-31 10:00:45 +02:00
|
|
|
BuildRequires: perl-IO-Socket-SSL
|
|
|
|
BuildRequires: perl-Net-SSLeay
|
|
|
|
%endif
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with sysusers}
|
2021-06-28 09:07:33 +02:00
|
|
|
BuildRequires: sysuser-tools
|
|
|
|
%sysusers_requires
|
|
|
|
%else
|
2015-02-23 17:45:39 +01:00
|
|
|
Requires(pre): %{_sbindir}/groupadd
|
|
|
|
Requires(pre): %{_sbindir}/useradd
|
2021-06-28 09:07:33 +02:00
|
|
|
%endif
|
2015-02-23 17:45:39 +01:00
|
|
|
%if 0%{?suse_version} > 1210
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2020-12-05 18:12:37 +01:00
|
|
|
%{?systemd_ordering}
|
2015-12-02 16:31:30 +01:00
|
|
|
%else
|
|
|
|
Requires(pre): %insserv_prereq
|
2012-11-07 21:01:31 +01:00
|
|
|
%endif
|
2015-02-23 17:45:39 +01:00
|
|
|
|
2007-01-16 00:25:01 +01:00
|
|
|
%description
|
2007-08-05 11:44:40 +02:00
|
|
|
Memcached is a high-performance, distributed memory object caching
|
2007-01-16 00:25:01 +01:00
|
|
|
system, generic in nature, but intended for use in speeding up dynamic
|
|
|
|
web applications by alleviating database load.
|
|
|
|
|
2015-02-23 17:45:39 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Files needed for development using memcached protocol
|
2018-03-09 10:12:26 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-02-23 17:45:39 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Memcached is a high-performance, distributed memory object caching
|
|
|
|
system, generic in nature, but intended for use in speeding up dynamic
|
|
|
|
web applications by alleviating database load.
|
|
|
|
|
|
|
|
This package contains development files
|
|
|
|
|
2007-01-16 00:25:01 +01:00
|
|
|
%prep
|
2024-03-01 13:40:36 +01:00
|
|
|
%autosetup -p1
|
2007-01-16 00:25:01 +01:00
|
|
|
|
|
|
|
%build
|
2020-04-03 14:39:43 +02:00
|
|
|
autoreconf -fi
|
2015-02-23 17:45:39 +01:00
|
|
|
%configure \
|
2020-03-31 10:00:45 +02:00
|
|
|
%if %{with tls}
|
|
|
|
--enable-tls \
|
|
|
|
%endif
|
|
|
|
--enable-sasl \
|
|
|
|
--enable-sasl-pwdb \
|
|
|
|
--enable-seccomp \
|
|
|
|
--disable-coverage \
|
2020-04-03 14:39:43 +02:00
|
|
|
%ifarch s390 s390x ppc ppc64
|
2022-11-15 16:36:46 +01:00
|
|
|
--disable-extstore
|
2020-03-31 10:00:45 +02:00
|
|
|
%endif
|
2012-08-14 17:57:28 +02:00
|
|
|
|
2022-11-15 16:36:46 +01:00
|
|
|
%make_build
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with sysusers}
|
|
|
|
%sysusers_generate_pre %{SOURCE5} %{name} %{name}-user.conf
|
2021-06-28 09:07:33 +02:00
|
|
|
%endif
|
2007-01-16 00:25:01 +01:00
|
|
|
|
|
|
|
%install
|
2018-08-21 09:03:54 +02:00
|
|
|
%make_install
|
2022-11-15 16:36:46 +01:00
|
|
|
install -D -m 0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
|
2018-04-10 14:21:35 +02:00
|
|
|
install -Dd -m 0751 %{buildroot}%{_localstatedir}/lib/%{name}
|
2017-11-23 15:59:50 +01:00
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name}
|
2022-11-15 16:36:46 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_sbindir}
|
2015-02-23 17:45:39 +01:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with sysusers}
|
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/%{name}-user.conf
|
|
|
|
%endif
|
|
|
|
%if %{with tmpfiles}
|
|
|
|
install -D -m 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
2021-06-28 09:07:33 +02:00
|
|
|
%endif
|
2012-11-07 21:01:31 +01:00
|
|
|
|
2018-04-20 09:34:47 +02:00
|
|
|
%check
|
2022-11-15 16:36:46 +01:00
|
|
|
%make_build test
|
2018-04-20 09:34:47 +02:00
|
|
|
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with sysusers}
|
2021-06-28 09:07:33 +02:00
|
|
|
%pre -f memcached.pre
|
|
|
|
%else
|
2022-02-21 11:24:18 +01:00
|
|
|
|
2007-01-16 00:25:01 +01:00
|
|
|
%pre
|
2020-12-05 18:12:37 +01:00
|
|
|
getent group %{name} >/dev/null || \
|
|
|
|
%{_sbindir}/groupadd -r %{name}
|
|
|
|
getent passwd %{name} >/dev/null || \
|
|
|
|
%{_sbindir}/useradd -g %{name} -s /bin/false -r \
|
|
|
|
-c "user for %{name}" -d %{_localstatedir}/lib/%{name} %{name}
|
2021-06-28 09:07:33 +02:00
|
|
|
%endif
|
2015-02-23 17:45:39 +01:00
|
|
|
%service_add_pre %{name}.service
|
2007-01-16 00:25:01 +01:00
|
|
|
|
|
|
|
%post
|
2015-02-23 17:45:39 +01:00
|
|
|
%service_add_post %{name}.service
|
|
|
|
%fillup_only %{name}
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with tmpfiles}
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
|
|
|
%endif
|
2012-11-07 21:01:31 +01:00
|
|
|
|
2007-01-16 00:25:01 +01:00
|
|
|
%preun
|
2015-02-23 17:45:39 +01:00
|
|
|
%service_del_preun %{name}.service
|
2007-01-16 00:25:01 +01:00
|
|
|
|
|
|
|
%postun
|
2015-02-23 17:45:39 +01:00
|
|
|
%service_del_postun %{name}.service
|
2007-01-16 00:25:01 +01:00
|
|
|
|
|
|
|
%files
|
2018-08-21 09:03:06 +02:00
|
|
|
%doc AUTHORS ChangeLog NEWS
|
2018-08-21 09:03:54 +02:00
|
|
|
%license COPYING
|
2022-11-15 16:36:46 +01:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_bindir}/memcached-tool
|
2015-02-23 17:45:39 +01:00
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
%{_mandir}/man1/%{name}.*
|
|
|
|
%{_unitdir}/%{name}.service
|
2017-11-23 15:59:50 +01:00
|
|
|
%{_fillupdir}/sysconfig.%{name}
|
2018-04-10 14:21:35 +02:00
|
|
|
%dir %attr(751,root,root) %{_localstatedir}/lib/%{name}
|
2024-02-26 11:51:59 +01:00
|
|
|
%if %{with sysusers}
|
|
|
|
%{_sysusersdir}/%{name}-user.conf
|
|
|
|
%endif
|
|
|
|
%if %{with tmpfiles}
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
%dir %ghost %{_rundir}/%{name}
|
2021-06-28 09:07:33 +02:00
|
|
|
%endif
|
2015-02-23 17:45:39 +01:00
|
|
|
|
|
|
|
%files devel
|
2018-08-21 09:03:06 +02:00
|
|
|
%doc AUTHORS ChangeLog NEWS doc/*.txt
|
2018-08-21 09:03:54 +02:00
|
|
|
%license COPYING
|
2015-02-23 17:45:39 +01:00
|
|
|
%{_includedir}/%{name}
|
2007-08-05 11:44:40 +02:00
|
|
|
|
|
|
|
%changelog
|