]> git.pld-linux.org Git - packages/gearmand.git/blame - gearmand.spec
cleanups
[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
4# - add gearman user/group
5#
6# Conditional build:
7%bcond_with tests # build with tests
8%bcond_without gperftools # gperftools
9%bcond_without sqlite # sqlite
10%bcond_without tokyocabinet # tokyocabinet
11%bcond_with tcmalloc # tcmalloc
12
13# google perftools available only on these
14%ifnarch %{ix86} x86_64 ppc64 ppc64le aarch64 %{arm}
15%undefine with_gperftools
16%endif
17
18%ifarch ppc64 sparc64
19%undefine with_tcmalloc
20%endif
21
22Summary: A distributed job system
23Name: gearmand
24Version: 1.1.12
25Release: 0.1
26License: BSD
27Group: Daemons
28Source0: https://launchpad.net/gearmand/1.2/%{version}/+download/%{name}-%{version}.tar.gz
29# Source0-md5: 99dd0be85b181eccf7fb1ca3c2a28a9f
30Source1: %{name}.init
31Source2: %{name}.sysconfig
32Source3: %{name}.service
33Patch0: %{name}-1.1.12-ppc64le.patch
34URL: http://www.gearman.org
35BuildRequires: boost-devel >= 1.37.0
36bbbd00
ER
36BuildRequires: gperf
37%{?with_gperftools:BuildRequires: gperftools-devel}
38BuildRequires: libevent-devel
39BuildRequires: libmemcached-devel
40BuildRequires: libuuid-devel
41#BuildRequires: memcached
42BuildRequires: mysql-devel
a1985fcd 43BuildRequires: pkgconfig
36bbbd00
ER
44BuildRequires: postgresql-devel
45BuildRequires: rpmbuild(macros) >= 1.647
46%{?with_sqlite:BuildRequires: sqlite3-devel}
36bbbd00
ER
47%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
48BuildRequires: zlib-devel
49%if %{with tests}
50BuildRequires: curl-devel
51BuildRequires: mysql-server
52%endif
53Requires(post,preun): /sbin/chkconfig
54Requires(post,preun,postun): systemd-units >= 38
55Requires: procps
56Requires: rc-scripts
57Requires: systemd-units >= 0.38
58BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60# FIXME: add tmpfiles conf
61%define no_install_post_check_tmpfiles 1
62
63%description
64Gearman provides a generic framework to farm out work to other
65machines or dispatch function calls to machines that are better suited
66to do the work. It allows you to do work in parallel, to load balance
67processing, and to call functions between languages. It can be used in
68a variety of applications, from high-availability web sites to the
69transport for database replication. In other words, it is the nervous
70system for how distributed processing communicates.
71
72%package -n libgearman
73Summary: Development libraries for gearman
74Group: Development/Libraries
75Provides: libgearman-1.0 = %{version}-%{release}
76Obsoletes: libgearman-1.0 < %{version}-%{release}
77# gearman requires uuid_generate_time_safe, which only exists in newer e2fsprogs-libs
78Requires: e2fsprogs-libs >= 1.39-32
79
80%description -n libgearman
81Development libraries for %{name}.
82
83%package -n libgearman-devel
84Summary: Development headers for libgearman
85Group: Development/Libraries
86Requires: libevent-devel
87Requires: libgearman = %{version}-%{release}
88Provides: libgearman-1.0-devel = %{version}-%{release}
89Obsoletes: libgearman-1.0-devel < %{version}-%{release}
90
91%description -n libgearman-devel
92Development headers for %{name}.
93
94%prep
95%setup -q
96%patch0 -p1
97
98%build
99# HACK to work around boost issues.
100#export LDFLAGS="%{rpmldflags} LDFLAGS -lboost_system"
101
102%configure \
103 --disable-silent-rules \
104 --disable-static \
105%if %{with tcmalloc}
106 --enable-tcmalloc \
107%endif
108
109%{__make}
110
111%if %{with tests}
112%{__make} check
113%endif
114
115%install
116rm -rf $RPM_BUILD_ROOT
117%{__make} install \
118 DESTDIR=$RPM_BUILD_ROOT
119
120rm -v $RPM_BUILD_ROOT%{_libdir}/libgearman*.la
121
364c2c1a
ER
122install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
123 $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{systemdunitdir}} \
124 $RPM_BUILD_ROOT/var/{run/gearmand,log}
36bbbd00 125
364c2c1a 126cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gearmand
36bbbd00 127cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
364c2c1a 128install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gearmand
36bbbd00
ER
129touch $RPM_BUILD_ROOT/var/log/gearmand.log
130
36bbbd00
ER
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if 0
135%pre
136%groupadd -r gearmand
137%useradd -r -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
138
139%post
140%systemd_post gearmand.service
141if [ $1 = 1 ]; then
142 /sbin/chkconfig --add gearmand
143fi
144touch /var/log/gearmand.log
145
146%preun
147%systemd_preun gearmand.service
148if [ "$1" = 0 ] ; then
149 %service gearmand stop
150 /sbin/chkconfig --del gearmand
151fi
152
153%postun
154%systemd_postun_with_restart gearmand.service
155%endif
156
157%post -n libgearman -p /sbin/ldconfig
158%postun -n libgearman -p /sbin/ldconfig
159
160%files
161%defattr(644,root,root,755)
162%doc README
364c2c1a 163%attr(754,root,root) /etc/rc.d/init.d/gearmand
36bbbd00
ER
164%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gearmand
165%attr(755,root,root) %{_sbindir}/gearmand
166%attr(755,root,root) %{_bindir}/gearman
167%attr(755,root,root) %{_bindir}/gearadmin
364c2c1a
ER
168%{_mandir}/man1/gearadmin.1*
169%{_mandir}/man1/gearman.1*
170%{_mandir}/man8/gearmand.8*
36bbbd00 171%{systemdunitdir}/%{name}.service
364c2c1a
ER
172%dir %attr(755,gearmand,gearmand) /var/run/gearmand
173%attr(640,gearmand,gearmand) %config(noreplace) %verify(not md5 mtime size) /var/log/gearmand.log
36bbbd00
ER
174
175%files -n libgearman
176%defattr(644,root,root,755)
177%doc COPYING
178%attr(755,root,root) %{_libdir}/libgearman.so.*.*.*
179%ghost %{_libdir}/libgearman.so.8
180
181%files -n libgearman-devel
182%defattr(644,root,root,755)
183%doc AUTHORS ChangeLog
364c2c1a 184%{_includedir}/libgearman
36bbbd00
ER
185%{_pkgconfigdir}/gearmand.pc
186%{_libdir}/libgearman.so
187%{_includedir}/libgearman-1.0
364c2c1a
ER
188%{_mandir}/man3/gearman_*
189%{_mandir}/man3/libgearman.3*
This page took 0.102528 seconds and 4 git commands to generate.