File nemo-qml-plugin-time.spec of Package nemo-qml-plugin-time

Name:       nemo-qml-plugin-time
Summary:    Wall clock plugin for Nemo Mobile
Version:    0.1.6
Release:    1
License:    BSD-3-Clause
URL:        https://github.com/sailfishos/nemo-qml-plugin-time
Source:     https://github.com/sailfishos/%{name}/archive/refs/tags/%{version}.tar.gz
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(timed-qt5)
BuildRequires:  pkgconfig(mce)

%description
%{summary}.

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

%build

%qmake_qt5

make %{?_smp_mflags}

%install
%make_install INSTALL_ROOT="%{buildroot}"

# org.nemomobile.time legacy import
mkdir -p %{buildroot}%{_libdir}/qt5/qml/org/nemomobile/time/
ln -sf %{_libdir}/qt5/qml/Nemo/Time/libnemotime.so %{buildroot}%{_libdir}/qt5/qml/org/nemomobile/time/
sed 's/Nemo.Time/org.nemomobile.time/' < src/qmldir > %{buildroot}%{_libdir}/qt5/qml/org/nemomobile/time/qmldir

rm -rf %{buildroot}/opt

%files
%defattr(-,root,root,-)
%license LICENSE.BSD
%dir %{_libdir}/qt5/qml/Nemo
%dir %{_libdir}/qt5/qml/Nemo/Time
%{_libdir}/qt5/qml/Nemo/Time/libnemotime.so
%{_libdir}/qt5/qml/Nemo/Time/plugins.qmltypes
%{_libdir}/qt5/qml/Nemo/Time/qmldir

# org.nemomobile.time legacy import
%dir %{_libdir}/qt5/qml/org
%dir %{_libdir}/qt5/qml/org/nemomobile
%dir %{_libdir}/qt5/qml/org/nemomobile/time
%{_libdir}/qt5/qml/org/nemomobile/time/libnemotime.so
%{_libdir}/qt5/qml/org/nemomobile/time/qmldir

%changelog
openSUSE Build Service is sponsored by