]> git.pld-linux.org Git - packages/gearmand.git/blame - gearmand.spec
- rebuild with boost 1.63.0
[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
27Version: 1.1.12
3c05cb35 28Release: 5
36bbbd00
ER
29License: BSD
30Group: Daemons
31Source0: https://launchpad.net/gearmand/1.2/%{version}/+download/%{name}-%{version}.tar.gz
32# Source0-md5: 99dd0be85b181eccf7fb1ca3c2a28a9f
33Source1: %{name}.init
34Source2: %{name}.sysconfig
35Source3: %{name}.service
36Patch0: %{name}-1.1.12-ppc64le.patch
37URL: http://www.gearman.org
89dddf3f
ER
38BuildRequires: autoconf
39BuildRequires: autoconf-archive
40BuildRequires: automake
36bbbd00 41BuildRequires: boost-devel >= 1.37.0
36bbbd00
ER
42BuildRequires: gperf
43%{?with_gperftools:BuildRequires: gperftools-devel}
9ea1c03f 44%{?with_hiredis:BuildRequires: hiredis-devel}
36bbbd00 45BuildRequires: libevent-devel
9ea1c03f 46%{?with_libmemcached:BuildRequires: libmemcached-devel}
89dddf3f 47BuildRequires: libtool
36bbbd00 48BuildRequires: libuuid-devel
9ea1c03f 49%{?with_mysql:BuildRequires: mysql-devel}
a1985fcd 50BuildRequires: pkgconfig
36bbbd00 51BuildRequires: postgresql-devel
9ea1c03f 52%{?with_libpq:BuildRequires: postgresql-devel}
36bbbd00 53BuildRequires: rpmbuild(macros) >= 1.647
9ea1c03f 54%{?with_sqlite3:BuildRequires: sqlite3-devel}
36bbbd00
ER
55%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
56BuildRequires: zlib-devel
57%if %{with tests}
58BuildRequires: curl-devel
59BuildRequires: mysql-server
60%endif
67ee18f3
ER
61Provides: group(gearmand)
62Provides: user(gearmand)
36bbbd00
ER
63Requires(post,preun): /sbin/chkconfig
64Requires(post,preun,postun): systemd-units >= 38
67ee18f3
ER
65Requires(postun): /usr/sbin/groupdel
66Requires(postun): /usr/sbin/userdel
67Requires(pre): /bin/id
68Requires(pre): /usr/bin/getgid
69Requires(pre): /usr/sbin/groupadd
70Requires(pre): /usr/sbin/useradd
36bbbd00 71Requires: procps
ca65ef86 72Requires: rc-scripts >= 0.4.0.17
36bbbd00
ER
73Requires: systemd-units >= 0.38
74BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76# FIXME: add tmpfiles conf
77%define no_install_post_check_tmpfiles 1
78
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
88%package -n libgearman
89Summary: Development libraries for gearman
90Group: Development/Libraries
91Provides: libgearman-1.0 = %{version}-%{release}
92Obsoletes: libgearman-1.0 < %{version}-%{release}
93# gearman requires uuid_generate_time_safe, which only exists in newer e2fsprogs-libs
94Requires: e2fsprogs-libs >= 1.39-32
95
96%description -n libgearman
97Development libraries for %{name}.
98
99%package -n libgearman-devel
100Summary: Development headers for libgearman
101Group: Development/Libraries
102Requires: libevent-devel
103Requires: libgearman = %{version}-%{release}
104Provides: libgearman-1.0-devel = %{version}-%{release}
105Obsoletes: libgearman-1.0-devel < %{version}-%{release}
106
107%description -n libgearman-devel
108Development headers for %{name}.
109
110%prep
111%setup -q
112%patch0 -p1
113
89dddf3f
ER
114cp -p %{_aclocaldir}/ax_boost_base.m4 m4
115cp -p %{_aclocaldir}/ax_boost_program_options.m4 m4
116
117# somewhy it does not look into build-aux
118ln -s build-aux/install-sh .
119
36bbbd00 120%build
89dddf3f
ER
121%{__libtoolize}
122%{__aclocal} -I m4
123%{__automake}
124%{__autoconf}
36bbbd00
ER
125%configure \
126 --disable-silent-rules \
127 --disable-static \
9ea1c03f
ER
128 %{__enable_disable hiredis} \
129 %{__enable_disable libdrizzle} \
130 %{__enable_disable libmemcached} \
131 %{__enable_disable libpq} \
132 %{__enable_disable libtokyocabinet} \
133 %{__with_without mysql} \
134 %{__with_without postgresql} \
135 %{__with_without sqlite3} \
136 --enable-ssl \
137 --disable-dtrace
36bbbd00
ER
138
139%{__make}
140
141%if %{with tests}
142%{__make} check
143%endif
144
145%install
146rm -rf $RPM_BUILD_ROOT
147%{__make} install \
148 DESTDIR=$RPM_BUILD_ROOT
149
150rm -v $RPM_BUILD_ROOT%{_libdir}/libgearman*.la
151
364c2c1a
ER
152install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
153 $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{systemdunitdir}} \
154 $RPM_BUILD_ROOT/var/{run/gearmand,log}
36bbbd00 155
364c2c1a 156cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gearmand
36bbbd00 157cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
364c2c1a 158install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gearmand
36bbbd00
ER
159touch $RPM_BUILD_ROOT/var/log/gearmand.log
160
36bbbd00
ER
161%clean
162rm -rf $RPM_BUILD_ROOT
163
36bbbd00 164%pre
67ee18f3
ER
165%groupadd -g 328 gearmand
166%useradd -u 328 -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
36bbbd00
ER
167
168%post
7d24d356
ER
169test -e /var/log/gearmand.log || touch /var/log/gearmand.log
170/sbin/chkconfig --add gearmand
171%service gearmand restart
36bbbd00 172%systemd_post gearmand.service
36bbbd00
ER
173
174%preun
36bbbd00
ER
175if [ "$1" = 0 ] ; then
176 %service gearmand stop
177 /sbin/chkconfig --del gearmand
178fi
7d24d356 179%systemd_preun gearmand.service
36bbbd00
ER
180
181%postun
7d24d356 182%systemd_reload
67ee18f3
ER
183if [ "$1" = "0" ]; then
184 %userremove gearmand
185 %groupremove gearmand
186fi
187
36bbbd00
ER
188%post -n libgearman -p /sbin/ldconfig
189%postun -n libgearman -p /sbin/ldconfig
190
191%files
192%defattr(644,root,root,755)
193%doc README
364c2c1a 194%attr(754,root,root) /etc/rc.d/init.d/gearmand
36bbbd00
ER
195%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gearmand
196%attr(755,root,root) %{_sbindir}/gearmand
197%attr(755,root,root) %{_bindir}/gearman
198%attr(755,root,root) %{_bindir}/gearadmin
364c2c1a
ER
199%{_mandir}/man1/gearadmin.1*
200%{_mandir}/man1/gearman.1*
201%{_mandir}/man8/gearmand.8*
36bbbd00 202%{systemdunitdir}/%{name}.service
4b3195b4 203%dir %attr(771,root,gearmand) /var/run/gearmand
364c2c1a 204%attr(640,gearmand,gearmand) %config(noreplace) %verify(not md5 mtime size) /var/log/gearmand.log
36bbbd00
ER
205
206%files -n libgearman
207%defattr(644,root,root,755)
208%doc COPYING
209%attr(755,root,root) %{_libdir}/libgearman.so.*.*.*
210%ghost %{_libdir}/libgearman.so.8
211
212%files -n libgearman-devel
213%defattr(644,root,root,755)
214%doc AUTHORS ChangeLog
364c2c1a 215%{_includedir}/libgearman
36bbbd00
ER
216%{_pkgconfigdir}/gearmand.pc
217%{_libdir}/libgearman.so
218%{_includedir}/libgearman-1.0
364c2c1a
ER
219%{_mandir}/man3/gearman_*
220%{_mandir}/man3/libgearman.3*
This page took 0.0885 seconds and 4 git commands to generate.