- fix build on older distros
- memcached-autofoo.patch: removed no-dist-gzip dist-xz - added new conditional to guard all the systemd stuff and guarded the general bcond_without with an suse_version > 12.2 - export LIBEVENT_CFLAGS and LIBEVENT_LIBS so we dont need pkgconfig check for libevent on sles11 - use makeinstall instead of make_install OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=13
This commit is contained in:
parent
ef8e3127fd
commit
4bd42a26f7
@ -59,7 +59,7 @@
|
|||||||
-if test "$ICC" = "no"; then
|
-if test "$ICC" = "no"; then
|
||||||
- AC_PROG_CC_C99
|
- AC_PROG_CC_C99
|
||||||
-fi
|
-fi
|
||||||
+AM_INIT_AUTOMAKE([foreign -Wall -Wno-portability tar-pax no-dist-gzip dist-xz subdir-objects])
|
+AM_INIT_AUTOMAKE([foreign -Wall -Wno-portability tar-pax subdir-objects])
|
||||||
+AC_CONFIG_HEADERS([config.h])
|
+AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
+AC_PROG_CC_STDC
|
+AC_PROG_CC_STDC
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 7 19:58:59 UTC 2012 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- fix build on older distros
|
||||||
|
- memcached-autofoo.patch: removed no-dist-gzip dist-xz
|
||||||
|
- added new conditional to guard all the systemd stuff and
|
||||||
|
guarded the general bcond_without with an suse_version > 12.2
|
||||||
|
- export LIBEVENT_CFLAGS and LIBEVENT_LIBS so we dont need
|
||||||
|
pkgconfig check for libevent on sles11
|
||||||
|
- use makeinstall instead of make_install
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 14 02:50:12 UTC 2012 - crrodriguez@opensuse.org
|
Tue Aug 14 02:50:12 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1210
|
||||||
|
%bcond_without systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: memcached
|
Name: memcached
|
||||||
Version: 1.4.14
|
Version: 1.4.14
|
||||||
@ -32,7 +35,9 @@ BuildRequires: libevent
|
|||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
%if %{with systemd}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
%endif
|
||||||
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/sbin/useradd
|
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/sbin/useradd
|
||||||
Conflicts: memcached-unstable
|
Conflicts: memcached-unstable
|
||||||
%define home_dir /var/lib/%{pkg_name}
|
%define home_dir /var/lib/%{pkg_name}
|
||||||
@ -50,8 +55,9 @@ Patch2: memcached-use-endian_h.patch
|
|||||||
Summary: A high-performance, distributed memory object caching system
|
Summary: A high-performance, distributed memory object caching system
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Productivity/Networking/Other
|
Group: Productivity/Networking/Other
|
||||||
|
%if %{with systemd}
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
%description
|
%description
|
||||||
Memcached is a high-performance, distributed memory object caching
|
Memcached is a high-performance, distributed memory object caching
|
||||||
system, generic in nature, but intended for use in speeding up dynamic
|
system, generic in nature, but intended for use in speeding up dynamic
|
||||||
@ -73,6 +79,10 @@ miss.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
|
%if 0%{?suse_version} == 1110
|
||||||
|
export LIBEVENT_CFLAGS="-I%{_includedir}"
|
||||||
|
export LIBEVENT_LIBS="-levent"
|
||||||
|
%endif
|
||||||
%configure --enable-sasl --disable-coverage --bindir=%{_sbindir}
|
%configure --enable-sasl --disable-coverage --bindir=%{_sbindir}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -81,32 +91,44 @@ make %{?_smp_mflags}
|
|||||||
%{__make} test
|
%{__make} test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%makeinstall
|
||||||
%{__install} -D -m 0755 scripts/memcached-tool %{buildroot}%{_sbindir}/memcached-tool
|
%{__install} -D -m 0755 scripts/memcached-tool %{buildroot}%{_sbindir}/memcached-tool
|
||||||
%{__install} -Dd -m 0755 %{buildroot}%{home_dir}
|
%{__install} -Dd -m 0755 %{buildroot}%{home_dir}
|
||||||
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
|
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
|
||||||
%{__ln_s} -f ../..%{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
|
%{__ln_s} -f ../..%{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
|
||||||
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
|
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
|
||||||
|
%if %{with systemd}
|
||||||
%{__install} -D -m 0644 %{S:4} %{buildroot}%{_unitdir}/%{pkg_name}.service
|
%{__install} -D -m 0644 %{S:4} %{buildroot}%{_unitdir}/%{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{__rm} -rf %{buildroot};
|
%{__rm} -rf %{buildroot};
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r %{pkg_name} &>/dev/null || :
|
/usr/sbin/groupadd -r %{pkg_name} &>/dev/null || :
|
||||||
/usr/sbin/useradd -o -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{home_dir} %{pkg_name} &>/dev/null || :
|
/usr/sbin/useradd -o -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{home_dir} %{pkg_name} &>/dev/null || :
|
||||||
|
%if %{with systemd}
|
||||||
%service_add_pre %{pkg_name}.service
|
%service_add_pre %{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%fillup_and_insserv %{pkg_name}
|
%fillup_and_insserv %{pkg_name}
|
||||||
|
%if %{with systemd}
|
||||||
%service_add_post %{pkg_name}.service
|
%service_add_post %{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal %{pkg_name}
|
%stop_on_removal %{pkg_name}
|
||||||
|
%if %{with systemd}
|
||||||
%service_del_preun %{pkg_name}.service
|
%service_del_preun %{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update %{pkg_name}
|
%restart_on_update %{pkg_name}
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
|
%if %{with systemd}
|
||||||
%service_del_postun %{pkg_name}.service
|
%service_del_postun %{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -120,6 +142,8 @@ make %{?_smp_mflags}
|
|||||||
%{_includedir}/%{pkg_name}
|
%{_includedir}/%{pkg_name}
|
||||||
/var/adm/fillup-templates/sysconfig.%{pkg_name}
|
/var/adm/fillup-templates/sysconfig.%{pkg_name}
|
||||||
%dir %attr(755,root,root) %{home_dir}
|
%dir %attr(755,root,root) %{home_dir}
|
||||||
|
%if %{with systemd}
|
||||||
%{_unitdir}/%{pkg_name}.service
|
%{_unitdir}/%{pkg_name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user