From 3a8648ba285491f67c75c92e5e532f2b6e74ad8b Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 6 Jan 2009 13:30:48 +0000 Subject: 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 --- rapid-tunneling.spec | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'rapid-tunneling.spec') 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 1.0-1 - Initial RPM release. -- cgit v1.2.3