rpms/gearmand/F-11 gearmand.init, NONE, 1.1 gearmand.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ruben Kerkhof ruben at fedoraproject.org
Tue May 5 11:55:39 UTC 2009


Author: ruben

Update of /cvs/pkgs/rpms/gearmand/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1044/F-11

Modified Files:
	.cvsignore sources 
Added Files:
	gearmand.init gearmand.spec import.log 
Log Message:
Initial import



--- NEW FILE gearmand.init ---
#!/bin/bash
#
# gearmand        Startup script for the Gearman server
#
# chkconfig: - 85 15
# description: Gearman is a distributed job system.
# processname: gearmand
# config: /etc/sysconfig/gearmand
# pidfile: /var/run/gearmand/gearmand.pid
#
### BEGIN INIT INFO
# Provides: gearmand
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start:
# Default-Stop:
# Short-Description: start and stop the Gearman server
# Description: Gearman is a distributed job system.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/gearmand ]; then
        . /etc/sysconfig/gearmand
fi

[ -z "${PIDFILE}" ] && pidfile = "/var/run/gearmand/gearmand.pid"
[ -z "${LOCKFILE}" ] && lockfile="/var/lock/subsys/gearmand"

gearmand=/usr/bin/gearmand
prog=gearmand

RETVAL=0

start() {
        echo -n $"Starting $prog: "
        daemon --pidfile=$pidfile --user=gearmand $gearmand -d $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && (touch $lockfile; pgrep -f $gearmand > $pidfile)
        return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	killproc -p $pidfile $gearmand
	RETVAL=$?
	echo
	[ $RETVAL = 0 ] && rm -f $lockfile $pidfile
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
        status -p $pidfile $gearmand
	RETVAL=$?
	;;
  restart|reload)
	stop
	start
	;;
  condrestart|try-restart)
	if status -p $pidfile $gearmand >&/dev/null; then
		stop
		start
	fi
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|reload|condrestart|status|help}"
	RETVAL=3
esac

exit $RETVAL



--- NEW FILE gearmand.spec ---
Name:           gearmand
Version:        0.5
Release:        1%{?dist}
Summary:        A distributed job system

Group:          System Environment/Daemons
License:        BSD
URL:            http://www.gearman.org
Source0:        http://launchpad.net/gearmand/trunk/%{version}/+download/gearmand-%{version}.tar.gz
Source1:        gearmand.init
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libevent-devel, e2fsprogs-devel

%ifnarch ppc64
# no google perftools on ppc64
BuildRequires: google-perftools-devel
%endif
Requires(pre):   %{_sbindir}/useradd
Requires(post):  /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires:        procps

%description
Gearman provides a generic framework to farm out work to other machines
or dispatch function calls to machines 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 for database replication.
In other words, it is the nervous system for how distributed processing
communicates.


%package -n libgearman-devel
Summary:        Development headers for libgearman
Requires:       pkgconfig, libgearman = %{version}-%{release}
Group:          Development/Libraries

%description -n libgearman-devel
Development headers for %{name}

%package -n libgearman
Summary:        Development libraries for gearman
Group:          Development/Libraries


%description -n libgearman
Development libraries for %{name}


%prep
%setup -q


%build
%ifarch ppc64
# no tcmalloc on ppc64
%configure --disable-static
%else
%configure --disable-static --enable-tcmalloc
%endif

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -v %{buildroot}%{_libdir}/libgearman.la
install -D %{SOURCE1} %{buildroot}%{_initrddir}/gearmand


%clean
rm -rf %{buildroot}

%pre
getent group gearmand >/dev/null || groupadd -r gearmand
getent passwd gearmand >/dev/null || \
        useradd -r -g gearmand -d / -s /sbin/nologin \
        -c "Gearmand job server" gearmand
exit 0

%post
if [ $1 -eq 1 ]; then
        /sbin/chkconfig --add gearmand
fi

%preun
if [ $1 -eq 0 ]; then
        /sbin/service gearmand stop >/dev/null 2>&1 || :
        /sbin/chkconfig --del gearmand
fi


%post -n libgearman -p /sbin/ldconfig

%postun -n libgearman -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%{_sbindir}/gearmand
%{_bindir}/gearman
%{_initrddir}/gearmand
%{_mandir}/man1/gearman.1.gz


%files -n libgearman-devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%dir %{_includedir}/libgearman
%{_includedir}/libgearman/*.h
%{_libdir}/pkgconfig/gearmand.pc
%{_libdir}/libgearman.so
%{_mandir}/man3/gearman*.3.gz

%files -n libgearman
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libgearman.so.*


%changelog
* Mon Apr 27 2009 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.5-1
- Upstream released new version
- Cleanups for review (bz #487148)

* Wed Feb 25 2009 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.3-2
- Add init script

* Sat Feb 07 2009 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.3-1
- Initial import



--- NEW FILE import.log ---
gearmand-0_5-1_fc11:F-11:gearmand-0.5-1.fc11.src.rpm:1241524486


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gearmand/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	4 May 2009 20:38:38 -0000	1.1
+++ .cvsignore	5 May 2009 11:55:09 -0000	1.2
@@ -0,0 +1 @@
+gearmand-0.5.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gearmand/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	4 May 2009 20:38:39 -0000	1.1
+++ sources	5 May 2009 11:55:09 -0000	1.2
@@ -0,0 +1 @@
+41946441094bc260c46b1391ae6ef3a4  gearmand-0.5.tar.gz




More information about the fedora-extras-commits mailing list