Blob Blame History Raw
# Disabled, so that it does not conflict with Razor-Qt, which includes
# an older "pre-merge" version of this.
# See https://github.com/Razor-qt/razor-qt/wiki/Merge-LXDE-and-Razor-qt
%bcond_with qt4
%bcond_without qt5

Name:           libqtxdg
Summary:        Qt implementation of desktop specifications
Version:        0.5.3
Release:        2%{?dist}
Group:          Applications/System
License:        LGPLv2+
URL:            https://github.com/lxde/libqtxdg
Source0:        http://lxqt.org/downloads/%{name}/%{version}/%{name}-%{version}.tar.xz

BuildRequires:  cmake >= 2.8.3
BuildRequires:  file-devel
%if %with qt4
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtXml)
%endif
%if %with qt5
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  qt5-linguist
%endif

%description
Implementations of freedesktop.org XDG specifications from LXDE project for use 
with Qt library.


%package qt4
Summary:        Qt4 - implementation of desktop specifications

%description qt4
Implementations of freedesktop.org XDG specifications from LXDE project for use 
with Qt4 library.


%package qt4-devel
Summary:        Qt4 - development files for qtxdg
Requires:       cmake
Requires:       pkgconfig
Requires:       %{name}-qt4%{?_isa} = %{version}-%{release}

%description qt4-devel
Files used for developing and building software that uses qtxdg.


%package qt5
Summary:        Qt5 - implementation of desktop specifications

%description qt5
Implementations of freedesktop.org XDG specifications from LXDE project for use 
with Qt4 library.


%package qt5-devel
Summary:        Qt5 - development files for Qt5Xdg
Requires:       cmake
Requires:       pkgconfig
Requires:       %{name}-qt5%{?_isa} = %{version}-%{release}

%description qt5-devel
Files used for developing and building software that uses Qt5Xdg.


%prep
%setup -q -c


%build
%if %with qt4
mkdir build-qt4
cd build-qt4
%cmake ..
make %{?_smp_mflags}
cd ..
%endif

%if %with qt5
mkdir build-qt5
cd build-qt5
%cmake -DUSE_QT5=Yes ..
make %{?_smp_mflags}
cd ..
%endif


%install
%if %with qt4
make -C build-qt4 install DESTDIR=%{buildroot}
%endif

%if %with qt5
make -C build-qt5 install DESTDIR=%{buildroot}
%endif


%post qt4 -p /sbin/ldconfig
%postun qt4 -p /sbin/ldconfig
%post qt5 -p /sbin/ldconfig
%postun qt5 -p /sbin/ldconfig


%if %with qt4
%files qt4
%{_libdir}/libqtxdg.so.*
%{_datadir}/libqtxdg
%doc COPYING AUTHORS

%files qt4-devel
%{_libdir}/libqtxdg.so
%{_libdir}/pkgconfig/qtxdg.pc
%{_includedir}/qtxdg
%{_datadir}/cmake/qtxdg
%endif


%if %with qt5
%files qt5
%{_libdir}/libQt5Xdg.so.*
%{_datadir}/libqt5xdg
%doc COPYING AUTHORS

%files qt5-devel
%{_libdir}/libQt5Xdg.so
%{_libdir}/pkgconfig/Qt5Xdg.pc
%{_includedir}/qt5xdg
%{_datadir}/cmake/qt5xdg
%endif


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun May 11 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.5.3-1
- Update to a later upstream release

* Tue Dec 03 2013 Lubomir Rintel <lkundrak@v3.sk> - 0.5.0-1
- Initial packaging