LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File razorqt.spec of Package razorqt (Project X11:QtDesktop)

#
# spec file for package razorqt
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#

%if 0%{?centos_version} || 0%{?rhel_version}
%define have_polkit 0
%define have_lightdm 0
%define cmakeflags -DENABLE_POLICYKIT=OFF -DENABLE_LIGHTDM_GREETER=OFF
%else
%define have_polkit 1
%define have_lightdm 1
%define cmakeflags -DENABLE_POLICYKIT=ON
# see lightdm handling for suse below too
%endif

%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel_version}
%define breq lm_sensors-devel, pulseaudio-libs-devel
%define qtxdglib libqtxdg
%define qtxdglibdevel libqtxdg-devel
# output of: qmake -query QT_INSTALL_CONFIGURATION
%define razorcfgdir /etc
%endif
%if 0%{?mdkversion}
%define qtxdglib libqtxdg
%define qtxdglibdevel libqtxdg-devel
# output of: qmake -query QT_INSTALL_CONFIGURATION
%define razorcfgdir /etc/xdg
%endif
%if 0%{?suse_version}
%define breq update-desktop-files, fdupes, libsensors4-devel, libpulse-devel
%define qtxdglib libqtxdg0
%define qtxdglibdevel libqtxdg-devel
# output of: qmake -query QT_INSTALL_CONFIGURATION
%define razorcfgdir /etc/settings
# openSUSE 13.1 comes with package > liblightdm-qt-2
%if 0%{?suse_version} < 1210 || 0%{?suse_version} > 1230 
%define have_lightdm 0
%define cmakeflags -DENABLE_LIGHTDM_GREETER=OFF
%endif
%endif
#Fix shlib-policy-missing-suffix for -n libraries
%define soname  0

Name:           razorqt
Version:        0.5.2
Release:        0
Summary:        Razor a lightweight desktop toolbox
License:        LGPL-2.1+ and GPL-2.0+
Group:          System/GUI/Other
Url:            http://razor-qt.org
Source:         razor-qt-%{version}.tar.bz2
BuildRequires:  %{breq}
BuildRequires:  gcc-c++, cmake, make, doxygen, file-devel
BuildRequires:  pkgconfig(QtGui), pkgconfig(QtWebKit), pkgconfig(xcomposite), libstatgrab-devel
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif
Requires:	%{name}-about = %{version}
Requires:       %{name}-appswitcher = %{version}
Requires:	%{name}-autosuspend = %{version}
Requires:       %{name}-config = %{version}
Requires:       %{name}-data = %{version}
Requires:       %{name}-desktop = %{version}
Requires:	%{name}-openssh-askpass = %{version}
Requires:       %{name}-notifications = %{version}
Requires:       %{name}-panel = %{version}
Requires:       %{name}-power = %{version}
Requires:       %{name}-runner = %{version}
Requires:       %{name}-session = %{version}
Requires:	%{name}-globalkeyshortcuts = %{version}
Requires:       %{qtxdglib} = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?have_polkit} == 1
Requires:       %{name}-policykit-agent = %{version}
%endif
Prefix:         /usr

#Recommends:	qterminal, juffed, ptbatterysystemtray, qlipper, qxkb, qasmixer, screengrab

%package	devel
Summary:        Razor-qt development package
Group:          Development/Libraries/C and C++
Url:            http://razor-qt.org
Requires:       libraries%{soname} = %{version}

%package	-n  libraries%{soname}
Summary:        Common libraries and binaries for the Razor-qt
Group:          System/Libraries
Url:            http://razor-qt.org
# it's quite a big dependency - but there are many bugreports with (I cannot see any
# icons...) and at least one icon theme has to be installed
Requires:       oxygen-icon-theme
Requires:       upower

%package	-n %{qtxdglib}
Summary:        Qt implementation of the XDG Specifications
Group:          System/Libraries
Url:            http://razor-qt.org

