File mediainfo.spec of Package mediainfo

%define realver  0.7.90
%define srcext   tar.bz2

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          mediainfo
Version:       %{realver}
Release:       %{?extraver:0.}1%{?dist}
License:       BSD-2-Clause
Group:         Productivity/Multimedia/Other
URL:           http://mediaarea.net/ru/MediaInfo
Summary:       A tool to extract most relevant technical and tag data from media files

# Build-time parameters
BuildRequires: gcc-c++ pkgconfig
BuildRequires: pkgconfig(libzen) pkgconfig(libmediainfo)
BuildRoot:     %{_tmppath}/%{name}-root
Source:        http://mediaarea.net/download/binary/mediainfo/%{realver}/MediaInfo_CLI_%{realver}_GNU_FromSource.%{srcext}

%description
MediaInfo is a convenient unified display of the most relevant technical and tag
data for video and audio files.

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n MediaInfo_CLI_GNU_FromSource
%{__rm} -rf ZenLib
%{__rm} -rf MediaInfoLib

%build
cd MediaInfo/Project/GNU/CLI/
%configure \
 CFLAGS="%{optflags} %{?gcc_lto}" \
 CXXFLAGS="%{optflags} %{?gcc_lto}" \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}
cd -

%install
%{__make} -C MediaInfo/Project/GNU/CLI/ install DESTDIR=%{buildroot}

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc MediaInfo/License.html
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by