File shellinabox.spec of Package shellinabox
#
# spec file for package shellinabox
#
# Copyright (C) 2008-2009 Markus Gutschke <markus@shellinabox.com> and
# ohan Persson <johan162@gmail.com>
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
BuildRequires: libopenssl-devel pam-devel zlib-devel
PreReq: pam openssl libopenssl-devel
Summary: AJAX/Web based terminal emulator
Name: shellinabox
#
%define pkg_name shellinabox
#
Version: 2.10
Release: 1.1
License: SUSE-GPL-2.0-with-openssl-exception
URL: http://code.google.com/p/shellinabox/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Group: Productivity/Networking/Web/Utilities
%define shellinabox_user shellinabox
%define pkg_home /var/lib/%{shellinabox_user}
Requires: check-create-certificate
Source0: %{name}-%{version}.tar.bz2
# Fix possible buffer overwrite error in launcher.c
Patch: shellinabox.patch
Patch1: shellinabox-ia64-ppc-s390.patch
Source1: rcshellinabox
%description
Shell In A Box implements a web server that can export arbitrary command l
ine tools to a web based terminal emulator. This emulator is accessible to
any JavaScript and CSS enabled web browser and does not require any additional
browser plugins
All client-server communications are encrypted, if SSL/TLS certificates have been
installed.
Authors:
Markus Gutschke <markus@shellinabox.com>
%prep
%setup -q
%patch -p0
%patch1 -p1
%configure
%build
make %{?_smp_mflags}
%install
%makeinstall
%{__install} -d -m 0755 \
%{buildroot}%{pkg_home}/ \
%{buildroot}%{_sbindir}
#
# init script
#
%{__install} -D -m 0755 -T %SOURCE1 \
%{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
#
# configure certificates
mkdir -p $RPM_BUILD_ROOT/etc/%{pkg_name}/certs
%post
%fillup_and_insserv
%clean
%__rm -rf %{buildroot}
%pre
/usr/sbin/groupadd -r %{shellinabox_user} &>/dev/null ||:
/usr/sbin/useradd -g %{shellinabox_user} -s /bin/false -r -c "user for %{shellinabox_user}" -d %{pkg_home} %{shellinabox_user} &>/dev/null ||:
# ---------------------------------------------------------------------------------
%preun
%stop_on_removal
/sbin/chkconfig --del shellinabox
# ---------------------------------------------------------------------------------
# Cleanup after install
# ---------------------------------------------------------------------------------
%postun
%insserv_cleanup
test -e /var/run/shellinabox.pid || rm -rf /var/run/shellinabox.pid && :
# ---------------------------------------------------------------------------------
# FILES
# ---------------------------------------------------------------------------------
%files
%defattr(-,root,root)
%attr(-,%{shellinabox_user},%{shellinabox_user}) %dir %{pkg_home}
%{_initrddir}/shellinabox
%doc %attr(0444,root,root) %{_mandir}/man1/shellinaboxd.1*
%doc /usr/share/doc/shellinabox
%{_bindir}/shellinaboxd
%dir /etc/shellinabox/
%dir /etc/shellinabox/certs
%{_sbindir}/rc%{pkg_name}
%changelog