File liblxqt.spec of Package liblxqt

#
# spec file for package liblxqt
#
# Copyright (c) 2015 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 _qtver 5.10.0
%define _ver 1
Name:           liblxqt
Version:        @SERVICE@
Release:        0
Summary:        Core utility library for lxqt
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://www.lxqt.org
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.0.2
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  lxqt-build-tools
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5DBus) >= %{_qtver}
BuildRequires:  pkgconfig(Qt5UiTools)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Xdg) >= 1.3.0
BuildRequires:  pkgconfig(polkit-qt5-1)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xscrnsaver)
Obsoletes:      %{name}-qt5 < %{version}
Provides:       %{name}-qt5 = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Core utility library for all lxqt components

%lang_package

%package -n %{name}%{_ver}
Summary:        Libraries for lxqt
Group:          System/Libraries
Provides:       %{name}
Recommends:     %{name}-lang = %{version}-%{release}

%description -n %{name}%{_ver}
Development libraries for lxqt

%package devel
Summary:        Devel files for liblxqt
Group:          Development/Libraries/C and C++
Requires:       %{name}%{_ver} = %{version}
Requires:       pkgconfig
Requires:       pkgconfig(Qt5Xdg)

%description devel
LXQt libraries for development

%package -n lxqt-backlight
Summary:        Change screen backlight
Group:          System/X11/Utilities

%description -n lxqt-backlight
Tool in order to change screen backlight in Linux systems. It uses
/sys/class/backlight and Polkit.

%prep
%setup -q -n %{name}-%{version}

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install

%find_lang %{name} --with-qt

%post -n %{name}%{_ver} -p /sbin/ldconfig

%postun -n %{name}%{_ver} -p /sbin/ldconfig

%files -n %{name}%{_ver}
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_libdir}/%{name}.so.%{_ver}
%{_libdir}/%{name}.so.%{_ver}.*
%dir %{_datadir}/lxqt
%{_datadir}/lxqt/power.conf

%files devel
%defattr (-,root,root)
%{_includedir}/lxqt/
%{_datadir}/cmake/lxqt/
%{_libdir}/pkgconfig/lxqt.pc
%{_libdir}/%{name}.so

%files -n lxqt-backlight
%defattr(-,root,root)
%{_bindir}/lxqt-backlight_backend
%dir %{_datadir}/polkit-1/
%dir %{_datadir}/polkit-1/actions/
%{_datadir}/polkit-1/actions/org.lxqt.backlight.pkexec.policy

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/lxqt
%dir %{_datadir}/lxqt/translations
%dir %{_datadir}/lxqt/translations/%{name}
%{_datadir}/lxqt/translations/%{name}/%{name}_arn.qm
%{_datadir}/lxqt/translations/%{name}/%{name}_ast.qm

%changelog
openSUSE Build Service is sponsored by