%package	-n %{qtxdglibdevel}
Summary:        Development files for QtXdg library
Group:          Development/Libraries/C and C++
Url:            http://razor-qt.org
Requires:       %{qtxdglib} = %{version}

%package        about
Summary:        GUI to provide basic info about DE
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%package	appswitcher
Summary:        Razor-qt running application switcher
Group:          System/X11/Utilities
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%package	desktop
Summary:        Razor-qt desktop component
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%if 0%{?have_lightdm} == 1
%package	lightdm-greeter
Summary:	LightDM greeter that uses the Razor-qt (Qt based) lib kit
Group:		System/GUI/Other
Url:            http://razor-qt.org
BuildRequires:	lightdm-qt-devel
Requires:       %{name}-data = %{version}
# temporary excluded <ti.eugene>
Provides:	lightdm-greeter
%endif

%package	notifications
Summary:	Razor-qt notification daemon
Group:		System/GUI/Other
Url:            http://razor-qt.org
Requires:	%{name}-data = %{version}

%package	openssh-askpass
Summary:	Razor-qt openssh ask password interface
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%package	panel
Summary:        Razor-qt panel and its plugins
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}
# we cannot(?) use xscreensaver-base here as it's missing in suse
%if 0%{?suse_version}
Requires:       xscreensaver
%else
Requires:       xscreensaver-base
%endif

%if 0%{?have_polkit} == 1
%package	policykit-agent
Summary:        A lightweight PolicyKit agent/user interface
Group:          System/GUI/Other
Url:            http://razor-qt.org
BuildRequires:  pkgconfig(polkit-qt-agent-1), pkgconfig(polkit-agent-1)
%endif

%package	power
Summary:        Razor-qt power management component
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%package	data
Summary:        Razor-qt resources and shared data
Group:          System/GUI/Other
Url:            http://razor-qt.org

%package	runner
Summary:        Razor-qt quick launch and runner application
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}

%package	session
Summary:        Razor-qt session manager
Group:          System/GUI/Other
Url:            http://razor-qt.org
Requires:       %{name}-data = %{version}
Requires:       openbox

%package	config
Summary:        Razor-qt config tools
Group:          System/GUI/Other
Url:            http://razor-qt.org

%package	autosuspend
Summary:	Razor-qt power management
Group:		System/GUI/Other
Url:		http://razor-qt.org

%package	globalkeyshortcuts
Summary:        Razor-qt global keyboard shortcuts tool
Group:          System/GUI/Other
Url:            http://razor-qt.org


%description
Description:	Razor-qt is an advanced, easy-to-use, and fast desktop environment
 based on Qt technologies. Unlike desktop environments, Razor-qt
 also works fine with weak machines and low requirements software.
 This metapackage provides all the components of Razor-qt.

%description    -n libraries%{soname}
Description:	This package provides the libraries and binaries that are shared amongst
 the various components of Razor-qt.

%description	-n %{qtxdglib}
Description:	This library implements functions of the XDG Specifications in Qt.

%description    -n %{qtxdglibdevel}
Description:	Qt implementation of the XDG Specifications, development package.
This package provides the development files for the qtxdg library.
This library implements functions of the XDG Specifications in Qt.
This package is part of the Razor-qt.

%description	devel
Description:	This package provides the development files for the libraries that are
 shared amongst the various components of Razor-qt.

%description	about
Description:	A tool to display Razor-qt version, license, and technical
 background.

%description	appswitcher
Description:	Desktop Independent Alt-Tab window switcher from Razor-qt,
 it was written for Razor-qt but it can be used standalone as well.
 This application switcher supplements or replaces native window
 manager (if available) so it should be enabled in config first.
 This package is part of the Razor-qt.

%description	desktop
Description:	Desktop manager for Razor-qt.
 This package is part of the Razor-qt.

%if 0%{?have_lightdm} == 1
%description	lightdm-greeter
Description:	A LightDM greeter that uses the Razor-qt and Qt libraries,
 it was written for Razor-qt but it can be used standalone as well.
 This package is part of the Razor-qt.
