rpms/Ajaxterm/EL-5 Ajaxterm-init.patch, NONE, 1.1 Ajaxterm.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ruben Kerkhof ruben at fedoraproject.org
Sat Nov 22 15:28:10 UTC 2008


Author: ruben

Update of /cvs/pkgs/rpms/Ajaxterm/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8010

Modified Files:
	.cvsignore sources 
Added Files:
	Ajaxterm-init.patch Ajaxterm.spec 
Log Message:
* Sat Nov 22 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-5
- set LANG=C in initscript, Ajaxterm doesn't support UTF-8
- One last spec cleanup


Ajaxterm-init.patch:

--- NEW FILE Ajaxterm-init.patch ---
diff -up Ajaxterm-0.10/configure.initd.redhat.orig Ajaxterm-0.10/configure.initd.redhat
--- Ajaxterm-0.10/configure.initd.redhat.orig	2008-11-22 13:45:35.000000000 +0100
+++ Ajaxterm-0.10/configure.initd.redhat	2008-11-22 13:46:38.000000000 +0100
@@ -1,8 +1,8 @@
-#
+#!/bin/bash
 # ajaxterm     Startup script for ajaxterm
 #
 # chkconfig: - 99 99
-# description: Ajaxterm is a yadda yadda yadda
+# description: Ajaxterm is a web-based terminal
 # processname: ajaxterm
 # pidfile: /var/run/ajaxterm.pid
 # version: 1.0 Kevin Reichhart - ajaxterminit at lastname dot org
@@ -14,18 +14,18 @@ if [ -f /etc/sysconfig/ajaxterm ]; then
     . /etc/sysconfig/ajaxterm
 fi
 
-ajaxterm=/usr/local/bin/ajaxterm
+ajaxterm=/usr/bin/ajaxterm
 prog=ajaxterm
-pidfile=${PIDFILE-/var/run/ajaxterm.pid}
-lockfile=${LOCKFILE-/var/lock/subsys/ajaxterm}
+pidfile=/var/run/ajaxterm.pid
+lockfile=/var/lock/subsys/ajaxterm
 port=${PORT-8022}
-user=${xUSER-nobody}
+user=${USER-ajaxterm}
 RETVAL=0
 
 
 start() {
     echo -n $"Starting $prog: "
-    daemon $ajaxterm --daemon --port=$port --uid=$user $OPTIONS
+    LANG=C daemon $ajaxterm --daemon --port=$port --uid=$user $OPTIONS
     RETVAL=$?
     echo
     [ $RETVAL = 0 ] && touch ${lockfile}
@@ -54,7 +54,7 @@ case "$1" in
         stop
         ;;
     status)
-        status python ajaxterm
+        status $prog
         RETVAL=$?
         ;;
     restart)


--- NEW FILE Ajaxterm.spec ---
Name:           Ajaxterm
Version:        0.10
Release:        5%{?dist}
Summary:        A web-based terminal

Group:          Development/Languages
License:        Public Domain and LGPLv2+
URL:            http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm
Source0:        http://antony.lesuisse.org/qweb/files/%{name}-%{version}.tar.gz
Patch0:         Ajaxterm-init.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python

Requires(pre):    shadow-utils
Requires(post):   chkconfig
Requires(preun):  chkconfig, initscripts
Requires(postun): initscripts

%description
Ajaxterm is a web based terminal. It was totally inspired and works almost 
exactly like http://anyterm.org/ except it's much easier to install.

%prep
%setup -q
%patch0 -p1 -b .orig
sed -i 's|\r||' README.txt # fix eol encoding
sed -i 's|bin/python2.3|bin/python|' qweb.py



%build
./configure --prefix=%{buildroot}%{_prefix} --confdir=%{buildroot}%{_sysconfdir}


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
mkdir -p %{buildroot}/%{_initrddir}
make install

mv %{buildroot}%{_sysconfdir}/init.d/ajaxterm %{buildroot}%{_initrddir}/ajaxterm
rmdir %{buildroot}/%{_sysconfdir}/init.d
chmod 0755 %{buildroot}%{_datadir}/ajaxterm/qweb.py
chmod 0644 %{buildroot}%{_mandir}/man1/ajaxterm.1.gz
cat <<EOF >%{buildroot}%{_bindir}/ajaxterm
#!/bin/sh
PYTHONPATH=/usr/share/ajaxterm exec /usr/share/ajaxterm/ajaxterm.py \$@
EOF

%clean
rm -rf %{buildroot}

%pre
getent group ajaxterm >/dev/null || groupadd -r ajaxterm
getent passwd ajaxterm >/dev/null || \
useradd -r -g ajaxterm -d ajaxterm -s /sbin/nologin \
-c "Ajaxterm user" ajaxterm
exit 0

%post
/sbin/chkconfig --add ajaxterm

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

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



%files
%defattr(-,root,root,-)
%doc README.txt
%{_initrddir}/ajaxterm
%{_bindir}/ajaxterm
%{_datadir}/ajaxterm
%{_mandir}/man1/ajaxterm.1.gz


%changelog
* Sat Nov 22 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-5
- set LANG=C in initscript, Ajaxterm doesn't support UTF-8
- One last spec cleanup


* Sun Nov 09 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-4
- More review fixes (#470508)

* Sun Nov 09 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-3
- More review fixes (#470508)

* Sun Nov 09 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-2
- Review fixes (#470508)

* Fri Nov 07 2008 Ruben Kerkhof <ruben at rubenkerkhof.com> 0.10-1
- Initial import



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/Ajaxterm/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	19 Nov 2008 01:46:18 -0000	1.1
+++ .cvsignore	22 Nov 2008 15:27:39 -0000	1.2
@@ -0,0 +1 @@
+Ajaxterm-0.10.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/Ajaxterm/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	19 Nov 2008 01:46:18 -0000	1.1
+++ sources	22 Nov 2008 15:27:39 -0000	1.2
@@ -0,0 +1 @@
+b10830a7a81d2a4c9f8815510dafb87a  Ajaxterm-0.10.tar.gz




More information about the fedora-extras-commits mailing list