File mp3diags.spec of Package mp3diags

# vim: set ts=4 sw=4 et:

# Copyright (c) 2009-2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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 https://bugs.links2linux.org

Name:           mp3diags
Version:        1.2.03
Release:        1.2
Summary:        Find and fix Problems in MP3 Files
Source:         http://prdownloads.sourceforge.net/mp3diags/MP3Diags-%{version}.tar.gz
Source1:        mp3diags-docdir.patch.in
URL:            http://mp3diags.sourceforge.net
Group:          Productivity/Multimedia/Sound/Editors and Convertors
License:        GPL-2.0+
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
%if 0%{?suse_version} >= 1500
BuildRequires:  libboost_serialization-devel
BuildRequires:  libboost_program_options-devel
%else
BuildRequires:  boost-devel
%endif
BuildRequires:  libqt4-devel
BuildRequires:  zlib-devel
BuildRequires:  gcc-c++ make glibc-devel update-desktop-files

%description
MP3 Diags finds problems in MP3 files and helps the user fix many of them. It
looks at both the audio part (VBR info, quality, normalization) and the tags
containing track information (ID3). It has a tag editor, which can download
album information (including cover art) from MusicBrainz and Discogs, as well
as paste data from the clipboard. Track information can also be extracted from
a file's name. Another component is the file renamer, which can rename files
based on the fields in their ID3V2 tag (artist, track number, album, genre,
etc.).

%prep
%setup -q -n "MP3Diags-%{version}"
%__sed 's|@@VERSION@@|%{version}|g' <"%{SOURCE1}" | %__patch -p0

./AdjustMt.sh
./MakeTranslations.sh

%build
pushd src
qmake QMAKE_CXXFLAGS=-DDOCDIR="\\\"\\\\\\\"%{_docdir}/%{name}\\\\\\\"\\\""" %{optflags}"
%__make %{?_smp_flags}
popd #src

%install
%__install -D -m0755 bin/MP3Diags "%{buildroot}%{_bindir}/MP3Diags"
%__ln_s MP3Diags "%{buildroot}%{_bindir}/mp3diags"

%__install -D -m0644 desktop/MP3Diags.desktop "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%__install -D -m0644 desktop/MP3Diags48.png "%{buildroot}%{_datadir}/pixmaps/MP3Diags.png"

