Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8 from rburchell/master
Don't build daemon / docs for Qt 4
  • Loading branch information
rburchell committed Jun 27, 2013
2 parents 43be8fe + 2ea89b6 commit bb40cce
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 65 deletions.
4 changes: 0 additions & 4 deletions doc/doc.pri
Expand Up @@ -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

6 changes: 6 additions & 0 deletions rpm/transfer-engine-qt5.spec
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
60 changes: 1 addition & 59 deletions rpm/transfer-engine.spec
Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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
9 changes: 7 additions & 2 deletions transfer-engine.pro
@@ -1,8 +1,13 @@
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 \
Expand Down

0 comments on commit bb40cce

Please sign in to comment.