From 94f8459d8efe06636df313676cb468d6ab890672 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Mon, 20 Oct 2014 15:29:14 +0700 Subject: [PATCH 1/2] add spec for rpm building --- daemon.spec | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 daemon.spec diff --git a/daemon.spec b/daemon.spec new file mode 100644 index 0000000..34f2e98 --- /dev/null +++ b/daemon.spec @@ -0,0 +1,51 @@ +%global go_import_path github.com/takama/daemon +%global rev 84a4013f96e01fdd14b65d260a78b543e3702ee1 +%global shortrev %(r=%{rev}; echo ${r:0:12}) +%define debug_package %{nil} + +Name: daemon +Version: 0.2.1 +Release: 1%{?dist} +Summary: A daemon package for use with Go (golang) services with no dependencies +License: MIT +URL: https://%{go_import_path} +Source0: https://%{go_import_path}/archive/%{version}.tar.gz +BuildRequires: golang + +%description +%{summary} + +%package devel +Requires: golang +Summary: A daemon package for use with Go (golang) services with no dependencies +Provides: golang(%{go_import_path}) = %{version}-%{release} + +%description devel +%{summary} + +%prep + +%setup -n daemon-%{version} + +%build + +%install +install -d %{buildroot}/%{gopath}/src/%{go_import_path} +for i in `ls -1|egrep -iv 'license|readme'`; do +cp -ap $i %{buildroot}/%{gopath}/src/%{go_import_path}/ +done + +%check +#GOPATH=%{buildroot}/%{gopath} go test %{go_import_path} + +%files devel +%defattr(-,root,root,-) +%doc README.md LICENSE +%dir %attr(755,root,root) %{gopath}/src/%{go_import_path} +%dir %attr(755,root,root) %{gopath}/src/%{go_import_path}/example +%{gopath}/src/%{go_import_path}/*.go +%{gopath}/src/%{go_import_path}/example/*.go + +%changelog +* Mon Oct 20 2014 Igor Dolzhikov - 0.2.1 +- add spec for rpm building From 8db81479b5d7c3c594756b1357bc354fa4c9241d Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Mon, 20 Oct 2014 15:29:58 +0700 Subject: [PATCH 2/2] Bumped version number to 0.2.1 --- daemon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon.go b/daemon.go index 7f3343c..29d70bc 100644 --- a/daemon.go +++ b/daemon.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package daemon 0.2.0 for use with Go (golang) services. +Package daemon 0.2.1 for use with Go (golang) services. Package daemon provides primitives for daemonization of golang services. This package is not provide implementation of user daemon,