File linux-minidisc.spec of Package linux-minidisc

#
# spec file for package linux-minidisc
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

Name:           linux-minidisc
Version:        0.9.16
Release:        0
Summary:        Free software for accessing MiniDisc devices
License:        GPL-2 and LGPL-2.1
Group:          Productivity/Multimedia/Sound/Utilities
Url:            https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php
Source0:        https://github.com/glaubitz/linux-minidisc/archive/%{version}.tar.gz
Patch0:         0001-use-qt5-linguist-tools.patch
BuildRequires:  fdupes
BuildRequires:  glib2-devel
BuildRequires:  libid3tag-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libmad-devel
BuildRequires:  libqt5-linguist
BuildRequires:  libQt5Core-devel
BuildRequires:  libQt5Widgets-devel
BuildRequires:  libtag-devel
BuildRequires:  libusb-1_0-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
Requires:       hicolor-icon-theme
Requires(post): hicolor-icon-theme
Requires(post): update-desktop-files
Requires(postun): hicolor-icon-theme
Requires(postun): update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The linux-minidisc software package provides free and open
source utilities for accessing MiniDisc devices with USB
transfer capabilities, supporting both the older NetMD and
the newer Hi-MD models. It's a direct replacement for Sony's
own proprietary software SonicStage.

%package -n himdcli
Summary: Command line utility for accessing Hi-MD devices

%description -n himdcli
This package provides a command line utility for accessing
Hi-MD devices attached to the computer. It allows to transfer
tracks to the Hi-MD, list the contents of a Hi-MD as well
as deleting individual tracks from the Hi-MD.

%package -n netmdcli
Summary: Command line utility for accessing NetMD devices

%description -n netmdcli
This package provides a command line utility for accessing
NetMD devices attached to the computer. It allows to transfer
tracks to the MD, list the contents of a MD as well as deleting
individual tracks from the NetMD.

%package -n qhimdtransfer
Summary: Qt-based application for accessing Hi-MD devices

%description -n qhimdtransfer
This package provides a Qt-based application for accessing
Hi-MD devices attached to the computer. It allows to transfer
tracks to the Hi-MD, list the contents of a Hi-MD as well as
deleting individual tracks from the Hi-MD.

%prep
%setup -q
%patch0 -p1

%build
qmake-qt5 QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" QMAKE_STRIP="/bin/true";
make %{?_smp_mflags}

%install
#%%suse_update_desktop_file qhimdtransfer X-SuSE-DesktopUtility
make install INSTALL_ROOT="%buildroot";

%fdupes -s %{buildroot}/%{_prefix}

%post -n qhimdtransfer
%desktop_database_post
%icon_theme_cache_post

%postun -n qhimdtransfer
%desktop_database_postun
%icon_theme_cache_postun

%files -n himdcli
%defattr(-,root,root)
%{_bindir}/himdcli

%files -n netmdcli
%defattr(-,root,root)
%{_bindir}/netmdcli

%files -n qhimdtransfer
%defattr(-,root,root)
%doc README
%license COPYING COPYING.LIB
%{_bindir}/qhimdtransfer
%{_datadir}/qhimdtransfer

%changelog