# git clone https://github.com/apenwarr/sshuttle.git; cd sshuttle
# checkout=`git log --pretty=format:"%adgit%h" -n1 --date=short|sed 's@-@@g'`
# git archive --format=tar.gz --prefix=sshuttle-0-$checkout/ --output ../sshuttle-0-$checkout.tar.gz master
# mv ../sshuttle-0-$checkout.tar.gz ~/rpmbuild/SOURCES
%global checkout 20120810git9ce2fa0
Name: sshuttle
Version: 0
Release: 7.%{checkout}%{?dist}
Summary: Transparent Proxy VPN
Source0: %{name}-%{version}-%{checkout}.tar.gz
URL: https://github.com/apenwarr/sshuttle
Group: Applications/Internet
License: LGPLv2+
BuildArch: noarch
BuildRequires: python-markdown
BuildRequires: python-BeautifulSoup
Requires: iptables
Requires: openssh-clients
%description
Transparent proxy server that works as a poor man's VPN. Forwards over ssh.
Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.
%prep
%setup -q -n %{name}-%{version}-%{checkout}
rm stresstest.py
%build
make
%__python -c 'import compileall
compileall.compile_dir(".",ddir="%{_datadir}/%{name}",force=True)'
%install
install -d "%{buildroot}%{_datadir}/%{name}"
install -m0644 -p *.py* "%{buildroot}%{_datadir}/%{name}"
cp -a compat "%{buildroot}%{_datadir}/%{name}/"
install -d "%{buildroot}%{_bindir}"
cat<<EOF >"%{buildroot}%{_bindir}/%{name}"
#!/bin/sh
PYTHONPATH="%{_datadir}/%{name}"
export PYTHONPATH
exec %__python "%{_datadir}/%{name}/main.py" "%__python" "\$@"
EOF
chmod 0755 "%{buildroot}%{_bindir}/%{name}"
gzip Documentation/sshuttle.8
mkdir -p %{buildroot}/%{_mandir}/man8
mv Documentation/sshuttle.8.gz %{buildroot}/%{_mandir}/man8
%files
%doc LICENSE README.md
%{_mandir}/man8/sshuttle.8.gz
%{_bindir}/sshuttle
%{_datadir}/%{name}
%changelog
* Mon Jan 07 2013 Marcel Wysocki <maci@satgnu.net> - 0-7.20120810git9ce2fa0
- don't use doc macro for files in mandir
* Fri Nov 23 2012 Marcel Wysocki <maci@satgnu.net> - 0-6.20120810git9ce2fa0
- fixed hash ( woops, where did that g come from )
- fixed date to be commit date and not clone date
- use version 0
- use datadir instead of /usr/local
- remove sshuttle.md in favor of the manpage
- remove make from BR
- added comment on how to create the source tarball
* Wed Oct 31 2012 Marcel Wysocki <maci@satgnu.net> - 20121019-5.gitg9ce2fa0
- remove python from deps and builddeps, rpm picks it up automatically
- add manual page
- add missing builddep for manual generation
* Mon Oct 22 2012 Marcel Wysocki <maci@satgnu.net> - 20121019-4.gitg9ce2fa0
- add missing dependencies
* Mon Oct 22 2012 Marcel Wysocki <maci@satgnu.net> - 20121019-3.gitg9ce2fa0
- Don't use macros for rm, install, chmod and cp.
- Remove defattr, since we're not going for EPEL4.
- Remove the clean section since we're not going for EPEL5.
* Fri Oct 19 2012 Marcel Wysocki <maci@satgnu.net> - 20121019-2.gitg9ce2fa0
- use .tar.gz instead of .zip
* Fri Oct 19 2012 Marcel Wysocki <maci@satgnu.net> - 20121019-1.gitg9ce2fa0
- update to newer spapshot
- adhere more to packaging guidelines
* Thu Oct 18 2012 Marcel Wysocki <maci@satgnu.net> - 0.20121018-3
- update to newer spapshot
- fedora port
- adhere more to packaging guidelines
* Wed May 4 2011 pascal.bleser@opensuse.org
- initial version (0.20110503)