transfer-engine-qt5.spec 3.75 KB
Newer Older
1
Name: nemo-transferengine-qt5
Slava Monich's avatar
Slava Monich committed
2
Version: 0.1.6
3 4 5 6
Release: 0
Summary: Transfer Engine for uploading media content and tracking transfers.
Group: System Environment/Daemon
License: LGPLv2.1
Slava Monich's avatar
Slava Monich committed
7
URL: https://git.merproject.org/mer-core/transfer-engine
8 9
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(Qt5Core)
10 11
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Sql)
12
BuildRequires: pkgconfig(Qt5Test)
13 14
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
15 16 17
BuildRequires: pkgconfig(accounts-qt5)
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(quillmetadata-qt5)
18
BuildRequires: pkgconfig(nemonotifications-qt5) >= 1.0.4
19
BuildRequires: qt5-qttools-qdoc
20
BuildRequires: qt5-qttools-linguist
21 22 23
BuildRequires: qt5-qttools-qthelp-devel
BuildRequires: qt5-plugin-platform-minimal
BuildRequires: qt5-plugin-sqldriver-sqlite
24
BuildRequires: pkgconfig(qt5-boostable)
25
Requires: libnemotransferengine-qt5 = %{version}
26 27
Provides: nemo-transferengine > 0.0.19
Obsoletes: nemo-transferengine <= 0.0.19
28 29

%description
30
%{summary}
31 32 33

%files
%defattr(-,root,root,-)
34
%{_libdir}/systemd/user/transferengine.service
35 36 37 38
%dir %{_datadir}/nemo-transferengine
%{_bindir}/nemo-transfer-engine
%{_datadir}/dbus-1/services/org.nemo.transferengine.service
%{_datadir}/translations/nemo-transfer-engine_eng_en.qm
39
%{_datadir}/lipstick/notificationcategories/*
40

41 42 43 44 45 46 47 48 49 50
%package -n libnemotransferengine-qt5
Summary: Transfer engine library.
Group: Development/Libraries

%description -n libnemotransferengine-qt5
%{summary}

%files -n libnemotransferengine-qt5
%defattr(-,root,root,-)
%{_libdir}/*.so.*
51
%{_libdir}/qt5/qml/org/nemomobile/transferengine/*
52 53

%package -n libnemotransferengine-qt5-devel
54 55
Summary: Development headers for transfer engine library.
Group: Development/Libraries
56
Requires: libnemotransferengine-qt5 = %{version}
57

58 59
%description -n libnemotransferengine-qt5-devel
%{summary}
60

61
%files -n libnemotransferengine-qt5-devel
62
%defattr(-,root,root,-)
63
%{_libdir}/*.so
64
%{_includedir}/TransferEngine-qt5/*.h
65
%{_datadir}/qt5/mkspecs/features/nemotransferengine-plugin-qt5.prf
66 67 68 69 70 71
%{_libdir}/pkgconfig/nemotransferengine-qt5.pc

%package ts-devel
Summary:   Translation source for Nemo TransferEngine
License:   LGPLv2.1
Group:     System Environment/Daemon
72 73
Provides: nemo-transferengine-ts-devel > 0.0.19
Obsoletes: nemo-transferengine-ts-devel <= 0.0.19
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91

%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
Group:     System Environment/Daemon

%description tests
Unit tests for Nemo TransferEngine

%files tests
%defattr(-,root,root,-)
92
/opt/tests/nemo-transfer-engine-qt5/*
93 94 95 96 97

%package doc
Summary:   Documentation for Nemo TransferEngine
License:   BSD
Group:     System Environment/Daemon
98 99
Provides: nemo-transferengine-doc > 0.0.19
Obsoletes: nemo-transferengine-doc <= 0.0.19
100 101 102 103 104 105

%description doc
Documentation for Nemo TransferEngine

%files doc
%defattr(-,root,root,-)
106
%{_datadir}/doc/nemo-transferengine-qt5/*
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121



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

%build

%qmake5

make %{?jobs:-j%jobs}
make docs

%install
rm -rf %{buildroot}
122
mkdir -p %{buildroot}/%{_datadir}/nemo-transferengine
123
%qmake5_install
124 125 126 127 128 129 130 131 132

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)

133
%post -n libnemotransferengine-qt5
134
/sbin/ldconfig
135 136

%post -n nemo-transferengine-qt5
137 138 139 140 141 142 143
if [ -n "%{te_pid}" ]
then
    kill -s 10 %{te_pid}
fi

exit 0

144
%postun -n libnemotransferengine-qt5
145 146
/sbin/ldconfig