File copyq5.spec of Package copyq5
#
# spec file for package copyq5
#
# Copyright (c) 2016 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/
#
%define _name copyq
Name: copyq5
Version: 3.0.0
Release: 0
Summary: Clipboard Manager with Advanced Features
License: GPL-3.0
Group: Productivity/Office/Other
Url: http://hluk.github.io/CopyQ
Source: CopyQ-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: kf5-filesystem
BuildRequires: libQt5Gui-private-headers-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xfixes)
BuildRequires: update-desktop-files
Conflicts: copyq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
CopyQ is advanced clipboard manager with searchable and editable history with
support for image formats, command line control and more.
%package doc
Summary: Documentation for %{name}
Group: Documentation/Other
BuildRequires: doxygen
BuildRequires: graphviz
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Doxygen generated documentations for %{name}.
%lang_package
%prep
%setup -q -n CopyQ-%{version}
%build
%cmake \
-DWITH_QT5=ON \
-DPLUGIN_INSTALL_PREFIX=%{_libdir}/%{_name}/plugins
make %{?_smp_mflags} VERBOSE=1
%install
%cmake_install
mv %{buildroot}%{_datadir}/applications/com.github.hluk.%{_name}.desktop %{buildroot}%{_datadir}/applications/%{_name}.desktop
mv %{buildroot}%{_kf5_appstreamdir}/com.github.hluk.%{_name}.appdata.xml %{buildroot}%{_kf5_appstreamdir}/%{_name}.appdata.xml
%suse_update_desktop_file -r %{_name} Utility DesktopUtility
%fdupes %{buildroot}%{_datadir}/%{_name}
doxygen Doxyfile
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
cp -a html/ %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
%fdupes %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
%post
/sbin/ldconfig
%icon_theme_cache_post
%postun
/sbin/ldconfig
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc AUTHORS CHANGES HACKING LICENSE README.md
%{_bindir}/%{_name}
%{_libdir}/%{_name}
%dir %{_kf5_appstreamdir}/
%{_kf5_appstreamdir}/%{_name}.appdata.xml
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{_name}*.png
%{_datadir}/icons/hicolor/scalable/apps/%{_name}*.svg
%{_datadir}/%{_name}
%{_mandir}/man?/%{_name}.?%{ext_man}
%exclude %{_datadir}/%{_name}/translations
%files doc
%defattr(-,root,root)
%{_docdir}/%{name}-%{version}-doxygen/
%files lang
%defattr(-,root,root)
%{_datadir}/%{_name}/translations
%changelog