Blame Ajaxterm.spec

db94d49
Name:           Ajaxterm
db94d49
Version:        0.10
f2b8f91
Release:        8%{?dist}
db94d49
Summary:        A web-based terminal
db94d49
db94d49
Group:          Development/Languages
db94d49
License:        Public Domain and LGPLv2+
db94d49
URL:            http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm
db94d49
Source0:        http://antony.lesuisse.org/qweb/files/%{name}-%{version}.tar.gz
db94d49
Patch0:         Ajaxterm-init.patch
db94d49
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
db94d49
db94d49
BuildArch:      noarch
db94d49
BuildRequires:  python
db94d49
db94d49
Requires(pre):    shadow-utils
db94d49
Requires(post):   chkconfig
db94d49
Requires(preun):  chkconfig, initscripts
db94d49
Requires(postun): initscripts
db94d49
db94d49
%description
db94d49
Ajaxterm is a web based terminal. It was totally inspired and works almost 
db94d49
exactly like http://anyterm.org/ except it's much easier to install.
db94d49
db94d49
%prep
db94d49
%setup -q
db94d49
%patch0 -p1 -b .orig
db94d49
sed -i 's|\r||' README.txt # fix eol encoding
db94d49
sed -i 's|bin/python2.3|bin/python|' qweb.py
db94d49
db94d49
db94d49
db94d49
%build
db94d49
./configure --prefix=%{buildroot}%{_prefix} --confdir=%{buildroot}%{_sysconfdir}
db94d49
db94d49
db94d49
%install
db94d49
rm -rf %{buildroot}
db94d49
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
db94d49
mkdir -p %{buildroot}/%{_initrddir}
db94d49
make install
db94d49
db94d49
mv %{buildroot}%{_sysconfdir}/init.d/ajaxterm %{buildroot}%{_initrddir}/ajaxterm
db94d49
rmdir %{buildroot}/%{_sysconfdir}/init.d
db94d49
chmod 0755 %{buildroot}%{_datadir}/ajaxterm/qweb.py
db94d49
chmod 0644 %{buildroot}%{_mandir}/man1/ajaxterm.1.gz
db94d49
cat <<EOF >%{buildroot}%{_bindir}/ajaxterm
db94d49
#!/bin/sh
db94d49
PYTHONPATH=/usr/share/ajaxterm exec /usr/share/ajaxterm/ajaxterm.py \$@
db94d49
EOF
db94d49
db94d49
%clean
db94d49
rm -rf %{buildroot}
db94d49
db94d49
%pre
db94d49
getent group ajaxterm >/dev/null || groupadd -r ajaxterm
db94d49
getent passwd ajaxterm >/dev/null || \
f2b8f91
useradd -r -g ajaxterm -d %{_datadir}/ajaxterm -s /sbin/nologin \
db94d49
-c "Ajaxterm user" ajaxterm
db94d49
exit 0
db94d49
db94d49
%post
db94d49
/sbin/chkconfig --add ajaxterm
db94d49
db94d49
%preun
db94d49
if [ $1 = 0 ]; then
db94d49
    /sbin/service ajaxterm stop >/dev/null 2>&1 || :
db94d49
    /sbin/chkconfig --del ajaxterm
db94d49
fi
db94d49
db94d49
%postun
db94d49
if [ $1 -ge 1 ] ; then
db94d49
    /sbin/service ajaxterm condrestart > /dev/null 2>&1 || :
db94d49
fi
db94d49
db94d49
db94d49
db94d49
%files
db94d49
%defattr(-,root,root,-)
db94d49
%doc README.txt
db94d49
%{_initrddir}/ajaxterm
db94d49
%{_bindir}/ajaxterm
db94d49
%{_datadir}/ajaxterm
db94d49
%{_mandir}/man1/ajaxterm.1.gz
db94d49
db94d49
db94d49
%changelog
f2b8f91
* Tue Apr 07 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-8
f2b8f91
- Fix ajaxterm homedir
f2b8f91
- Add status command to init script
f2b8f91
db94d49
* Sat Nov 22 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-5
db94d49
- set LANG=C in initscript, Ajaxterm doesn't support UTF-8
db94d49
- One last spec cleanup
db94d49
db94d49
db94d49
* Sun Nov 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-4
db94d49
- More review fixes (#470508)
db94d49
db94d49
* Sun Nov 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-3
db94d49
- More review fixes (#470508)
db94d49
db94d49
* Sun Nov 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-2
db94d49
- Review fixes (#470508)
db94d49
db94d49
* Fri Nov 07 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.10-1
db94d49
- Initial import
db94d49