%__install -d %{buildroot}%{_datadir}/%{name}/translations
%__install -m0644 -t %{buildroot}%{_datadir}/%{name}/translations src/translations/*.qm

%suse_update_desktop_file -r "%{name}" AudioVideo AudioVideoEditing

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc changelog.txt COPYING
%{_bindir}/mp3diags
%{_bindir}/MP3Diags
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/MP3Diags.png
%{_datadir}/%{name}

%changelog
* Wed Dec 13 2017 wbauer@tmo.at
- use individual libboost_*-devel packages instead of boost-devel to fix
  build on Tumbleweed
* Sat Jan 16 2017 wbauer@tmo.at
- build/install translations too
* Mon Aug 01 2016 wbauer@tmo.at
- update to 1.2.03
* Sat May 12 2012 pascal.bleser@opensuse.org
- update to 1.0.11.076:
  * made program compilable with GCC 4.7
* Sun Jan  1 2012 pascal.bleser@opensuse.org
- update to 1.0.10.065:
  * backport from the development branch of a change which was needed to
    accommodate a Discogs API change
* Sat Jul 23 2011 pascal.bleser@opensuse.org
- update to 1.0.08.053:
  * fixed crash when trying to save after error at startup
  * added branch support to build process
* Sat Jan  1 2011 pascal.bleser@opensuse.org
- update to 1.0.07.052:
  * main change consists of fixing a crash that could occur when trying to use
    the folder filter, provided that the file names followed a given pattern
* Wed Jul  7 2010 pascal@links2linux.de
- update to 1.0.06.051:
  * fixes a crash that was caused by invalid Lyrics tags
* Thu Mar 18 2010 pascal@links2linux.de
- update to 1.0.05.050:
  * fixes an assertion failure
* Mon Mar  8 2010 pascal@links2linux.de
- update to 1.0.04.049:
  * fixes a crash caused by ID3V2 frames of invalid size
  * fixes a crash that occurred when the backup directory couldn't
    be created.
* Fri Jan 29 2010 pascal@links2linux.de
- update to 1.0.03.048:
  * fixes the crash reported in issue #46
  * GEOB frames in ID3V2 could cause a crash if they contained
    UTF-16 strings and the user tried to go to "Tag details"
* Wed Jan 13 2010 pascal@links2linux.de
- update to 1.0.02.047:
  * fixes three crashes that shouldn't matter to most users:
    + the most serious is triggered by trying to repair broken
    ID3v2 tags that contain images
    + other crashes occurred when changing file names manually in
    the file renamer when no pattern was defined
    + and saving tag information for files that contain an
    ID3v2.4.0 tag that has a rarely used format and contains a
    frame ending with a specific value
* Fri Dec 11 2009 pascal@links2linux.de
- update to 1.0.01.046:
  * tag editor could throw an assertion failure if the cover art
    was using a GIF or BMP image, but only for some combinations
    of versions of Qt and operating system
  * the program couldn't be run from Qt 4.6
* Sun Nov 29 2009 pascal@links2linux.de
- update to 1.0.00.045:
  * while very similar to the previous version, the program was
    moved out of beta
  * a small new feature allows images to be copied to the clipboard
* Sun Nov  8 2009 pascal.bleser@opensuse.org
- update to 0.99.06.044:
  * crash fixed in the folder filter
  * bug fixed that caused non-normalized files having any TXXX frame to appear normalized
  * some rarely used options in text frames in ID3V2 are now supported
* Mon Oct 26 2009 pascal.bleser@opensuse.org
- update to 0.99.06.043:
  * empty text frames in ID3V2 no longer crash the program
  * a "Simple view" option was added and made default in the file configuration tab
  * a new download option was added for generic Linux binaries that are supposed to be distribution-independent, being able to run in most systems
* Tue Oct 20 2009 pascal.bleser@opensuse.org
- update to 0.99.06.042:
  * three bugs that could result in crashes were fixed
  * support was added for more ID3V2.4.0 formats
  * when downloading data from Discogs, it is now possible to use "styles" to populate the Genre field
  * the tag editor has a new button that allows case changes (lowercase, uppercase, etc.) to be made to some fields
  * it is possible to change a file name manually in the file renamer
  * a "suggested usage" page has been added to the documentation
* Thu Oct  8 2009 pascal.bleser@opensuse.org
- update to 0.99.06.041:
  * documentation has been brought up to date, including the screenshots
  * ReplayGain is better supported, because an additional format is recognized now
  * several bugs that could cause crashes were fixed
  * the export functionality has been improved: it allows a locale to be specified when saving to .m3u; the XML format now works OK when names contain double quotes
* Wed Sep 30 2009 pascal.bleser@opensuse.org
- update to 0.99.06.040:
  * "various artists" support was added
  * "tag details" was restructured and now shows all of the pictures from a file and allows them to be viewed at full sizeµ
  * the tag editor now uses all of the pictures from a file
  * a button was added for performing exports to M3U or XML
* Thu Sep 24 2009 pascal.bleser@opensuse.org
- update to 0.99.05.038:
  * a bug introduced in the previous version that made the program crash when scanning files with empty frames inside ID3V2 tags was fixed
* Sun Sep 20 2009 pascal.bleser@opensuse.org
- update to 0.99.05.037:
  * fixes are suggested and may be applied when right-clicking on notes
  * ID3V2.3.0 tags with non-standard UTF-8 frames are now accepted, generating a warning rather than marking the whole ID3V2.3.0 tag as invalid
  * an assertion failure has been fixed
* Sun Sep  6 2009 pascal.bleser@opensuse.org
- update to 0.99.05.034:
  * handling of invalid characters and replacement are now configurable for the file renamer
  * it is now possible to start mp3gain if it is in a directory containing spaces
  * an option to check for updates automatically was added
* Wed Sep  2 2009 pascal.bleser@opensuse.org
- update to 0.99.05.033:
  * fixes a crash when saving data from the tag editor
  * a potential crash at startup has been fixed
  * a crash when changing a file that is being used by another program has been fixed
* Fri Aug 28 2009 pascal.bleser@opensuse.org
- update to 0.99.05.032:
  * restructured crash detector
  * partial support for Lyrics3 V2 tags
- changes from 0.99.05.031:
  * a crash detection mechanism was added
  * two small memory leaks were fixed
  * content is now shown for GEOB frames
  * selection of multiple cells in the tag editor was fixed
  * a "busy" cursor signals that the application is not frozen (even though it may appear so) after running the normalization
* Mon Jul 27 2009 pascal.bleser@opensuse.org
- update to 0.99.05.030:
  * fixes removal of list elements, which was broken in the previous version
  * fixes a bug that caused the tag editor to behave as if the "fast save" option was turned on even when it was off
  * the file renamer now accepts patterns with no directory separators, in which case the renamed files are placed in the source directory
  * fixes several assertion failures
* Sat Jul 25 2009 pascal.bleser@opensuse.org
- update to 0.99.05.029:
  * a "fast save" option for the tag editor
  * configurable visible transformations
  * a new transform for keeping a single image as a front cover
  * a new transform for removing ID3V1
  * a button to remove image files
  * configurable max image size
  * various minor fixes
* Sat Jul 18 2009 pascal.bleser@opensuse.org
- update to 0.99.04.026:
  * the tag editor looks at the filter
  * USLT Lyrics inside ID3V2 are shown
  * F1 help has been added
* Fri Jul 10 2009 pascal.bleser@opensuse.org
- update to 0.99.03.022:
  * improved note grouping, with a better labeling system
  * configurable colors and gradients
  * more consistent font handling
  * changing files in external tools no longer makes the program crash
* Sat Jul  4 2009 pascal.bleser@opensuse.org
- new package
openSUSE Build Service is sponsored by