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