%endif

%description	notifications
Description:	Desktop Independent notifications daemon from Razor-qt,
 it was written for Razor-qt but it can be used standalone as well.
 It uses Freedesktop's standard for notifications.
 This package is part of the Razor-qt.

%description    openssh-askpass
Description:	Desktop Independent ssh ask password interface from Razor-qt,
 it was written for Razor-qt but it can be used standalone as well.
 This application relies on desktop environment integration
 and works depending on it, for that please read docs.
 This package is part of the Razor-qt.

%description	panel
Description:	Desktop Independent panel component from Razor-qt desktop.
 Package contains growing list of built in plugins for daily use.
 It was written for Razor-qt but it can be used standalone as well.
 This package is part of the Razor-qt.

%if 0%{?have_polkit} == 1
%description	policykit-agent
Description:	A Qt based PolicyKit agent. It provides a simple agent primarily
 for the usage of Razor-qt desktop or any other desktop.
 It was written for Razor-qt DE but can be used standalone
 This package is part of the Razor-qt.
%endif

%description    power
Description:	The power management component handles
 basic power actions and events for the Razor-qt desktop.
 This package is part of the Razor-qt.

%description	data
Description:	This package contains the architecture-independent shared
 data files needed for the Razor-qt desktop environment.
 This package is part of the Razor-qt.

%description	runner
Description:	The quick launch and runner tool for launching applications.
 Depending on window-manager razor-runner can be activated by
 pressing the Alt + F2 key combination.
 This package is part of the Razor-qt.

%description	config
Description:	The Razor-qt user interface for configuring the
 aspects and applications of the Razor-qt desktop.
 This application also list configuration components
 of other desktop environments components such qt-config .
 This package is part of the Razor-qt.

%description	session
Description:	The Razor-qt session manager handles the Razor-qt components
 initialization and startup, it is an essential part of
 the Razor-qt as a Desktop Environment.
 This package is part of the Razor-qt.

%description	autosuspend
Description:	Razor-qt suspend manage application tool.
The frontend manage application tool for LID or power management actions that relies on power manager from Razor-qt desktop.
This package is part of the Razor-qt.

%description    globalkeyshortcuts
Description     The Razor-qt global keyboard shortcuts desktop tool
 manages the keyboard shortcuts assigned by user
 or also default assigned by desktop.
 This package is part of the Razor-qt.

%prep
%setup -q -n razor-qt-%{version}

%build
_libsuffix=$(echo %{_lib} | cut -b4-)
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIB_SUFFIX=$_libsuffix %cmakeflags
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%{makeinstall} DESTDIR=%{buildroot}

#Fix script-without-shebang
%__chmod +x %{buildroot}%{_datadir}/razor/razor-confupdate/desktop-*.py 
%__chmod -s %{buildroot}%{_datadir}/razor/razor-confupdate/razor-*.upd

#Fix files-duplicate (png,jpg,svg,qss) 
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_datadir}/razor/themes
%endif

%post	-n libraries%{soname}
ldconfig

%post   -n %{qtxdglib}
ldconfig

%post	notifications
ldconfig

%postun	-n libraries%{soname}
ldconfig

%postun -n %{qtxdglib}
ldconfig

%postun notifications
ldconfig

%files
%defattr(-,root,root,-)
%doc README

%files	-n libraries%{soname}
%defattr(-,root,root,-)
%{_libdir}/librazor*.so.*
%{_datadir}/librazorqt

%files  -n %{qtxdglib}
%defattr(-,root,root,-)
%{_libdir}/libqtxdg.so.*
%{_datadir}/libqtxdg/

%files  -n %{qtxdglibdevel}
%defattr(-,root,root,-)
%{_libdir}/libqtxdg.so
%{_libdir}/pkgconfig/qtxdg.pc
%{_includedir}/qtxdg/

