[golang-github-shurcooL-sanitized_anchor_name/f20] First package for Fedora - resolves: #1196551

Jan Chaloupka jchaloup at fedoraproject.org
Fri Feb 27 09:09:27 UTC 2015


commit dd60acb3f89c65b2764a865c2168d4c38a8f6f27
Author: Jan Chaloupka <jchaloup at redhat.com>
Date:   Fri Feb 27 09:50:04 2015 +0100

    First package for Fedora
    - resolves: #1196551

 .gitignore                                        |  1 +
 0001-move-license-to-LICENSE.patch                | 54 ++++++++++++++++++++
 golang-github-shurcooL-sanitized_anchor_name.spec | 60 +++++++++++++++++++++++
 sources                                           |  1 +
 4 files changed, 116 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5052d0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sanitized_anchor_name-8e87604.tar.gz
diff --git a/0001-move-license-to-LICENSE.patch b/0001-move-license-to-LICENSE.patch
new file mode 100644
index 0000000..9d80904
--- /dev/null
+++ b/0001-move-license-to-LICENSE.patch
@@ -0,0 +1,54 @@
+From 085ffc278dc34c797f88635ca3de7fca3ec03416 Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup at redhat.com>
+Date: Fri, 27 Feb 2015 09:51:18 +0100
+Subject: [PATCH] move license to LICENSE
+
+---
+ LICENSE   | 22 ++++++++++++++++++++++
+ README.md |  4 ----
+ 2 files changed, 22 insertions(+), 4 deletions(-)
+ create mode 100644 LICENSE
+
+diff --git a/LICENSE b/LICENSE
+new file mode 100644
+index 0000000..35e1135
+--- /dev/null
++++ b/LICENSE
+@@ -0,0 +1,22 @@
++The MIT License (MIT)
++
++Copyright (c) <year> <copyright holders>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++
+diff --git a/README.md b/README.md
+index 089c440..15ef6e4 100644
+--- a/README.md
++++ b/README.md
+@@ -19,7 +19,3 @@ fmt.Println(anchorName)
+ // this-is-a-header
+ ```
+ 
+-License
+--------
+-
+-- [MIT License](http://opensource.org/licenses/mit-license.php)
+-- 
+1.9.3
+
diff --git a/golang-github-shurcooL-sanitized_anchor_name.spec b/golang-github-shurcooL-sanitized_anchor_name.spec
new file mode 100644
index 0000000..70bd4d3
--- /dev/null
+++ b/golang-github-shurcooL-sanitized_anchor_name.spec
@@ -0,0 +1,60 @@
+%global debug_package   %{nil}
+%global provider        github
+%global provider_tld    com
+%global project         shurcooL
+%global repo            sanitized_anchor_name
+%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
+%global commit          8e87604bec3c645a4eeaee97dfec9f25811ff20d
+%global shortcommit     %(c=%{commit}; echo ${c:0:7})
+
+Name:           golang-%{provider}-%{project}-%{repo}
+Version:        0
+Release:        0.1.git%{shortcommit}%{?dist}
+Summary:        Package sanitized_anchor_name provides a func to create sanitized anchor names
+License:        MIT
+URL:            https://%{import_path}
+Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
+Patch0:         0001-move-license-to-LICENSE.patch
+%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
+BuildArch:      noarch
+%else
+ExclusiveArch:  %{ix86} x86_64 %{arm}
+%endif
+
+%description
+%{summary}
+
+%package devel
+BuildRequires:  golang >= 1.2.1-3
+Requires:       golang >= 1.2.1-3
+Summary:        %{summary}
+Provides:       golang(%{import_path}) = %{version}-%{release}
+
+%description devel
+%{summary}
+
+This package contains library source intended for 
+building other packages which use %{project}/%{repo}.
+
+%prep
+%setup -q -n %{repo}-%{commit}
+%patch0 -p1
+
+%build
+
+%install
+install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
+cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}/
+
+%check
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}
+
+%files devel
+%doc README.md LICENSE
+%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
+%{gopath}/src/%{import_path}
+
+%changelog
+* Thu Feb 26 2015 jchaloup <jchaloup at redhat.com> - 0-0.1.git8e87604
+- First package for Fedora
+  resolves: #1196551
diff --git a/sources b/sources
index e69de29..e8555fb 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4d1eeca721e29a72d92ffa1e5e7835b8  sanitized_anchor_name-8e87604.tar.gz


More information about the scm-commits mailing list