summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Landau <alex.landau@xorcom.com>2008-12-07 15:44:07 +0000
committerAlex Landau <alex.landau@xorcom.com>2008-12-07 15:44:07 +0000
commit817f3069a8eb684675d266d4b95aa0bb1a4de9ff (patch)
tree24873d2e40c904faf1f579117fb711acd1471719
parent4b6f3a17dc619141628161b927efd9689f15fc22 (diff)
rapid-tunneling:
- Added RPM Spec and a Makefile. - Running "make" creates an RPM and an SRPM. git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6423 283159da-0705-0410-b60c-f2062b4bb6ad
-rw-r--r--Makefile17
-rw-r--r--rapid-tunneling.spec84
2 files changed, 101 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1a1fdef
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+PACKAGE = rapid-tunneling
+SPEC = rapid-tunneling.spec
+
+SOURCES = rapid-tunneling
+
+VER = $(shell awk '/^Version: / {print $$2}' $(SPEC)| head -n 1)
+REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1)
+
+all: rpm
+
+rpm: $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz
+ mkdir -p BUILD RPMS SOURCES SRPMS
+ [ -e SPECS ] || ln -s . SPECS
+ cd SPECS; rpmbuild --target noarch --define "_topdir $(PWD)" -ba $(SPEC)
+
+SOURCES/$(PACKAGE)-%.tar.gz: $(SOURCES)
+ tar czf $@ --transform 's|^|$(PACKAGE)-$(VER)/|' $^
diff --git a/rapid-tunneling.spec b/rapid-tunneling.spec
new file mode 100644
index 0000000..3b0645e
--- /dev/null
+++ b/rapid-tunneling.spec
@@ -0,0 +1,84 @@
+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
+
+# 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 -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 7 2008 Alex Landau <alex.landau@xorcom.com> 1.0-1
+- Initial RPM release.