File pdfcpu.spec of Package pdfcpu
Name: pdfcpu
Version: 0.11.1
Release: 1%{?dist}
Summary: A Go PDF processor and CLI
License: Apache-2.0
URL: https://github.com/pdfcpu/pdfcpu
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.zst
BuildRequires: golang-packaging
BuildRequires: zstd
%description
pdfcpu is a PDF processing library written in Go that supports encryption and offers both an API and a command-line interface (CLI). It is compatible with all PDF versions with basic support and ongoing improvement for PDF 2.0 (ISO-32000-2).
%prep
%autosetup -p1 -a1
%build
go build \
-mod=vendor \
-buildmode=pie \
./cmd/%{name}
%install
install --strip -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
%check
%files
%{_bindir}/%{name}
%license LICENSE.txt
%doc README.md
%changelog