%files	devel
%defattr(-,root,root,-)
%{_libdir}/librazor*.so
%{_libdir}/pkgconfig/razor*.pc
%{_includedir}/razor*/
%{_bindir}/razor-x11info

%files	appswitcher
%defattr(-,root,root,-)
%{_bindir}/razor-appswitcher

%files	desktop
%defattr(-,root,root,-)
%{_bindir}/razor-desktop
%{_bindir}/razor-config-desktop
%{_libdir}/razor-desktop
%{_datadir}/applications/razor-config-desktop.desktop
%dir %{_datadir}/razor
%{_datadir}/razor/razor-desktop/
%dir %{razorcfgdir}
%config(noreplace) %{razorcfgdir}/razor/desktop.conf

%files	about
%defattr(-,root,root,-)
%{_bindir}/razor-about
%{_datadir}/applications/razor-about.desktop

%files  openssh-askpass
%defattr(-,root,root,-)
%{_bindir}/razor-openssh-askpass
%{_datadir}/razor/razor-openssh-askpass/

%if 0%{?have_lightdm} == 1
%files	lightdm-greeter
%defattr(-,root,root,-)
%{_bindir}/razor-lightdm-greeter
%dir %{_datadir}/xgreeters/
%{_datadir}/xgreeters/lightdm-razor-greeter.desktop
%{_datadir}/razor/razor-lightdm-greeter/
%endif

%files	notifications
%defattr(-,root,root,-)
%{_bindir}/razor-notificationd
%{_bindir}/razor-config-notificationd
%{_datadir}/applications/razor-config-notificationd.desktop
%{_datadir}/razor/razor-config-notificationd/
%{_datadir}/razor/razor-notificationd/

%files	panel
%defattr(-,root,root,-)
%{_bindir}/razor-panel
%{_libdir}/razor-panel
%{_datadir}/razor/razor-panel/
%dir %{razorcfgdir}
%{razorcfgdir}/razor/razor-panel/
%config(noreplace) %{razorcfgdir}/razor/razor-panel/panel*.conf

%if 0%{?have_polkit} == 1
%files	policykit-agent
%defattr(-,root,root,-)
%{_bindir}/razor-policykit-agent
%{_datadir}/razor/razor-policykit-agent/
%endif

%files	power
%defattr(-,root,root,-)
%{_bindir}/razor-power
%{_datadir}/razor/razor-power/
%{_datadir}/applications/razor-power.desktop

%files	autosuspend
%defattr(-,root,root,-)
%{_bindir}/razor-autosuspend
%{_bindir}/razor-config-autosuspend
%{_datadir}/applications/razor-config-autosuspend.desktop
%{_datadir}/razor/razor-autosuspend/
%{_datadir}/razor/razor-config-autosuspend/
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps/
%{_datadir}/icons/hicolor/scalable/apps/razor-autosuspend.svg
%{_datadir}/icons/hicolor/scalable/apps/laptop-lid.svg

%files	runner
%defattr(-,root,root,-)
%{_bindir}/razor-runner
%{_datadir}/razor/razor-runner/

%files  config
%defattr(-,root,root,-)
%{_bindir}/razor-config
%{_bindir}/razor-config-appearance
%{_bindir}/razor-config-mouse
%{_datadir}/applications/razor-config.desktop
%{_datadir}/applications/razor-config-appearance.desktop
%{_datadir}/applications/razor-config-mouse.desktop
%{_datadir}/applications/razor-config-qtconfig.desktop
%{_datadir}/razor/razor-config/

