LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File shellinabox.spec of Package shellinabox (Project openSUSE:Factory)

# 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}

Source0: %{name}-%{version}.tar.bz2
# Fix possible buffer overwrite error in launcher.c
Patch:  shellinabox.patch
Patch1: shellinabox-ia64-ppc-s390.patch
Source1: rcshellinabox

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

Markus Gutschke <markus@shellinabox.com>

%setup -q
%patch -p0
%patch1 -p1

make %{?_smp_mflags}

%{__install} -d -m 0755      \
    %{buildroot}%{pkg_home}/ \

# init script
%{__install} -D -m 0755 -T %SOURCE1 \
%{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}

# configure certificates
mkdir -p $RPM_BUILD_ROOT/etc/%{pkg_name}/certs


%__rm -rf %{buildroot}

/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 ||:

# ---------------------------------------------------------------------------------
/sbin/chkconfig --del shellinabox

# ---------------------------------------------------------------------------------
# Cleanup after install
# ---------------------------------------------------------------------------------
test -e /var/run/shellinabox.pid  || rm -rf /var/run/shellinabox.pid && :

# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------

%attr(-,%{shellinabox_user},%{shellinabox_user}) %dir %{pkg_home}
%doc %attr(0444,root,root) %{_mandir}/man1/shellinaboxd.1*
%doc /usr/share/doc/shellinabox
%dir /etc/shellinabox/
%dir /etc/shellinabox/certs