]> git.pld-linux.org Git - packages/gearmand.git/blame - gearmand.spec
- release 3 (by relup.sh)
[packages/gearmand.git] / gearmand.spec
CommitLineData
36bbbd00
ER
1# TODO
2# - fix make install linking stuff over again
3# - skip tests build if testing disabled
9ea1c03f 4# - libpq vs postgresql, which one matters?
586943c9
ER
5# - tmpfiles conf
6# - logrotate
36bbbd00
ER
7#
8# Conditional build:
9%bcond_with tests # build with tests
10%bcond_without gperftools # gperftools
9ea1c03f
ER
11%bcond_without sqlite3 # use SQLite 3 library [default=yes]
12%bcond_without libtokyocabinet # Build with libtokyocabinet support [default=on]
13%bcond_without libmemcached # Build with libmemcached support [default=on]
14%bcond_without hiredis # Build with hiredis support [default=on]
15%bcond_without libpq # Build with libpq, ie Postgres, support [default=on]
16%bcond_without mysql # use MySQL client library [default=yes]
17%bcond_without postgresql # use PostgreSQL library [default=yes]
18%bcond_with libdrizzle # Build with libdrizzle support [default=on]
36bbbd00
ER
19
20# google perftools available only on these
21%ifnarch %{ix86} x86_64 ppc64 ppc64le aarch64 %{arm}
22%undefine with_gperftools
23%endif
24
36bbbd00
ER
25Summary: A distributed job system
26Name: gearmand
aa7b9951 27Version: 1.1.18
8d63cb2b 28Release: 3
36bbbd00
ER
29License: BSD
30Group: Daemons
aa7b9951
JR
31Source0: https://github.com/gearman/gearmand/archive/%{version}/%{name}-%{version}.tar.gz
32# Source0-md5: e947647db2a23239cead1c0960f2b5a0
36bbbd00
ER
33Source1: %{name}.init
34Source2: %{name}.sysconfig
35Source3: %{name}.service
aa7b9951 36Patch0: no-git.patch
8bcbf8d9 37Patch1: x32.patch
36bbbd00 38URL: http://www.gearman.org
89dddf3f
ER
39BuildRequires: autoconf
40BuildRequires: autoconf-archive
41BuildRequires: automake
36bbbd00 42BuildRequires: boost-devel >= 1.37.0
36bbbd00
ER
43BuildRequires: gperf
44%{?with_gperftools:BuildRequires: gperftools-devel}
9ea1c03f 45%{?with_hiredis:BuildRequires: hiredis-devel}
36bbbd00 46BuildRequires: libevent-devel
9ea1c03f 47%{?with_libmemcached:BuildRequires: libmemcached-devel}
89dddf3f 48BuildRequires: libtool
36bbbd00 49BuildRequires: libuuid-devel
9ea1c03f 50%{?with_mysql:BuildRequires: mysql-devel}
a1985fcd 51BuildRequires: pkgconfig
36bbbd00 52BuildRequires: postgresql-devel
9ea1c03f 53%{?with_libpq:BuildRequires: postgresql-devel}
36bbbd00 54BuildRequires: rpmbuild(macros) >= 1.647
9ea1c03f 55%{?with_sqlite3:BuildRequires: sqlite3-devel}
36bbbd00
ER
56%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
57BuildRequires: zlib-devel
58%if %{with tests}
59BuildRequires: curl-devel
60BuildRequires: mysql-server
61%endif
67ee18f3
ER
62Provides: group(gearmand)
63Provides: user(gearmand)
36bbbd00
ER
64Requires(post,preun): /sbin/chkconfig
65Requires(post,preun,postun): systemd-units >= 38
67ee18f3
ER
66Requires(postun): /usr/sbin/groupdel
67Requires(postun): /usr/sbin/userdel
68Requires(pre): /bin/id
69Requires(pre): /usr/bin/getgid
70Requires(pre): /usr/sbin/groupadd
71Requires(pre): /usr/sbin/useradd
36bbbd00 72Requires: procps
ca65ef86 73Requires: rc-scripts >= 0.4.0.17
36bbbd00
ER
74Requires: systemd-units >= 0.38
75BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77# FIXME: add tmpfiles conf
78%define no_install_post_check_tmpfiles 1
79
80%description
81Gearman provides a generic framework to farm out work to other
82machines or dispatch function calls to machines that are better suited
83to do the work. It allows you to do work in parallel, to load balance
84processing, and to call functions between languages. It can be used in
85a variety of applications, from high-availability web sites to the
86transport for database replication. In other words, it is the nervous
87system for how distributed processing communicates.
88
89%package -n libgearman
90Summary: Development libraries for gearman
91Group: Development/Libraries
92Provides: libgearman-1.0 = %{version}-%{release}
93Obsoletes: libgearman-1.0 < %{version}-%{release}
94# gearman requires uuid_generate_time_safe, which only exists in newer e2fsprogs-libs
95Requires: e2fsprogs-libs >= 1.39-32
96
97%description -n libgearman
98Development libraries for %{name}.
99
100%package -n libgearman-devel
101Summary: Development headers for libgearman
102Group: Development/Libraries
103Requires: libevent-devel
104Requires: libgearman = %{version}-%{release}
105Provides: libgearman-1.0-devel = %{version}-%{release}
106Obsoletes: libgearman-1.0-devel < %{version}-%{release}
107
108%description -n libgearman-devel
109Development headers for %{name}.
110
111%prep
112%setup -q
113%patch0 -p1
8bcbf8d9
JR
114%ifarch x32
115%patch1 -p1
116%endif
36bbbd00 117
aa7b9951 118echo "m4_define([VERSION_NUMBER], %{version})" > version.m4
89dddf3f 119
36bbbd00 120%build
89dddf3f 121%{__libtoolize}
aa7b9951 122%{__aclocal}
89dddf3f 123%{__autoconf}
aa7b9951
JR
124%{__autoheader}
125%{__automake}
36bbbd00
ER
126%configure \
127 --disable-silent-rules \
128 --disable-static \
9ea1c03f
ER
129 %{__enable_disable hiredis} \
130 %{__enable_disable libdrizzle} \
131 %{__enable_disable libmemcached} \
132 %{__enable_disable libpq} \
133 %{__enable_disable libtokyocabinet} \
134 %{__with_without mysql} \
135 %{__with_without postgresql} \
136 %{__with_without sqlite3} \
137 --enable-ssl \
138 --disable-dtrace
36bbbd00 139
aa7b9951
JR
140%{__make} -C docs -j1
141%{__make} -j1
36bbbd00
ER
142
143%if %{with tests}
144%{__make} check
145%endif
146
147%install
148rm -rf $RPM_BUILD_ROOT
149%{__make} install \
150 DESTDIR=$RPM_BUILD_ROOT
151
152rm -v $RPM_BUILD_ROOT%{_libdir}/libgearman*.la
153
364c2c1a
ER
154install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
155 $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{systemdunitdir}} \
156 $RPM_BUILD_ROOT/var/{run/gearmand,log}
36bbbd00 157
364c2c1a 158cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gearmand
36bbbd00 159cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
364c2c1a 160install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gearmand
36bbbd00
ER
161touch $RPM_BUILD_ROOT/var/log/gearmand.log
162
36bbbd00
ER
163%clean
164rm -rf $RPM_BUILD_ROOT
165
36bbbd00 166%pre
67ee18f3
ER
167%groupadd -g 328 gearmand
168%useradd -u 328 -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
36bbbd00
ER
169
170%post
7d24d356
ER
171test -e /var/log/gearmand.log || touch /var/log/gearmand.log
172/sbin/chkconfig --add gearmand
173%service gearmand restart
36bbbd00 174%systemd_post gearmand.service
36bbbd00
ER
175
176%preun
36bbbd00
ER
177if [ "$1" = 0 ] ; then
178 %service gearmand stop
179 /sbin/chkconfig --del gearmand
180fi
7d24d356 181%systemd_preun gearmand.service
36bbbd00
ER
182
183%postun
7d24d356 184%systemd_reload
67ee18f3
ER
185if [ "$1" = "0" ]; then
186 %userremove gearmand
187 %groupremove gearmand
188fi
189
36bbbd00
ER
190%post -n libgearman -p /sbin/ldconfig
191%postun -n libgearman -p /sbin/ldconfig
192
193%files
194%defattr(644,root,root,755)
aa7b9951 195%doc README.md
364c2c1a 196%attr(754,root,root) /etc/rc.d/init.d/gearmand
36bbbd00
ER
197%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gearmand
198%attr(755,root,root) %{_sbindir}/gearmand
199%attr(755,root,root) %{_bindir}/gearman
200%attr(755,root,root) %{_bindir}/gearadmin
364c2c1a
ER
201%{_mandir}/man1/gearadmin.1*
202%{_mandir}/man1/gearman.1*
203%{_mandir}/man8/gearmand.8*
36bbbd00 204%{systemdunitdir}/%{name}.service
4b3195b4 205%dir %attr(771,root,gearmand) /var/run/gearmand
364c2c1a 206%attr(640,gearmand,gearmand) %config(noreplace) %verify(not md5 mtime size) /var/log/gearmand.log
36bbbd00
ER
207
208%files -n libgearman
209%defattr(644,root,root,755)
210%doc COPYING
211%attr(755,root,root) %{_libdir}/libgearman.so.*.*.*
212%ghost %{_libdir}/libgearman.so.8
213
214%files -n libgearman-devel
215%defattr(644,root,root,755)
216%doc AUTHORS ChangeLog
364c2c1a 217%{_includedir}/libgearman
36bbbd00
ER
218%{_pkgconfigdir}/gearmand.pc
219%{_libdir}/libgearman.so
220%{_includedir}/libgearman-1.0
364c2c1a
ER
221%{_mandir}/man3/gearman_*
222%{_mandir}/man3/libgearman.3*
This page took 0.236748 seconds and 4 git commands to generate.