File mediainfo.spec of Package mediainfo

# spec file for package mediainfo
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2007-2011 The Packman Team
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           mediainfo
Version:        18.03
Release:        0
Summary:        Supplies technical and tag information about a video or audio file
License:        GPL-2.0+
Group:          Productivity/Multimedia/Other
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  kf5-filesystem
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-devel >= 3
BuildRequires:  pkgconfig(libmediainfo) = %{version}
BuildRequires:  pkgconfig(libzen)
BuildRequires:  pkgconfig(zlib)
Provides:       MediaInfo =
Obsoletes:      MediaInfo <

MediaInfo supplies technical and tag information about a video or
audio file.

It reads the following information:
* General: title, author, director, album, track number, date, duration...
* Video: codec, aspect, fps, bitrate...
* Audio: codec, sample rate, channels, language, bitrate...
* Text: language of subtitle
* Chapters: number of chapters, list of chapters

It supports the following containers/codecs:
* Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
  MPEG-2, MPEG-4, DVD (VOB) (Codecs: DivX, XviD, MSMPEG4, ASP,
  H.264, AVC...)
* Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF
* Subtitles: SRT, SSA, ASS, SAMI

%package gui
Summary:        GUI for mediainfo
Group:          Productivity/Multimedia/Other
Provides:       MediaInfo-gui =
Obsoletes:      MediaInfo-gui <

%description gui
This package contains a Frontend for mediainfo.

MediaInfo supplies technical and tag information about a video or
audio file.

%package -n kf5-mediainfo
Summary:        KF5 extension for mediainfo-gui
Group:          Productivity/Multimedia/Other
Requires:       %{name}-gui
Obsoletes:      kde4-%{name} < %{version}
Provides:       kde4-%{name} = %{version}

%description -n kf5-mediainfo
KF5 context menu extension for mediainfo-gui.

%setup -q -n MediaInfo
sed -i 's/\r$//' *.html *.txt Release/*.txt
chmod 0644 *.html *.txt Release/*.txt

# build CLI
pushd Project/GNU/CLI
    autoreconf -fiv
    make %{?_smp_mflags}

# now build GUI
pushd Project/GNU/GUI
    autoreconf -fiv
    make %{?_smp_mflags}

pushd Project/GNU/CLI

pushd Project/GNU/GUI

# icon
install -dm 755 %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
install -m 644 Source/Resource/Image/MediaInfo.png \
install -dm 755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 644 Source/Resource/Image/MediaInfo.svg \
install -dm 755 %{buildroot}%{_datadir}/pixmaps
install -m 644 Source/Resource/Image/MediaInfo.png \

rm %{buildroot}%{_datadir}/kde4/services/ServiceMenus/mediainfo-gui.desktop
%suse_update_desktop_file -n %{name}-gui AudioVideo AudioVideoEditing

# these files are just ridicully large:
gzip -n -9 License.html
gzip -n -9 History_*.txt
%fdupes -s %{buildroot}/%{_datadir}

%doc Release/ReadMe_CLI_Linux.txt
%doc License.html.gz History_CLI.txt.gz

%files gui
%doc Release/ReadMe_GUI_Linux.txt
%doc License.html.gz History_GUI.txt.gz
%dir %{_datadir}/metainfo

%files -n kf5-mediainfo
%dir %{_kf5_servicesdir}
%dir %{_kf5_servicesdir}/ServiceMenus
%dir %{_datadir}/apps
%dir %{_datadir}/apps/konqueror
%dir %{_datadir}/apps/konqueror/servicemenus

openSUSE Build Service is sponsored by