]> git.pld-linux.org Git - packages/gearmand.git/blame - gearmand.spec
boost rebuild
[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
586943c9 4# - logrotate
36bbbd00
ER
5#
6# Conditional build:
7%bcond_with tests # build with tests
8%bcond_without gperftools # gperftools
a5013be6
JB
9%bcond_without sqlite3 # use SQLite 3 library
10%bcond_without tokyocabinet # libtokyocabinet support
11%bcond_without memcached # libmemcached support
12%bcond_without hiredis # hiredis support
13%bcond_without pgsql # PostgreSQL support via libpq
14%bcond_without mysql # MySQL client library
15%bcond_with libdrizzle # libdrizzle support
36bbbd00
ER
16
17# google perftools available only on these
a5013be6 18%ifnarch %{ix86} %{x8664} ppc64 ppc64le aarch64 %{arm}
36bbbd00
ER
19%undefine with_gperftools
20%endif
21
36bbbd00 22Summary: A distributed job system
6809ddf2 23Summary(pl.UTF-8): System do rozpraszania zadań
36bbbd00 24Name: gearmand
6809ddf2 25Version: 1.1.19.1
758fff35 26Release: 3
36bbbd00
ER
27License: BSD
28Group: Daemons
6809ddf2 29#Source0Download: https://github.com/gearman/gearmand/releases
aa7b9951 30Source0: https://github.com/gearman/gearmand/archive/%{version}/%{name}-%{version}.tar.gz
6809ddf2 31# Source0-md5: 0c86283d6b82c390659d2bd7de6a9e1b
36bbbd00
ER
32Source1: %{name}.init
33Source2: %{name}.sysconfig
34Source3: %{name}.service
aa7b9951 35Patch0: no-git.patch
8bcbf8d9 36Patch1: x32.patch
36bbbd00 37URL: http://www.gearman.org
a5013be6 38BuildRequires: autoconf >= 2.63
89dddf3f 39BuildRequires: autoconf-archive
a5013be6
JB
40BuildRequires: automake >= 1:1.11
41BuildRequires: boost-devel >= 1.39
36bbbd00
ER
42BuildRequires: gperf
43%{?with_gperftools:BuildRequires: gperftools-devel}
9ea1c03f 44%{?with_hiredis:BuildRequires: hiredis-devel}
36bbbd00 45BuildRequires: libevent-devel
a5013be6 46%{?with_memcached:BuildRequires: libmemcached-devel}
6809ddf2 47BuildRequires: libstdc++-devel >= 6:4.3
a5013be6 48BuildRequires: libtool >= 2:2.2
36bbbd00 49BuildRequires: libuuid-devel
9ea1c03f 50%{?with_mysql:BuildRequires: mysql-devel}
a5013be6 51BuildRequires: openssl-devel
a1985fcd 52BuildRequires: pkgconfig
a5013be6 53%{?with_pgsql:BuildRequires: postgresql-devel}
36bbbd00 54BuildRequires: rpmbuild(macros) >= 1.647
6809ddf2 55BuildRequires: sphinx-pdg >= 1.0
9ea1c03f 56%{?with_sqlite3:BuildRequires: sqlite3-devel}
36bbbd00
ER
57%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
58BuildRequires: zlib-devel
59%if %{with tests}
a5013be6 60BuildRequires: curl-devel >= 7.21.7
36bbbd00
ER
61BuildRequires: mysql-server
62%endif
67ee18f3
ER
63Provides: group(gearmand)
64Provides: user(gearmand)
36bbbd00
ER
65Requires(post,preun): /sbin/chkconfig
66Requires(post,preun,postun): systemd-units >= 38
67ee18f3
ER
67Requires(postun): /usr/sbin/groupdel
68Requires(postun): /usr/sbin/userdel
69Requires(pre): /bin/id
70Requires(pre): /usr/bin/getgid
71Requires(pre): /usr/sbin/groupadd
72Requires(pre): /usr/sbin/useradd
6809ddf2 73Requires: libgearman = %{version}-%{release}
36bbbd00 74Requires: procps
ca65ef86 75Requires: rc-scripts >= 0.4.0.17
36bbbd00
ER
76Requires: systemd-units >= 0.38
77BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
36bbbd00
ER
79%description
80Gearman provides a generic framework to farm out work to other
81machines or dispatch function calls to machines that are better suited
82to do the work. It allows you to do work in parallel, to load balance
83processing, and to call functions between languages. It can be used in
84a variety of applications, from high-availability web sites to the
85transport for database replication. In other words, it is the nervous
86system for how distributed processing communicates.
87
6809ddf2
JB
88%description -l pl.UTF-8
89Gearman zapewnia ogólny szkielet do rozpraszania zadań na inne maszyny
90lub ekspediowania wywołań funkcji na maszyny lepiej przystosowane do
91danego zadania. Pozwala wykonywać zadania równolegle, równoważyć
92obciążenie oraz wykonywać wywołania funkcji między językami. Może być
93używany w wielu zastosowaniach, od wysoko dostępnych storn WWW do
94transportu na potrzeby replikacji bazy danych. Innymi słowy, jest to
95układ nerwowy, zapewniający komunikację przy przetwarzaniu
96rozproszonym.
97
36bbbd00 98%package -n libgearman
6809ddf2
JB
99Summary: Shared gearman library
100Summary(pl.UTF-8): Biblioteka współdzielona gearman
101Group: Libraries
36bbbd00
ER
102Provides: libgearman-1.0 = %{version}-%{release}
103Obsoletes: libgearman-1.0 < %{version}-%{release}
104# gearman requires uuid_generate_time_safe, which only exists in newer e2fsprogs-libs
105Requires: e2fsprogs-libs >= 1.39-32
106
107%description -n libgearman
6809ddf2
JB
108Shared gearman library.
109
110%description -n libgearman -l pl.UTF-8
111Biblioteka współdzielona gearman.
36bbbd00
ER
112
113%package -n libgearman-devel
114Summary: Development headers for libgearman
6809ddf2 115Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgearman
36bbbd00
ER
116Group: Development/Libraries
117Requires: libevent-devel
118Requires: libgearman = %{version}-%{release}
119Provides: libgearman-1.0-devel = %{version}-%{release}
120Obsoletes: libgearman-1.0-devel < %{version}-%{release}
121
122%description -n libgearman-devel
6809ddf2
JB
123Development headers for libgearman.
124
125%description -n libgearman-devel -l pl.UTF-8
126Pliki nagłówkowe biblioteki libgearman.
36bbbd00
ER
127
128%prep
129%setup -q
130%patch0 -p1
8bcbf8d9
JR
131%ifarch x32
132%patch1 -p1
133%endif
36bbbd00 134
aa7b9951 135echo "m4_define([VERSION_NUMBER], %{version})" > version.m4
89dddf3f 136
36bbbd00 137%build
89dddf3f 138%{__libtoolize}
aa7b9951 139%{__aclocal}
89dddf3f 140%{__autoconf}
aa7b9951
JR
141%{__autoheader}
142%{__automake}
36bbbd00
ER
143%configure \
144 --disable-silent-rules \
145 --disable-static \
9ea1c03f
ER
146 %{__enable_disable hiredis} \
147 %{__enable_disable libdrizzle} \
a5013be6
JB
148 %{__enable_disable memcached libmemcached} \
149 %{__enable_disable pgsql libpq} \
150 %{__enable_disable tokyocabinet libtokyocabinet} \
9ea1c03f 151 %{__with_without mysql} \
9ea1c03f
ER
152 %{__with_without sqlite3} \
153 --enable-ssl \
154 --disable-dtrace
36bbbd00 155
aa7b9951
JR
156%{__make} -C docs -j1
157%{__make} -j1
36bbbd00
ER
158
159%if %{with tests}
160%{__make} check
161%endif
162
163%install
164rm -rf $RPM_BUILD_ROOT
6809ddf2 165
36bbbd00
ER
166%{__make} install \
167 DESTDIR=$RPM_BUILD_ROOT
168
6809ddf2 169%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgearman*.la
36bbbd00 170
364c2c1a 171install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
6809ddf2
JB
172 $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{systemdunitdir},%{systemdtmpfilesdir}} \
173 $RPM_BUILD_ROOT/var/{log,run/gearmand}
36bbbd00 174
364c2c1a 175cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gearmand
36bbbd00 176cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
364c2c1a 177install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gearmand
36bbbd00
ER
178touch $RPM_BUILD_ROOT/var/log/gearmand.log
179
6809ddf2
JB
180cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/gearmand.conf <<EOF
181d /var/run/gearmand 0771 root gearmand -
182EOF
183
36bbbd00
ER
184%clean
185rm -rf $RPM_BUILD_ROOT
186
36bbbd00 187%pre
67ee18f3
ER
188%groupadd -g 328 gearmand
189%useradd -u 328 -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
36bbbd00
ER
190
191%post
7d24d356
ER
192test -e /var/log/gearmand.log || touch /var/log/gearmand.log
193/sbin/chkconfig --add gearmand
194%service gearmand restart
36bbbd00 195%systemd_post gearmand.service
36bbbd00
ER
196
197%preun
36bbbd00
ER
198if [ "$1" = 0 ] ; then
199 %service gearmand stop
200 /sbin/chkconfig --del gearmand
201fi
7d24d356 202%systemd_preun gearmand.service
36bbbd00
ER
203
204%postun
7d24d356 205%systemd_reload
67ee18f3
ER
206if [ "$1" = "0" ]; then
207 %userremove gearmand
208 %groupremove gearmand
209fi
210
36bbbd00
ER
211%post -n libgearman -p /sbin/ldconfig
212%postun -n libgearman -p /sbin/ldconfig
213
214%files
215%defattr(644,root,root,755)
aa7b9951 216%doc README.md
364c2c1a 217%attr(754,root,root) /etc/rc.d/init.d/gearmand
36bbbd00
ER
218%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gearmand
219%attr(755,root,root) %{_sbindir}/gearmand
220%attr(755,root,root) %{_bindir}/gearman
221%attr(755,root,root) %{_bindir}/gearadmin
364c2c1a
ER
222%{_mandir}/man1/gearadmin.1*
223%{_mandir}/man1/gearman.1*
224%{_mandir}/man8/gearmand.8*
36bbbd00 225%{systemdunitdir}/%{name}.service
6809ddf2 226%{systemdtmpfilesdir}/gearmand.conf
4b3195b4 227%dir %attr(771,root,gearmand) /var/run/gearmand
364c2c1a 228%attr(640,gearmand,gearmand) %config(noreplace) %verify(not md5 mtime size) /var/log/gearmand.log
36bbbd00
ER
229
230%files -n libgearman
231%defattr(644,root,root,755)
6809ddf2 232%doc AUTHORS COPYING ChangeLog
36bbbd00 233%attr(755,root,root) %{_libdir}/libgearman.so.*.*.*
6809ddf2 234%attr(755,root,root) %ghost %{_libdir}/libgearman.so.8
36bbbd00
ER
235
236%files -n libgearman-devel
237%defattr(644,root,root,755)
6809ddf2 238%attr(755,root,root) %{_libdir}/libgearman.so
364c2c1a 239%{_includedir}/libgearman
36bbbd00 240%{_includedir}/libgearman-1.0
6809ddf2
JB
241%{_pkgconfigdir}/gearmand.pc
242%{_mandir}/man3/gearman_*.3*
364c2c1a 243%{_mandir}/man3/libgearman.3*
This page took 0.21614 seconds and 4 git commands to generate.