rpms/gadget/devel gadget.init, NONE, 1.1 gadget.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Simon Schampijer erikos at fedoraproject.org
Mon Mar 16 08:49:31 UTC 2009


Author: erikos

Update of /cvs/pkgs/rpms/gadget/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27807

Modified Files:
	.cvsignore sources 
Added Files:
	gadget.init gadget.spec 
Log Message:
* Tue Mar 10 2009 Simon Schampijer <simon at schampijer.de> - 0.0.3-2
- added COPYING 
- correct licence information
- added gadget init file for Fedora
- added ejabberd and python-twisted dependency




--- NEW FILE gadget.init ---
#!/bin/sh
#
# Gadget daemon
#
# chkconfig: 345 26 74
# description: Gadget is an XMPP server component (being) written by 
#              Collabora to scale Jabber server based collaborative 
#              activities via Telepathy Gabble.
#
# processname: hald
#
# pidfile: /var/run/haldaemon.pid
#

# Author: Dafydd Harries <daf at debian.org>
#         Simon Schampijer <simon at schampijer.de>

# Do NOT "set -e"

RETVAL=0

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Gadget XMPP component"
NAME=gadget
TAC=/usr/share/gadget/gadget.tac
PIDFILE=/var/run/$NAME.pid
LOGFILE=/var/log/gadget.log
servicename=twistdaemon
processname=twistd
DAEMON_ARGS="--logfile $LOGFILE --pidfile $PIDFILE -oy $TAC"

# Exit if the package is not installed
[ -r "$TAC" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

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

export PYTHONPATH=/usr/share/gadget/

start()

{
    echo -n $"Starting Gadget daemon: "
    daemon --pidfile $PIDFILE --check $servicename $processname $DAEMON_ARGS
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
}

stop()
{
    echo -n $"Stoping Gadget daemon: "
    killproc -p $pidfile $servicename
    RETVAL=$?
    echo
    if [ $RETVAL -eq 0 ]; then
	rm -f /var/lock/subsys/$NAME
	rm -f $pidfile
    fi
}

case "$1" in
    start)
	start
	;;
    stop)
	stop
	;;
    restart|force-reload)
	stop
	sleep 3
	start
	;;
    condrestart)
        if [ -f /var/lock/subsys/$NAME ]; then
            stop
	    sleep 3
            start
        fi
        ;;
    *)
	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
	;;
esac
exit $RETVAL


--- NEW FILE gadget.spec ---
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           gadget
Version:        0.0.3
Release:        2%{?dist}
Summary:        XMPP server component for tracking people and activities

Group:          Development/Languages
License:        GPLv2
URL:            http://wiki.laptop.org/go/Gadget
Source0:        http://dev.laptop.org/pub/gadget/gadget-%{version}.tar.gz
Source1:        http://people.sugarlabs.org/erikos/gadget.init
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch

BuildRequires: python-devel

Requires: python-twisted
Requires: ejabberd

Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service

%description
Gadget is an XMPP server component written to scale Jabber
server based collaborative activities via Telepathy Gabble.

%prep
%setup -q

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%{__mkdir_p} $RPM_BUILD_ROOT/var/lib/gadget

%{__install} -p -D -m 644 gadget.config $RPM_BUILD_ROOT/%{_sysconfdir}/gadget/gadget.config
%{__install} -p -D -m 644 gadget.tac $RPM_BUILD_ROOT/%{_datadir}/gadget/gadget.tac
%{__install} -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/gadget

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add gadget

%preun
if [ $1 = 0 ]; then
        /sbin/service gadget stop >/dev/null 2>&1
        /sbin/chkconfig --del gadget
fi

%postun
if [ "$1" -ge "1" ]; then
        /sbin/service gadget condrestart >/dev/null 2>&1
fi

%files
%defattr(-,root,root,-)
%doc NEWS README COPYING
%config(noreplace) %{_sysconfdir}/gadget/gadget.config
%{_initrddir}/gadget
%{_datadir}/gadget/gadget.tac
%{python_sitelib}/gadget
%{python_sitelib}/*.egg-info
%dir /var/lib/gadget

%changelog
* Tue Mar 10 2009 Simon Schampijer <simon at schampijer.de> - 0.0.3-2
- added COPYING 
- correct licence information
- added gadget init file for Fedora
- added ejabberd and python-twisted dependency

* Wed Dec 10 2008 Marco Pesenti Gritti <mpg at redhat.com> - 0.0.3-1
- Update to 0.10.4 to fix 2.6 issues


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gadget/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Mar 2009 02:55:47 -0000	1.1
+++ .cvsignore	16 Mar 2009 08:49:01 -0000	1.2
@@ -0,0 +1 @@
+gadget-0.0.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gadget/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Mar 2009 02:55:47 -0000	1.1
+++ sources	16 Mar 2009 08:49:01 -0000	1.2
@@ -0,0 +1 @@
+22fb4906c7151355e56941ae434ab367  gadget-0.0.3.tar.gz




More information about the fedora-extras-commits mailing list