File opus-tools.spec of Package opus-tools
%define realname opus-tools
%define realver 0.2
%define srcext tar.gz
# Common info
Name: %{realname}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: BSD-3-Clause
Group: Productivity/Multimedia/Sound/Utilities
URL: http://opus-codec.org/
Summary: Command-line utilities for Opus audio codec
# Build-time parameters
BuildRequires: pkgconfig
BuildRequires: pkgconfig(ogg) >= 1.3
BuildRequires: pkgconfig(opus) >= 1.1
BuildRequires: pkgconfig(opusfile) >= 0.5
BuildRequires: pkgconfig(opusurl) >= 0.5
BuildRequires: pkgconfig(libopusenc) >= 0.2
BuildRequires: pkgconfig(flac) >= 1.1.3
BuildRequires: libpcap-devel
BuildRoot: %{_tmppath}/%{name}-root
Source: http://downloads.xiph.org/releases/opus/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
Opus-tools provides command-line utilities to encode, inspect,
and decode .opus files.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%build
%configure \
--disable-static \
%ifarch x86_64
--enable-sse \
%endif
CFLAGS="%{optflags} %{?gcc_lto}" \
CXXFLAGS="%{optflags} %{?gcc_lto}" \
LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_bindir}/opus*
%doc %{_mandir}/man1/*
%changelog