File lxqt-common.spec of Package lxqt-common
#
# spec file for package lxqt-common
#
# 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/
#
Name: lxqt-common
Version: 0.11.1
Release: 0
Summary: Common Data File
License: GPL-2.0+ and LGPL-2.1+
Group: System/GUI/LXQt
Url: http://www.lxde.org
Source: http://downloads.lxqt.org/%{name}/%{version}/%{name}-%{version}.tar.xz
Source1: http://downloads.lxqt.org/%{name}/%{version}/%{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring
BuildRequires: cmake >= 3.0.2
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: lxqt-build-tools-devel
BuildRequires: cmake(KF5WindowSystem)
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(lxqt) >= %{version}
Requires: oxygen-icon-theme
Requires(post): desktop-file-utils
Requires(pre): desktop-file-utils
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildArch: noarch
%description
Common data file required for running an LXQt session
%prep
%setup -q
%build
%cmake
make %{?_smp_mflags}
%install
%cmake_install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/default-xsession.desktop
ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadir}/xsessions/default.desktop
%fdupes %{buildroot}/%{_datadir}
%post
%desktop_database_post
%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \
default-xsession.desktop %{_datadir}/xsessions/lxqt.desktop 20
%postun
%desktop_database_postun
[ -f %{_datadir}/xsessions/lxqt.desktop ] || %{_sbindir}/update-alternatives \
--remove default-xsession.desktop %{_datadir}/xsessions/lxqt.desktop
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/xdg/lxqt
%dir %{_sysconfdir}/xdg/pcmanfm-qt
%dir %{_sysconfdir}/xdg/pcmanfm-qt/lxqt
%dir %{_sysconfdir}/xdg/menus
%dir %{_sysconfdir}/xdg/openbox
%dir %{_datadir}/kdm
%dir %{_datadir}/kdm/sessions
%config %{_sysconfdir}/xdg/lxqt/*.conf
%config %{_sysconfdir}/xdg/pcmanfm-qt/lxqt/*.conf
%config %{_sysconfdir}/xdg/menus/*.menu
%{_sysconfdir}/xdg/autostart/*.desktop
%config %{_sysconfdir}/xdg/openbox/lxqt-rc.xml
%{_bindir}/startlxqt
%{_datadir}/lxqt
%ghost %{_sysconfdir}/alternatives/default-xsession.desktop
%{_datadir}/xsessions/*.desktop
%{_datadir}/desktop-directories/
%{_datadir}/icons/hicolor/scalable/places/*.svg
%{_datadir}/kdm/sessions/lxqt.desktop
%{_datadir}/icons/hicolor/scalable/apps/lxqt.svg
%{_mandir}/man1/startlxqt.1%{ext_man}
%changelog