Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:snagview
gearmand
gearmand.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gearmand.spec of Package gearmand
# # spec file for package gearmand # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: gearmand Version: 1.1.11 %define libversion 8 Release: 0 License: BSD-3-Clause Summary: Gearman Job Server Url: http://gearman.org Group: Productivity/Networking/Web/Servers Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}-rpmlintrc Source4: gearmand-firewall BuildRequires: update-alternatives BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libevent-devel BuildRequires: libuuid-devel BuildRequires: pkg-config BuildRequires: libtool BuildRequires: boost-devel BuildRequires: libmemcached-devel BuildRequires: libcurl-devel BuildRequires: mysql-devel BuildRequires: postgresql-devel BuildRequires: sqlite3-devel BuildRequires: gperf Requires: %{name}-server = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %define gearmand_user gearman %define gearmand_group gearman %description Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other words, it is the nervous system for how distributed processing communicates. %package -n libgearman%{libversion} Summary: Library providing Gearman client and worker functions Group: System/Libraries Provides: libgearman %description -n libgearman%{libversion} Gearman is a system to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance lots of function calls, or to call functions between languages. This package contains the C reimplementation of the client library. %package server Summary: Gearmand Server Group: Productivity/Networking/Web/Servers Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq Requires(pre): pwdutils Requires(pre): update-alternatives Requires: libgearman%{libversion} = %{version} Requires: logrotate Requires: %{name}-server-db = %{version} Recommends: memcached Recommends: %{name}-server-sqlite3 = %{version} Recommends: %{name}-tools = %{version} %description server Gearman provides a generic framework to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance processing, or to call functions between languages. This package provides the Gearmand Server. %package server-mysql Summary: Gearmand Server with MySQL support Group: Productivity/Networking/Web/Servers Requires(pre): %{name}-server Provides: %{name}-server-db = %{version} %description server-mysql Gearman provides a generic framework to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance processing, or to call functions between languages. This package provides the Gearmand Server with MySQL support. %package server-postgresql Summary: Gearmand Server with PostgreSQL support Group: Productivity/Networking/Web/Servers Requires(pre): %{name}-server Provides: %{name}-server-db = %{version} %description server-postgresql Gearman provides a generic framework to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance processing, or to call functions between languages. This package provides the Gearmand Server with PostgreSQL support. %package server-sqlite3 Summary: Gearmand Server with SQlite3 support Group: Productivity/Networking/Web/Servers Requires(pre): %{name}-server Provides: %{name}-server-db = %{version} %description server-sqlite3 Gearman provides a generic framework to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance processing, or to call functions between languages. This package provides the Gearmand Server with SQlite3 support %package doc Summary: Gearman Developer Documentation Group: Documentation/Other %if 0%{?suse_version} Recommends: %{name} = %{version} %endif %description doc Gearman is a system to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance lots of function calls, or to call functions between languages. This package contains the API docs for the libgearman library. %package tools Summary: Tools for the Gearman distributed job queue Group: Productivity/Networking/Web/Servers Requires: libgearman%{libversion} = %{version} %description tools This package contains command line tools for manipulating gearman jobs. %package devel Summary: Gearmand development files Group: Development/Libraries/Other Requires: libgearman%{libversion} = %{version} Requires: glibc-devel Requires: libevent-devel Requires: libuuid-devel Requires: libgearman%{libversion} = %{version} %description devel This package contains necessary header files for Gearman development. %prep %setup -q %build mkdir -p gearmand-binaries CONFIGURE_OPTS="--disable-static --disable-libdrizzle --disable-libtokyocabinet" # build gearmand with mysql support %configure $CONFIGURE_OPTS --disable-libmemcached --disable-libpq --without-sqlite3 make %{?_smp_mflags} cp gearmand/gearmand gearmand-binaries/gearmand-mysql make clean # build gearmand with postgresql support %configure $CONFIGURE_OPTS --disable-libmemcached --without-mysql --without-sqlite3 make %{?_smp_mflags} cp gearmand/gearmand gearmand-binaries/gearmand-postgresql make clean # build gearmand with sqlite3 support (the default) %configure $CONFIGURE_OPTS --disable-libmemcached --without-mysql --disable-libpq make %{?_smp_mflags} cp gearmand/gearmand gearmand-binaries/gearmand-sqlite3 %install %makeinstall # install man pages pushd man >/dev/null mkdir -p %{buildroot}/%{_mandir}/man{1,3,8} for no in 1 3 8 ; do for file in *.${no} ; do install -m644 $file %{buildroot}/%{_mandir}/man${no}/ done done popd >/dev/null pushd %{buildroot}/%{_mandir}/man8 >/dev/null ln -s %{name} %{name}-mysql ln -s %{name} %{name}-postgresql ln -s %{name} %{name}-sqlite3 popd >/dev/null # install binaries with different dependencies pushd gearmand-binaries for file in *; do install -m755 "$file" %{buildroot}%{_sbindir}/ done popd # create a dummy target for /etc/alternatives/gearmand touch %{buildroot}/%{_sbindir}/%{name} mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f ../../%{_sbindir}/%{name} %{buildroot}%{_sysconfdir}/alternatives/%{name} # install init script and dependencies install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/gearmand ln -s -f ../../%{_sysconfdir}/init.d/gearmand %{buildroot}%{_sbindir}/rcgearmand install -D -m 0644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.gearmand # install documentation install -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name} install -m 644 AUTHORS ChangeLog COPYING README %{buildroot}%{_defaultdocdir}/%{name}/ cp -r docs %{buildroot}%{_defaultdocdir}/%{name}/ # install logrotate config mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d cat >> %{buildroot}%{_sysconfdir}/logrotate.d/%{name} << EOF %{_localstatedir}/log/gearmand/*.log { daily rotate 4 missingok compress su %{gearmand_user} %{gearmand_group} #%endif } EOF # make rpmlint happy: remove the directories rm -rf "%{buildroot}%{_defaultdocdir}/%{name}/docs/libgearman/examples/.deps" rm -rf "%{buildroot}%{_defaultdocdir}/%{name}/docs/libgearman/examples/.libs" rm -rf "%{buildroot}%{_defaultdocdir}/%{name}/docs/libgearman/examples/.dirstamp" rm -rf "%{buildroot}%{_defaultdocdir}/%{name}/docs/{conf.py.in,include.am}" find "%{buildroot}%{_defaultdocdir}/%{name}" -type f -exec chmod 644 {} \; # install SuSEfirewall2 script %if 0%{?suse_version} > 1020 install -Dm644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-server %endif # install runtime directories mkdir -p %{buildroot}%{_localstatedir}/log/gearmand mkdir -p %{buildroot}/var/run/gearmand mkdir -p %{buildroot}/var/lib/gearman # Delete man-pages rm -rf %{buildroot}/usr/share/man %clean rm -rf %{buildroot} %pre server %if 0%{?centos_version} == 700 || 0%{?suse_version} >= 1315 id -u gearman &>/dev/null || useradd gearman grep -q gearman /etc/group || groupadd gearman usermod -g gearman gearman usermod -a -G gearman gearman %else /usr/sbin/groupadd -r %{gearmand_user} &>/dev/null || : /usr/sbin/useradd -o -g %{gearmand_group} -s /bin/false -r -c "Gearman Server" -d /var/lib/gearman/ %{gearmand_user} &>/dev/null || : %endif %post server %{fillup_and_insserv -y gearmand} %preun server %stop_on_removal gearmand if [ "$1" = 0 ] ; then %{_sbindir}/update-alternatives --remove "%{name}" "%{_sbindir}/%{name}" fi %postun server %restart_on_update gearmand %{insserv_cleanup} %post server-mysql %{_sbindir}/update-alternatives --install "%{_sbindir}/%{name}" "%{name}" "%{_sbindir}/%{name}-mysql" 30 %post server-postgresql %{_sbindir}/update-alternatives --install "%{_sbindir}/%{name}" "%{name}" "%{_sbindir}/%{name}-postgresql" 20 %post server-sqlite3 %{_sbindir}/update-alternatives --install "%{_sbindir}/%{name}" "%{name}" "%{_sbindir}/%{name}-sqlite3" 10 %preun server-mysql if [ "$1" = 0 ] ; then %{_sbindir}/update-alternatives --remove "%{name}" "%{_sbindir}/%{name}-mysql" fi %preun server-postgresql if [ "$1" = 0 ] ; then %{_sbindir}/update-alternatives --remove "%{name}" "%{_sbindir}/%{name}-postgresql" fi %preun server-sqlite3 if [ "$1" = 0 ] ; then %{_sbindir}/update-alternatives --remove "%{name}" "%{_sbindir}/%{name}-sqlite3" fi %post -n libgearman%{libversion} -p /sbin/ldconfig %postun -n libgearman%{libversion} -p /sbin/ldconfig %files server %defattr(-,root,root) %dir %{_defaultdocdir}/%{name} %doc %{_defaultdocdir}/%{name}/* %exclude %{_defaultdocdir}/%{name}/docs #%{_mandir}/man3/* #%{_mandir}/man8/* #%exclude %{_mandir}/man8/gearmand-* %{_sbindir}/rcgearmand %{_sysconfdir}/init.d/gearmand %if 0%{?suse_version} > 1020 %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-server %endif %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_localstatedir}/adm/fillup-templates/sysconfig.gearmand %attr(-,%{gearmand_user},%{gearmand_group}) %dir %{_localstatedir}/log/gearmand %attr(-,%{gearmand_user},%{gearmand_group}) %dir %{_localstatedir}/lib/gearman %ghost %attr(-,%{gearmand_user},%{gearmand_group}) %dir %{_localstatedir}/run/gearmand %ghost %{_sysconfdir}/alternatives/%{name} %files server-mysql %defattr(-,root,root) %{_sbindir}/gearmand-mysql %ghost %{_sbindir}/gearmand #%{_mandir}/man8/gearmand-mysql* %files server-postgresql %defattr(-,root,root) %{_sbindir}/gearmand-postgresql %ghost %{_sbindir}/gearmand #%{_mandir}/man8/gearmand-postgresql* %files server-sqlite3 %defattr(-,root,root) %{_sbindir}/gearmand-sqlite3 %ghost %{_sbindir}/gearmand #%{_mandir}/man8/gearmand-sqlite3* %files -n libgearman%{libversion} %defattr(-,root,root) %{_libdir}/libgearman.so.* %files tools %defattr(-,root,root) %{_bindir}/gearman %{_bindir}/gearadmin #%{_mandir}/man1/gearman* #%{_mandir}/man1/gearadmin.1* %files doc %defattr(-,root,root) %doc %{_defaultdocdir}/%{name}/docs #/usr/share/man/man3/gearman* %files devel %defattr(-,root,root) %dir %{_includedir}/libgearman %dir %{_includedir}/libgearman-1.0 %{_libdir}/pkgconfig/gearmand.pc %{_includedir}/libgearman %{_includedir}/libgearman-1.0 %{_libdir}/libgearman.la %{_libdir}/libgearman.so %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor