gearmand/gearmand.spec

145 lines
3.9 KiB
RPMSpec
Raw Normal View History

2009-05-05 11:53:14 +00:00
Name: gearmand
2023-11-18 10:20:59 +00:00
Version: 1.1.21
2021-08-16 06:11:55 +00:00
Release: %autorelease
2009-05-05 11:53:14 +00:00
Summary: A distributed job system
2023-11-18 10:20:59 +00:00
# migrated to SPDX
License: BSD-3-Clause
2009-05-05 11:53:14 +00:00
URL: http://www.gearman.org
Source0: https://github.com/gearman/%{name}/releases/download/%{version}/gearmand-%{version}.tar.gz
Source1: gearmand.init
2009-06-22 11:25:12 +00:00
Source2: gearmand.sysconfig
Source3: gearmand.service
2023-11-18 10:20:59 +00:00
Patch0: gearmand-1.1.21-ppc64le.patch
2013-07-22 18:20:16 +00:00
# Fails to build on PPC.
# See https://bugzilla.redhat.com/987104 and https://bugzilla.redhat.com/987109
2014-09-09 15:36:59 +00:00
ExcludeArch: ppc
2009-05-05 11:53:14 +00:00
BuildRequires: gcc-c++
BuildRequires: chrpath
BuildRequires: libuuid-devel
2012-08-14 21:39:17 +00:00
BuildRequires: boost-devel >= 1.37.0, boost-thread
BuildRequires: sqlite-devel
BuildRequires: tokyocabinet-devel
BuildRequires: libevent-devel
BuildRequires: libmemcached-devel, memcached
2017-09-05 16:42:38 +00:00
BuildRequires: hiredis-devel
BuildRequires: gperf
2017-09-23 06:17:43 +00:00
BuildRequires: mariadb-connector-c-devel openssl-devel
BuildRequires: libpq-devel
BuildRequires: zlib-devel
2020-02-20 16:39:30 +00:00
BuildRequires: systemd
2011-02-05 00:38:07 +00:00
# For %%check
2022-12-10 13:25:17 +00:00
# https://github.com/gearman/gearmand/issues/277
#BuildRequires: curl-devel
2009-05-05 11:53:14 +00:00
# google perftools available only on these
%ifarch %{ix86} x86_64 ppc64 ppc64le aarch64 %{arm}
2020-02-20 16:39:30 +00:00
BuildRequires: gperftools-devel
2009-05-05 11:53:14 +00:00
%endif
BuildRequires: make
2020-02-20 16:39:30 +00:00
Requires(pre): shadow-utils
Requires: procps
%{?systemd_requires}
2012-01-13 02:06:15 +00:00
2009-05-05 11:53:14 +00:00
%description
Gearman provides a generic framework to farm out work to other machines
or dispatch function calls to machines that are better suited to do the work.
It allows you to do work in parallel, to load balance processing, and to
call functions between languages. It can be used in a variety of applications,
from high-availability web sites to the transport for database replication.
In other words, it is the nervous system for how distributed processing
communicates.
2011-12-22 21:30:01 +00:00
%package -n libgearman
Summary: Development libraries for gearman
Provides: libgearman-1.0 = %{version}-%{release}
Obsoletes: libgearman-1.0 < %{version}-%{release}
2011-12-22 21:30:01 +00:00
%description -n libgearman
Development libraries for %{name}.
2009-05-05 11:53:14 +00:00
%package -n libgearman-devel
Summary: Development headers for libgearman
Requires: pkgconfig, libgearman = %{version}-%{release}
Requires: libevent-devel
Provides: libgearman-1.0-devel = %{version}-%{release}
Obsoletes: libgearman-1.0-devel < %{version}-%{release}
2009-05-05 11:53:14 +00:00
%description -n libgearman-devel
2011-12-22 21:30:01 +00:00
Development headers for %{name}.
2009-05-05 11:53:14 +00:00
%prep
2022-12-10 13:25:17 +00:00
%autosetup -p1
2009-05-05 11:53:14 +00:00
%build
%configure --disable-static --disable-silent-rules --enable-ssl
2022-01-18 12:03:09 +00:00
sed -i 's/ DRIZZLED_BINARY .*/ DRIZZLED_BINARY ""/' gear_config.h
2012-03-07 17:40:27 +00:00
make %{_smp_mflags}
2009-05-05 11:53:14 +00:00
%install
make install DESTDIR=%{buildroot}
rm -v %{buildroot}%{_libdir}/libgearman*.la
chrpath --delete %{buildroot}%{_bindir}/gearman
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/gearmand
2009-05-05 11:53:14 +00:00
2020-02-20 16:39:30 +00:00
# install systemd unit file
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
%check
2020-02-20 10:50:51 +00:00
# https://github.com/gearman/gearmand/issues/277
#make test
2009-05-05 11:53:14 +00:00
2009-05-05 11:53:14 +00:00
%pre
getent group gearmand >/dev/null || groupadd -r gearmand
getent passwd gearmand >/dev/null || \
useradd -r -g gearmand -d / -s /sbin/nologin \
-c "Gearmand job server" gearmand
exit 0
%post
2020-02-20 16:39:30 +00:00
%systemd_post gearmand.service
2009-05-05 11:53:14 +00:00
%preun
2020-02-20 16:39:30 +00:00
%systemd_preun gearmand.service
2009-05-05 11:53:14 +00:00
%postun
2020-02-20 16:39:30 +00:00
%systemd_postun_with_restart gearmand.service
2009-05-05 11:53:14 +00:00
%ldconfig_scriptlets -n libgearman
2009-05-05 11:53:14 +00:00
%files
%license COPYING
2022-12-10 13:25:17 +00:00
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
%config(noreplace) %{_sysconfdir}/sysconfig/gearmand
2009-05-05 11:53:14 +00:00
%{_sbindir}/gearmand
%{_bindir}/gearman
%{_bindir}/gearadmin
%{_mandir}/man1/*
%{_mandir}/man8/*
%{_unitdir}/%{name}.service
2009-05-05 11:53:14 +00:00
2011-12-22 21:30:01 +00:00
%files -n libgearman
%license COPYING
2012-10-18 20:03:22 +00:00
%{_libdir}/libgearman.so.8
%{_libdir}/libgearman.so.8.0.0
2009-05-05 11:53:14 +00:00
%files -n libgearman-devel
%license COPYING
2022-12-10 13:25:17 +00:00
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
2017-09-23 06:17:43 +00:00
%{_includedir}/libgearman/
2009-05-05 11:53:14 +00:00
%{_libdir}/pkgconfig/gearmand.pc
2011-12-22 21:30:01 +00:00
%{_libdir}/libgearman.so
%{_includedir}/libgearman-1.0/
%{_mandir}/man3/*
2009-05-05 11:53:14 +00:00
%changelog
2021-08-16 06:11:55 +00:00
%autochangelog