diff --git a/Ajaxterm-init.patch b/Ajaxterm-init.patch new file mode 100644 index 0000000..ff623d9 --- /dev/null +++ b/Ajaxterm-init.patch @@ -0,0 +1,56 @@ +diff -up Ajaxterm-0.10/configure.initd.redhat.orig Ajaxterm-0.10/configure.initd.redhat +--- Ajaxterm-0.10/configure.initd.redhat.orig 2006-10-29 03:52:39.000000000 +0100 ++++ Ajaxterm-0.10/configure.initd.redhat 2009-04-06 14:51:15.000000000 +0200 +@@ -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) +@@ -68,7 +68,7 @@ case "$1" in + fi + ;; + *) +- echo $"Usage: $prog {start|stop|restart|condrestart}" ++ echo $"Usage: $prog {start|stop|status|restart|condrestart}" + exit 1 + esac + diff --git a/Ajaxterm.spec b/Ajaxterm.spec new file mode 100644 index 0000000..4fbfdca --- /dev/null +++ b/Ajaxterm.spec @@ -0,0 +1,113 @@ +Name: Ajaxterm +Version: 0.10 +Release: 8%{?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 <%{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 %{_datadir}/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 +* Mon Apr 06 2009 Ruben Kerkhof 0.10-8 +- Fix ajaxterm homedir +- Add status command to init script + +* Mon Feb 23 2009 Fedora Release Engineering - 0.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 0.10-6 +- Rebuild for Python 2.6 + +* Sat Nov 22 2008 Ruben Kerkhof 0.10-5 +- set LANG=C in initscript, Ajaxterm doesn't support UTF-8 +- One last spec cleanup + +* Sun Nov 09 2008 Ruben Kerkhof 0.10-4 +- More review fixes (#470508) + +* Sun Nov 09 2008 Ruben Kerkhof 0.10-3 +- More review fixes (#470508) + +* Sun Nov 09 2008 Ruben Kerkhof 0.10-2 +- Review fixes (#470508) + +* Fri Nov 07 2008 Ruben Kerkhof 0.10-1 +- Initial import + diff --git a/dead.package b/dead.package deleted file mode 100644 index 6c90bdc..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -This package was retired on 2011-07-25 due to it being unable to build this package for multiple releases (FTBFS). diff --git a/sources b/sources new file mode 100644 index 0000000..5b39919 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +b10830a7a81d2a4c9f8815510dafb87a Ajaxterm-0.10.tar.gz