gearmand/gearmand.spec

111 lines
3.6 KiB
RPMSpec
Raw Normal View History

2021-09-12 17:16:23 +08:00
Name: gearmand
2023-04-14 10:32:47 +08:00
Version: 1.1.20
2021-09-12 17:16:23 +08:00
Release: 1
Summary: A distributed job system
License: BSD
URL: http://www.gearman.org
Source0: https://github.com/gearman/%{name}/releases/download/%{version}/gearmand-%{version}.tar.gz
Source1: gearmand.init
Source2: gearmand.sysconfig
Source3: gearmand.service
Patch0: gearmand-1.1.12-ppc64le.patch
ExcludeArch: ppc
BuildRequires: gcc-c++ chrpath libuuid-devel boost-devel >= 1.37.0, boost-thread sqlite-devel
BuildRequires: tokyocabinet-devel libevent-devel libmemcached-devel, memcached hiredis-devel
BuildRequires: gperf mariadb-connector-c-devel openssl-devel libpq-devel zlib-devel systemd
%ifarch %{ix86} x86_64 ppc64 ppc64le aarch64 %{arm}
BuildRequires: gperftools-devel
%endif
Requires(pre): shadow-utils
Requires: procps
%{?systemd_requires}
%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.
%package -n libgearman
Summary: Development libraries for gearman
Provides: libgearman-1.0 = %{version}-%{release}
Obsoletes: libgearman-1.0 < %{version}-%{release}
%description -n libgearman
Development libraries for %{name}.
%package -n libgearman-devel
Summary: Development headers for libgearman
Requires: pkgconfig, libgearman = %{version}-%{release} libevent-devel
Provides: libgearman-1.0-devel = %{version}-%{release}
Obsoletes: libgearman-1.0-devel < %{version}-%{release}
%description -n libgearman-devel
Development headers for %{name}.
%prep
2023-04-14 10:32:47 +08:00
%autosetup -p1
2021-09-12 17:16:23 +08:00
%build
%configure --disable-static --disable-silent-rules --enable-ssl
make %{_smp_mflags}
%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
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
%check
%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
%systemd_post gearmand.service
%preun
%systemd_preun gearmand.service
%postun
%systemd_postun_with_restart gearmand.service
%ldconfig_scriptlets -n libgearman
%files
%license COPYING
2023-04-14 10:32:47 +08:00
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
2021-09-12 17:16:23 +08:00
%config(noreplace) %{_sysconfdir}/sysconfig/gearmand
%{_sbindir}/gearmand
%{_bindir}/gearman
%{_bindir}/gearadmin
%{_mandir}/man1/*
%{_mandir}/man8/*
%{_unitdir}/%{name}.service
%files -n libgearman
%license COPYING
%{_libdir}/libgearman.so.8
%{_libdir}/libgearman.so.8.0.0
%files -n libgearman-devel
%license COPYING
2023-04-14 10:32:47 +08:00
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
2021-09-12 17:16:23 +08:00
%{_includedir}/libgearman/
%{_libdir}/pkgconfig/gearmand.pc
%{_libdir}/libgearman.so
%{_includedir}/libgearman-1.0/
%{_mandir}/man3/*
%changelog
2023-04-14 10:32:47 +08:00
* Fri Apr 14 2023 liyanan <thistleslyn@163.com> - 1.1.20-1
- Update to 1.1.20
2021-09-12 17:16:23 +08:00
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.1.19.1-1
- package init