Commit bb40cce2 authored by Robin Burchell's avatar Robin Burchell

Merge pull request #8 from rburchell/master

Don't build daemon / docs for Qt 4
parents 43be8fe3 2ea89b69
......@@ -13,7 +13,3 @@ equals(QT_MAJOR_VERSION, 5): docs.commands = (cd doc/config; $$QDOC $$QDOCCONF;
QMAKE_EXTRA_TARGETS += docs
doc.files = doc/html/*
doc.path = /usr/share/doc/nemo-transfer-engine
INSTALLS += doc
......@@ -19,6 +19,8 @@ BuildRequires: qt5-qttools-qthelp-devel
BuildRequires: qt5-plugin-platform-minimal
BuildRequires: qt5-plugin-sqldriver-sqlite
Requires: libnemotransferengine-qt5 = %{version}
Provides: nemo-transferengine > 0.0.19
Obsoletes: nemo-transferengine <= 0.0.19
%description
%{summary}
......@@ -62,6 +64,8 @@ Requires: libnemotransferengine-qt5 = %{version}
Summary: Translation source for Nemo TransferEngine
License: LGPLv2.1
Group: System Environment/Daemon
Provides: nemo-transferengine-ts-devel > 0.0.19
Obsoletes: nemo-transferengine-ts-devel <= 0.0.19
%description ts-devel
Translation source for Nemo TransferEngine
......@@ -86,6 +90,8 @@ Unit tests for Nemo TransferEngine
Summary: Documentation for Nemo TransferEngine
License: BSD
Group: System Environment/Daemon
Provides: nemo-transferengine-doc > 0.0.19
Obsoletes: nemo-transferengine-doc <= 0.0.19
%description doc
Documentation for Nemo TransferEngine
......
......@@ -19,18 +19,10 @@ Requires: libnemotransferengine = %{version}
%description
%{summary}
%files
%defattr(-,root,root,-)
%dir %{_datadir}/nemo-transferengine
%{_bindir}/nemo-transfer-engine
%{_datadir}/dbus-1/services/org.nemo.transferengine.service
%{_datadir}/translations/nemo-transfer-engine_eng_en.qm
%package -n libnemotransferengine
Summary: Transfer engine library.
Group: Development/Libraries
Requires: nemo-transfer-engine-qt5
%description -n libnemotransferengine
%{summary}
......@@ -54,18 +46,6 @@ Requires: libnemotransferengine = %{version}
%{_qt_datadir}/mkspecs/features/nemotransferengine-plugin.prf
%{_libdir}/pkgconfig/nemotransferengine.pc
%package ts-devel
Summary: Translation source for Nemo TransferEngine
License: LGPLv2.1
Group: System Environment/Daemon
%description ts-devel
Translation source for Nemo TransferEngine
%files ts-devel
%defattr(-,root,root,-)
%{_datadir}/translations/source/nemo-transfer-engine.ts
%package tests
Summary: Unit tests for Nemo TransferEngine
License: LGPLv2.1
......@@ -78,19 +58,6 @@ Unit tests for Nemo TransferEngine
%defattr(-,root,root,-)
/opt/tests/nemo-transfer-engine/*
%package doc
Summary: Documentation for Nemo TransferEngine
License: BSD
Group: System Environment/Daemon
%description doc
Documentation for Nemo TransferEngine
%files doc
%defattr(-,root,root,-)
%{_datadir}/doc/nemo-transferengine/*
%prep
%setup -q -n %{name}-%{version}
......@@ -100,38 +67,13 @@ Documentation for Nemo TransferEngine
%qmake
make %{?jobs:-j%jobs}
make docs
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_datadir}/nemo-transferengine
%qmake_install
mkdir -p %{buildroot}/%{_docdir}/%{name}
cp -R doc/html/* %{buildroot}/%{_docdir}/%{name}/
%define def_uid $(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
%define def_user $(getent passwd %def_uid | sed 's/:.*//')
%define db_file /home/%{def_user}/.local/nemo-transferengine/transferdb.sqlite
%define te_pid $(pgrep -f nemo-transfer-engine)
%post -n libnemotransferengine
/sbin/ldconfig
%post -n nemo-transferengine
if [ -n "%{te_pid}" ]
then
kill -s 10 %{te_pid}
fi
exit 0
%postun -n libnemotransferengine
/sbin/ldconfig
%postun -n nemo-transferengine
if [ -f "%{db_file}" ]
then
rm %{db_file}
fi
exit 0
TEMPLATE = subdirs
SUBDIRS = lib src tests
CONFIG += ordered
include(doc/doc.pri)
tests.depends = lib
# no daemon for Qt 4
equals(QT_MAJOR_VERSION, 4): SUBDIRS -= src
# docs only for Qt 5
equals(QT_MAJOR_VERSION, 5): include(doc/doc.pri)
OTHER_FILES += \
rpm/transfer-engine.spec \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment