Name: Ajaxterm
Version: 0.10
Release: 14%{?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
Source1: Ajaxterm.init
Source2: Ajaxterm.sysconfig
Source3: README.Fedora
Source4: Ajaxterm.apache
# patches from Debian
Patch1: 0001-01_bin_dir.diff-from-Debian.patch
Patch2: 0002-02_initd.diff-from-Debian.patch
Patch3: 0003-03_fix_man.diff-from-Debian.patch
Patch4: 0004-04_use-default-python.diff-from-Debian.patch
Patch5: 0005-05_ssh-port.diff-from-Debian.patch
Patch6: 0006-06_fix-IOError.diff-from-Debian.patch
Patch7: 0007-07_use_psyco.diff-from-Debian.patch
Patch8: 0008-10_hostname-login.diff-from-Debian.patch
Patch9: 0009-15_add-configure-file.diff-from-Debian.patch
Patch10: 0010-20_bugfixes-tweaks-by-blt.diff-from-Debian.patch
Patch11: 0011-25_CVE-2009-1629.diff-from-Debian.patch
Patch12: 0012-30_utf8-support.diff-from-Debian.patch
Patch13: 0013-35_fix-sarissa.diff-from-Debian.patch
Patch14: 0014-40_more-ctrl-catches.diff-from-Debian.patch
# our own patches
Patch100: 0001-Create-etc.patch
Patch101: 0002-Fix-permissions-on-manfile.patch
Patch102: 0003-Remove-shebang-line.patch
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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
install -pm 0644 %{SOURCE3} .
install -Dp -m 0644 %{SOURCE4} examples/Ajaxterm.apache
%build
./configure --prefix=%{buildroot}%{_prefix} --confdir=%{buildroot}%{_sysconfdir}
%install
make install
install -D -p -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/ajaxterm
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ajaxterm
%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 README.Fedora examples
%{_bindir}/ajaxterm
%{_datadir}/ajaxterm
%{_mandir}/man1/ajaxterm.1.gz
%{_initrddir}/ajaxterm
%config(noreplace) %{_sysconfdir}/ajaxterm.conf
%config(noreplace) %{_sysconfdir}/sysconfig/ajaxterm
%ghost %attr(0644,root,root) %{_localstatedir}/run/ajaxterm.pid
%ghost %attr(0644,root,root) %{_localstatedir}/lock/subsys/ajaxterm
%changelog
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Nov 24 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-13
- %%ghost files in /var/run and /var/lock (#656543)
* Sun Oct 17 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-12
- Apply patches from Debian (fixes #635238, #544033, enables UTF-8)
- Cleanup init script
- Add a sysconfig file
- Relocate pidfile to /var/run/ajaxterm/ajaxterm.pid
- Add a README.Fedora
- Add an example config for Apache
* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 0.10-11
- recompiling .py files against Python 2.7 (rhbz#623267)
* Wed Aug 11 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-10
- Rebuild for python 2.7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Apr 06 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-8
- Fix ajaxterm homedir
- Add status command to init script
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10-6
- Rebuild for Python 2.6
* Sat Nov 22 2008 Ruben Kerkhof <ruben@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@rubenkerkhof.com> 0.10-4
- More review fixes (#470508)
* Sun Nov 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-3
- More review fixes (#470508)
* Sun Nov 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-2
- Review fixes (#470508)
* Fri Nov 07 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-1
- Initial import