File stonevpn.spec of Package stonevpn
#
# spec file for package stonevpn
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?python_sitelib: %{expand: %%global python_sitelib %%(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib();")}}
%{!?_rundir: %{expand: %%global _rundir %{_localstatedir}/run}}
Name: stonevpn
Version: 0.4.16
Release: 0
Summary: Easy OpenVPN certificate and configuration management
License: GPL-2.0+
Group: Productivity/Networking/Security
Url: http://github.com/lkeijser/stonevpn
Source0: https://github.com/lkeijser/stonevpn/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-configobj
BuildRequires: python-ipy
Requires: openssl
BuildRequires: openssl
%if 0%{?suse_version}
Requires: python-pyOpenSSL
BuildRequires: python-pyOpenSSL
%else
Requires: pyOpenSSL
BuildRequires: pyOpenSSL
%endif
Requires: python-configobj
Requires: python-ipy
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
# sle is too old for noarch
Requires: python-base = %py_ver
BuildRequires: python-base
BuildArch: noarch
%else
Requires: python = %py_ver
BuildRequires: python
%endif
%description
StoneVPN is a system that makes it easy to create certificates and configuration files
for use with an OpenVPN server for both Windows and Linux users. It has the ability to
create a zip file and e-mail the entire package to a user. It uses pyOpenSSL,
and the latest version of it allows it to manage a CRL file.
%prep
%setup -n %{name}-%{version}
sed -ri -e "s@^(working =).*@\1 '/var/tmp/stonevpn'@g" \
-e "s@^(opensslconf =).*@\1 '/etc/ssl/openssl.cnf'@g" conf/stonevpn.conf
%build
python setup.py build
%install
python setup.py install -O1 --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}/%python_sitelib
install -m0644 -D man/stonevpn.1 %{buildroot}%{_mandir}/man1/stonevpn.1
install -m0644 -D man/stonevpn.conf.5 %{buildroot}%{_mandir}/man5/stonevpn.conf.5
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{python_sitelib}/*
%{_bindir}/stonevpn
%config(noreplace) %{_sysconfdir}/stonevpn.conf
%_mandir/man1/%{name}.1*
%_mandir/man5/%{name}.conf.5*
%changelog