summaryrefslogtreecommitdiff
path: root/rapid-tunneling.spec
blob: 5afe062d08e6107d0d774a63736b6122059eac75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Summary: Xorcom RapidTunneling (tm)
Name: rapid-tunneling
Version: 1.0
Release: 1
License: GPLv2
Group: Applications/Internet
URL: http://www.xorcom.com/
Source: rapid-tunneling-%{version}.tar.gz
#Patch0: libname.diff
#Patch1: bristuff.diff
Requires: openssh-clients busybox

# Patch: libpri-1.2.3-cflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
RapidTunneling (tm) allows remote access to machines behind firewalls
and NAT routers via SSH port forwarding.

#%package devel
#Summary: Header files and development libraries for libpri
#Group: Development/Libraries
#Requires: %{name} = %{version}

#%description devel
#This package contains the header files needed to compile applications that
#will use libpri.

%prep
%setup -q
# %patch -p1 -b .cflags
#%{__perl} -pi -e 's|(\$\(INSTALL_BASE\)/)lib|$1%{_lib}|g' Makefile
#%patch0 -p1

# this does basically:  cp -a . bristuff
#mkdir %{bristuff_dir}
#tar cf - . --exclude ./%{bristuff_dir} | tar xf - -C %{bristuff_dir}
#cd %{bristuff_dir}
#%patch1 -p1

%build
#export CFLAGS="%{optflags}"
#%{__make} %{?_smp_mflags}

#cd %{bristuff_dir}
#%{__make} %{?_smp_mflags}  LIB_SUF=bristuffed

%install
%{__rm} -rf %{buildroot}
%{__install} -m 755 -d %{buildroot}%{_sbindir}
%{__install} -m 755 rapid-tunneling %{buildroot}%{_sbindir}
%{__install} -m 755 rapid-tunneling-status %{buildroot}%{_sbindir}
%{__install} -m 755 -d %{buildroot}/var/lib/rapid-tunneling

#%{__rm} -rf %{buildroot}
#%{__make} install INSTALL_PREFIX=%{buildroot}

#cd %{bristuff_dir}
#%{__make} install INSTALL_PREFIX=%{buildroot} LIB_SUF=bristuffed

%clean
%{__rm} -rf %{buildroot}

%post
# add a user with uid=gid=0
useradd -d /var/lib/rapid-tunneling/home -m -u 0 -g 0 -o rapid-tunneling 2>/dev/null || true

%preun
if [ "$1" = 0 ]; then
	userdel -r rapid-tunneling || true
fi

%files
%defattr(-, root, root, 0755)
#%doc ChangeLog LICENSE README TODO
%{_sbindir}/*
/var/lib/rapid-tunneling

#%files devel
#%defattr(-, root, root, 0755)
#%{_sbindir}/*

%changelog
* Sun Dec  8 2008 Alex Landau <alex.landau@xorcom.com> 1.0-1
- Initial RPM release.