Blob Blame History Raw
# Generated by go2rpm
%bcond_without check

# https://github.com/Kagami/go-avif
%global goipath         github.com/Kagami/go-avif
Version:                0.1.0

%gometa

%global common_description %{expand:
Go-avif implements AVIF (AV1 Still Image File Format) encoder for Go using
libaom, the high quality AV1 codec.}

Name:           go-avif
Release:        1%{?dist}
Summary:        AVIF (AV1 Still Image File Format) encoder for Go

# Upstream license specification: CC0-1.0
License:        CC0
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/docopt/docopt-go)
BuildRequires:  pkgconfig(aom)

%description
%{common_description}

%package -n %{goname}-devel
Summary:       %{summary}
BuildArch:     noarch
Requires:      pkgconfig(aom)

%description -n %{goname}-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
for cmd in cmd/* ; do
  %gobuild -o _bin/$(basename $cmd) %{goipath}/$cmd
done

%install
%goinstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp _bin/*              %{buildroot}%{_bindir}/
mv %{buildroot}%{_bindir}/avif %{buildroot}%{_bindir}/go-avif

%if %{with check}
%check
%gochecks
%endif

%files
%license COPYING
%doc README.md
%{_bindir}/*

%files -n %{goname}-devel -f devel.file-list
%license COPYING
%doc README.md

%changelog
* Fri Apr 12 13:14:08 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.1.0-1
- Initial package