Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 36ee388f7b71ee875072f9ddd3483759 > files > 3

sslh-1.13-0.2.mga3.src.rpm

%define name sslh
%define version 1.13
%define sversion %{version}b
%define release %mkrel 0.2

Summary:	ssl/ssh multiplexer
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	%{name}-%{sversion}.tar.gz
Patch0:		sslh-1.13b-mga-path.patch
License:	GPLv2+
Group:		Networking/Other
Url:		http://www.rutschle.net/tech/sslh.shtml
BuildRequires:	libconfig-devel

%description
sslh accepts HTTPS, SSH, OpenVPN, tinc and XMPP connections on the
same port. This makes it possible to connect to any of these servers
on port 443 (e.g. from inside a corporate firewall, which almost never
block port 443) while still serving HTTPS on that port.

%prep
%setup -q
%apply_patches

cat > README.install.urpmi <<EOF
By default, %{name} is not configured and will not be able to start.
You need to enable configuration options in this file:
  %{_sysconfdir}/sysconfig/%{name}
Then run:
  systemctl restart %{name}.service
EOF

%build
%make CFLAGS="%optflags"

%install
rm -rf %{buildroot}
%makeinstall PREFIX=%{buildroot}%{_prefix}
install -Dpm 644 scripts/systemd.%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -d %{buildroot}%{_sysconfdir}/sysconfig
cat > %{buildroot}%{_sysconfdir}/sysconfig/%{name} <<EOF
## Uncomment the DAEMON_OPTS config line below to redirect https port
## to local ssh port or local port 1443, depending on incoming
## connection.
##
## To make this works with https and apache, you need to modify
## /etc/httpd/conf/sites.d/01_ssl.conf to listen to local port 1443:
##   Listen localhost:1443
## (instead of Listen 443)
## and then run: systemctl reload httpd.service
##
## Also make sure your VirtualHost is configured for localhost:1443
##
# DAEMON_OPTS=-p 0.0.0.0:443 --ssh localhost:22 --ssl localhost:1443
EOF

%post
%_post_service %{name}

%preun
%_preun_service %{name}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README.install.urpmi README ChangeLog
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_sbindir}/%{name}
%{_mandir}/man8/*
%{_unitdir}/%{name}.service


%changelog

* Mon Jan 14 2013 umeabot <umeabot> 1.13-0.2.mga3
+ Revision: 382663
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Nov 08 2012 blino <blino> 1.13-0.1.mga3
+ Revision: 316259
- install systemd service and add Mageia-specific sysconfig file and documentation
- buildrequire libconfig-devel
- 1.13b
- remove BuildRoot

* Thu Dec 01 2011 blino <blino> 1.10-1.mga2
+ Revision: 174646
- initial sslh import
- Created package structure for sslh.