From 44b9e2b755e809bbbcc8d5bf2ca6312387225551 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 29 Apr 2016 16:39:04 -0400 Subject: [PATCH] New upstream release 1.0.0 - Rewritten in Go - Runtime depends only on OpenSSL, no more Python - Support for writing certificate and key in a single file --- .gitignore | 1 + sources | 2 +- sscg.spec | 84 ++++++++++++++++++++++-------------------------------- 3 files changed, 36 insertions(+), 51 deletions(-) diff --git a/.gitignore b/.gitignore index a44d898..34cea08 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sscg-0.4.1.tar.gz +/sscg-1.0.0-a3fe426.tar.gz diff --git a/sources b/sources index 6aa4305..ddb6cfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8f0930b81b58d9c4f0d63e4c683307d2 sscg-0.4.1.tar.gz +56420d1095dc08e9fa57d382a6d35966 sscg-1.0.0-a3fe426.tar.gz diff --git a/sscg.spec b/sscg.spec index f4f2016..d9542ee 100644 --- a/sscg.spec +++ b/sscg.spec @@ -1,36 +1,30 @@ -%if (0%{?fedora} >= 22 || 0%{?rhel} >= 8) -%global use_python3 1 -%endif +%global provider github +%global provider_tld com +%global project sgallagher +%global repo sscg +# https://github.com/sgallagher/sscg +%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} +%global import_path %{provider_prefix} +%global commit a3fe426d3cd1c3c65375bda774f631e9ed20e9c0 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global srcname sscg -Name: %{srcname} -Version: 0.4.1 + +Name: %{repo} +Version: 1.0.0 Release: 1%{?dist} Summary: Self-signed certificate generator License: BSD -URL: https://github.com/sgallagher/%{srcname} -Source0: https://github.com/sgallagher/%{srcname}/releases/download/%{srcname}-%{version}/%{srcname}-%{version}.tar.gz +URL: https://%{provider_prefix} +Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{version}-%{shortcommit}.tar.gz +ExclusiveArch: %{go_arches} -BuildArch: noarch +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} +BuildRequires: openssl-devel -%if 0%{?use_python3} -Requires: python3-pyOpenSSL -Requires: python3-pyasn1 -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pyOpenSSL -BuildRequires: python3-pyasn1 -%else -Requires: pyOpenSSL -Requires: python-pyasn1 -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: pyOpenSSL -BuildRequires: python-pyasn1 -%endif -BuildRequires: gettext +Provides: bundled(golang(github.com/spacemonkeygo/openssl)) +Provides: bundled(golang(github.com/spacemonkeygo/spacelog)) %description A utility to aid in the creation of more secure "self-signed" @@ -41,40 +35,30 @@ up a full PKI environment and without exposing the machine to a risk of false signatures from the service certificate. %prep -%setup -q -n %{srcname}-%{version} +%setup -q -n %{repo}-%{commit} %build -# Ensure egg-info is regenerated -rm -rf src/*.egg-info +mkdir -p src/%{provider}.%{provider_tld}/%{project}/ +ln -s ../../../ src/%{provider}.%{provider_tld}/%{project}/%{repo} -%if 0%{?use_python3} -%{__python3} setup.py build -%else -%{__python2} setup.py build -%endif # use_python3 +export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} +%gobuild -o bin/%{name} %{import_path} %install -rm -rf $RPM_BUILD_ROOT - -%if 0%{?use_python3} -%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT -%else -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -%endif # use_python3 +install -d -p %{buildroot}%{_bindir} +install -p -m 755 bin/%{name} %{buildroot}%{_bindir} %files -%license src/sscg/LICENSE -%{_bindir}/%{srcname} - -%if 0%{?use_python3} -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ -%else -%{python2_sitelib}/%{srcname}/ -%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/ -%endif #use_python3 +%license LICENSE +%{_bindir}/%{repo} %changelog +* Fri Apr 29 2016 Stephen Gallagher - 1.0.0-1 +- New upstream release 1.0.0 +- Rewritten in Go +- Runtime depends only on OpenSSL, no more Python +- Support for writing certificate and key in a single file + * Fri Jun 19 2015 Fedora Release Engineering - 0.4.1-1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild