]> git.pld-linux.org Git - packages/gearmand.git/blame - gearmand.spec
daemon boots; rel 1
[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
586943c9 28Release: 1
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
38BuildRequires: boost-devel >= 1.37.0
36bbbd00
ER
39BuildRequires: gperf
40%{?with_gperftools:BuildRequires: gperftools-devel}
9ea1c03f 41%{?with_hiredis:BuildRequires: hiredis-devel}
36bbbd00 42BuildRequires: libevent-devel
9ea1c03f 43%{?with_libmemcached:BuildRequires: libmemcached-devel}
36bbbd00 44BuildRequires: libuuid-devel
9ea1c03f 45%{?with_mysql:BuildRequires: mysql-devel}
a1985fcd 46BuildRequires: pkgconfig
36bbbd00 47BuildRequires: postgresql-devel
9ea1c03f 48%{?with_libpq:BuildRequires: postgresql-devel}
36bbbd00 49BuildRequires: rpmbuild(macros) >= 1.647
9ea1c03f 50%{?with_sqlite3:BuildRequires: sqlite3-devel}
36bbbd00
ER
51%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
52BuildRequires: zlib-devel
53%if %{with tests}
54BuildRequires: curl-devel
55BuildRequires: mysql-server
56%endif
67ee18f3
ER
57Provides: group(gearmand)
58Provides: user(gearmand)
36bbbd00
ER
59Requires(post,preun): /sbin/chkconfig
60Requires(post,preun,postun): systemd-units >= 38
67ee18f3
ER
61Requires(postun): /usr/sbin/groupdel
62Requires(postun): /usr/sbin/userdel
63Requires(pre): /bin/id
64Requires(pre): /usr/bin/getgid
65Requires(pre): /usr/sbin/groupadd
66Requires(pre): /usr/sbin/useradd
36bbbd00 67Requires: procps
ca65ef86 68Requires: rc-scripts >= 0.4.0.17
36bbbd00
ER
69Requires: systemd-units >= 0.38
70BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72# FIXME: add tmpfiles conf
73%define no_install_post_check_tmpfiles 1
74
75%description
76Gearman provides a generic framework to farm out work to other
77machines or dispatch function calls to machines that are better suited
78to do the work. It allows you to do work in parallel, to load balance
79processing, and to call functions between languages. It can be used in
80a variety of applications, from high-availability web sites to the
81transport for database replication. In other words, it is the nervous
82system for how distributed processing communicates.
83
84%package -n libgearman
85Summary: Development libraries for gearman
86Group: Development/Libraries
87Provides: libgearman-1.0 = %{version}-%{release}
88Obsoletes: libgearman-1.0 < %{version}-%{release}
89# gearman requires uuid_generate_time_safe, which only exists in newer e2fsprogs-libs
90Requires: e2fsprogs-libs >= 1.39-32
91
92%description -n libgearman
93Development libraries for %{name}.
94
95%package -n libgearman-devel
96Summary: Development headers for libgearman
97Group: Development/Libraries
98Requires: libevent-devel
99Requires: libgearman = %{version}-%{release}
100Provides: libgearman-1.0-devel = %{version}-%{release}
101Obsoletes: libgearman-1.0-devel < %{version}-%{release}
102
103%description -n libgearman-devel
104Development headers for %{name}.
105
106%prep
107%setup -q
108%patch0 -p1
109
110%build
36bbbd00
ER
111%configure \
112 --disable-silent-rules \
113 --disable-static \
9ea1c03f
ER
114 %{__enable_disable hiredis} \
115 %{__enable_disable libdrizzle} \
116 %{__enable_disable libmemcached} \
117 %{__enable_disable libpq} \
118 %{__enable_disable libtokyocabinet} \
119 %{__with_without mysql} \
120 %{__with_without postgresql} \
121 %{__with_without sqlite3} \
122 --enable-ssl \
123 --disable-dtrace
36bbbd00
ER
124
125%{__make}
126
127%if %{with tests}
128%{__make} check
129%endif
130
131%install
132rm -rf $RPM_BUILD_ROOT
133%{__make} install \
134 DESTDIR=$RPM_BUILD_ROOT
135
136rm -v $RPM_BUILD_ROOT%{_libdir}/libgearman*.la
137
364c2c1a
ER
138install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
139 $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{systemdunitdir}} \
140 $RPM_BUILD_ROOT/var/{run/gearmand,log}
36bbbd00 141
364c2c1a 142cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gearmand
36bbbd00 143cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
364c2c1a 144install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gearmand
36bbbd00
ER
145touch $RPM_BUILD_ROOT/var/log/gearmand.log
146
36bbbd00
ER
147%clean
148rm -rf $RPM_BUILD_ROOT
149
36bbbd00 150%pre
67ee18f3
ER
151%groupadd -g 328 gearmand
152%useradd -u 328 -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
36bbbd00
ER
153
154%post
7d24d356
ER
155test -e /var/log/gearmand.log || touch /var/log/gearmand.log
156/sbin/chkconfig --add gearmand
157%service gearmand restart
36bbbd00 158%systemd_post gearmand.service
36bbbd00
ER
159
160%preun
36bbbd00
ER
161if [ "$1" = 0 ] ; then
162 %service gearmand stop
163 /sbin/chkconfig --del gearmand
164fi
7d24d356 165%systemd_preun gearmand.service
36bbbd00
ER
166
167%postun
7d24d356 168%systemd_reload
67ee18f3
ER
169if [ "$1" = "0" ]; then
170 %userremove gearmand
171 %groupremove gearmand
172fi
173
36bbbd00
ER
174%post -n libgearman -p /sbin/ldconfig
175%postun -n libgearman -p /sbin/ldconfig
176
177%files
178%defattr(644,root,root,755)
179%doc README
364c2c1a 180%attr(754,root,root) /etc/rc.d/init.d/gearmand
36bbbd00
ER
181%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gearmand
182%attr(755,root,root) %{_sbindir}/gearmand
183%attr(755,root,root) %{_bindir}/gearman
184%attr(755,root,root) %{_bindir}/gearadmin
364c2c1a
ER
185%{_mandir}/man1/gearadmin.1*
186%{_mandir}/man1/gearman.1*
187%{_mandir}/man8/gearmand.8*
36bbbd00 188%{systemdunitdir}/%{name}.service
4b3195b4 189%dir %attr(771,root,gearmand) /var/run/gearmand
364c2c1a 190%attr(640,gearmand,gearmand) %config(noreplace) %verify(not md5 mtime size) /var/log/gearmand.log
36bbbd00
ER
191
192%files -n libgearman
193%defattr(644,root,root,755)
194%doc COPYING
195%attr(755,root,root) %{_libdir}/libgearman.so.*.*.*
196%ghost %{_libdir}/libgearman.so.8
197
198%files -n libgearman-devel
199%defattr(644,root,root,755)
200%doc AUTHORS ChangeLog
364c2c1a 201%{_includedir}/libgearman
36bbbd00
ER
202%{_pkgconfigdir}/gearmand.pc
203%{_libdir}/libgearman.so
204%{_includedir}/libgearman-1.0
364c2c1a
ER
205%{_mandir}/man3/gearman_*
206%{_mandir}/man3/libgearman.3*
This page took 0.095271 seconds and 4 git commands to generate.