# Run tests in check section %bcond_without check # https://github.com/euank/go-kmsg-parser %global goipath github.com/euank/go-kmsg-parser Version: 2.0.0 %global common_description %{expand: This package contains a library to allow parsing the /dev/kmsg device in Linux. This device provides a read-write interface to the Linux Kernel's ring buffer. In addition to the library, a simple cli-tool that functions similarly to dmesg --ctime --follow is included. This code serves both as a usage example and as a simple way to verify it works how you'd expect on a given system.} %gometa Name: %{goname} Release: 1%{?dist} Summary: A simpler parser for the /dev/kmsg format # Detected licences # - *No copyright* Apache License (v2.0) at 'LICENSE' License: ASL 2.0 URL: %{gourl} Source0: %{gosource} # https://github.com/euank/go-kmsg-parser/pull/1 Patch0: 0001-Fix-missing-.-in-args-forwarded-to-printf-like-funct.patch BuildRequires: golang(github.com/stretchr/testify/assert) %description %{summary} %package -n godmesg Summary: %{summary} %description -n godmesg %{common_description} This package contains the godmesg binary. %package devel Summary: %{summary} BuildArch: noarch %description devel %{common_description} This package contains library source intended for building other packages which use import path with %{goipath} prefix. %prep %forgeautosetup -p1 %build %gobuildroot %gobuild -o _bin/godmesg %{goipath}/cmd/godmesg %install %goinstall install -Dpm 0755 _bin/godmesg %{buildroot}%{_bindir}/godmesg %if %{with check} %check %gochecks %endif %files -n godmesg %license LICENSE %{_bindir}/godmesg %files devel -f devel.file-list %license LICENSE %doc README.md %changelog * Thu Nov 01 2018 Robert-André Mauchin - 2.0.0-1 - First package for Fedora