%files	session
%defattr(-,root,root,-)
%{_bindir}/razor-session
%{_bindir}/razor-config-session
%{_bindir}/startrazor
%{_bindir}/razor-confupdate
%{_datadir}/xsessions/razor*.desktop
%dir %{_datadir}/apps/
%dir %{_datadir}/apps/kdm
%dir %{_datadir}/apps/kdm/sessions
%{_datadir}/apps/kdm/sessions/razor*.desktop
%{_datadir}/applications/razor-config-session.desktop
%{_datadir}/razor/razor-session/
%{_datadir}/razor/razor-config-session/
%{_sysconfdir}/xdg/autostart/razor*.desktop
%dir %{razorcfgdir}
%config %{razorcfgdir}/razor/session.conf
%{razorcfgdir}/razor/session.conf
%config %{razorcfgdir}/razor/windowmanagers.conf
%{razorcfgdir}/razor/windowmanagers.conf
%{_datadir}/razor/razor-confupdate/
%{_libdir}/razor-confupdate_bin

%files	globalkeyshortcuts
%defattr(-,root,root,-)
%{_bindir}/razor-globalkeyshortcuts
%{_bindir}/razor-config-globalkeyshortcuts
%{_datadir}/applications/razor-config-globalkeyshortcuts.desktop
%{_datadir}/razor/razor-config-globalkeyshortcuts/

%files	data
%defattr(-,root,root,-)
%{_datadir}/razor/graphics/
%{_datadir}/razor/themes/
%config %{_sysconfdir}/xdg/menus/razor-*.menu
%dir %{_sysconfdir}/xdg/menus
%{_datadir}/desktop-directories/razor*
%dir %{_datadir}/desktop-directories
%dir %{razorcfgdir}
%dir %{razorcfgdir}/razor/
%config %{razorcfgdir}/razor/razor.conf
%{razorcfgdir}/razor/razor.conf
# temp files - it will be removed when it becomes part of upstream
%{_libdir}/razor-xdg-tools

%changelog
* Sat Jan 13 2012 Petr Vanek <petr@scribus.info> 0.5.2
- 0.5.2 release

* Mon Oct 23 2012 Petr Vanek <petr@scribus.info> 0.5.1
- 0.5.1 release

* Sat Oct 13 2012 Petr Vanek <petr@scribus.info> 0.5.0
- 0.5.0 release

* Sat Sep 01 2012 Petr Vanek <petr@scribus.info> 0.4.99
- 0.5.0 release candidate for testing

* Fri Jul 20 2012 Petr Vanek <petr@scribus.info> 0.4.1
- new modules included

* Thu Jun 28 2012 TI_Eugene <ti.eugene@gmail.com> 0.4.1
- versionprefix back to 0.4.1 - for right updating installed packages

* Wed Jun 27 2012 TI_Eugene <ti.eugene@gmail.com> 0.4.1.99...
- a git snapshot updates
- remove 'version' in services (versionprefix is better for trunk)
- removed unwanted lines in header (qmake, uic etc)
- changed some *-devel to pkgconfig(*)
- new files in -desktop package

* Tue May 29 2012 Petr Vanek <petr@scribus.info> 0.4.1.99
- a git snapshot updates

* Wed Jan 26 2012 Petr Vanek <petr@scribus.info> 0.4.1
- preparing 0.4.1 release

* Thu Sep 15 2011 Petr Vanek <petr@scribus.info> 0.4.0
- version bump: 0.4.0

* Fri Jul 22 2011 TI_Eugene <ti.eugene@gmail.com> 0.3.99
- Next version
- razor-runner added
- razor-x11info added

* Fri May 12 2011 Petr Vanek <petr@scribus.info> 0.3.0
- version bump. New packages structure

* Tue Feb 15 2011 TI_Eugene <ti.eugene@gmail.com> 0.2-206
- cleaning up spec
- openbox and eggwm session subpackages

* Mon Feb 07 2011 Petr Vanek <petr@scribus.info> 0.2-206
- suse fixes. Resources are split into library and resources package

* Sat Jan 29 2011 TI_Eugene <ti.eugene@gmail.com> 0.2-206
- appswitcher added

* Thu Jan 06 2011 TI_Eugene <ti.eugene@gmail.com> 0.2-190
- Next build

* Wed Mar 04 2009 TI_Eugene <ti.eugene@gmail.com> 0.1
- Initital build in OBS