summaryrefslogtreecommitdiff
path: root/rapid-tunneling.spec
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 13:30:48 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 13:30:48 +0000
commit3a8648ba285491f67c75c92e5e532f2b6e74ad8b (patch)
treecbac62bd563e58f2205a2c60b9fd0145c22a0cc0 /rapid-tunneling.spec
parent48421749c15ba7e2e527b91cf3c5cffee3465b5e (diff)
Move rapid-tunneling-gui package into the main source package.
git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6557 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'rapid-tunneling.spec')
-rw-r--r--rapid-tunneling.spec34
1 files changed, 34 insertions, 0 deletions
diff --git a/rapid-tunneling.spec b/rapid-tunneling.spec
index 7e342ce..49811b5 100644
--- a/rapid-tunneling.spec
+++ b/rapid-tunneling.spec
@@ -10,6 +10,8 @@ Requires: openssh-clients busybox gnupg
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+%define webroot /var/www/html/support
+
%description
RapidTunneling (tm) allows remote access to machines behind firewalls
and NAT routers via SSH port forwarding.
@@ -22,6 +24,18 @@ Requires: openssh-server
%description server
This package contains the server files needed to run RapidTunneling Server.
+%package gui
+Summary: Xorcom RapidTunneling (tm) web GUI
+Group: Applications/Internet
+Requires: rapid-tunneling, sudo
+
+%description gui
+RapidTunneling (tm) allows remote access to machines behind firewalls
+and NAT routers via SSH port forwarding.
+
+This package contains the web-based user interface to initiate and
+control tunnels to the server.
+
%prep
%setup -q
@@ -62,6 +76,22 @@ fi
%postun server
/sbin/service sshd_support condrestart > /dev/null 2>&1 || :
+%post gui
+SUDOERS=/etc/sudoers
+LINE="asterisk ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling"
+LINE2="asterisk ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status"
+if ! fgrep -q "$LINE" $SUDOERS; then echo "$LINE" >> $SUDOERS; fi
+if ! fgrep -q "$LINE2" $SUDOERS; then echo "$LINE2" >> $SUDOERS; fi
+
+%preun gui
+if [ "$1" = 0 ]; then
+ SUDOERS=/etc/sudoers
+ LINE="asterisk ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling"
+ LINE2="asterisk ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status"
+ fgrep -v "$LINE" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+ fgrep -v "$LINE2" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+fi
+
%files
%defattr(-, root, root, 0755)
%{_sbindir}/rapid-tunneling
@@ -77,6 +107,10 @@ fi
%{_datadir}/rapid-tunneling/bin/rt-from-remote
/var/lib/rapid-tunneling
+%files gui
+%defattr(-, root, root, 0755)
+%{webroot}/
+
%changelog
* Sun Dec 14 2008 Alex Landau <alex.landau@xorcom.com> 1.0-1
- Initial RPM release.