transfer-engine-qt5.spec 3.85 KB
Newer Older
1
Name: nemo-transferengine-qt5
2
Version: 1.0.0
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
Source0: %{name}-%{version}.tar.gz
9
Source1: %{name}.privileges
10
BuildRequires: pkgconfig(Qt5Core)
11 12
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Sql)
13
BuildRequires: pkgconfig(Qt5Test)
14 15
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
16 17 18
BuildRequires: pkgconfig(accounts-qt5)
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(quillmetadata-qt5)
19
BuildRequires: pkgconfig(nemonotifications-qt5) >= 1.0.4
20
BuildRequires: qt5-qttools-qdoc
21
BuildRequires: qt5-qttools-linguist
22 23 24
BuildRequires: qt5-qttools-qthelp-devel
BuildRequires: qt5-plugin-platform-minimal
BuildRequires: qt5-plugin-sqldriver-sqlite
25
BuildRequires: pkgconfig(qt5-boostable)
26
Requires: libnemotransferengine-qt5 = %{version}
27 28
Provides: nemo-transferengine > 0.0.19
Obsoletes: nemo-transferengine <= 0.0.19
29 30

%description
31
%{summary}
32 33 34

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

42 43 44 45 46 47 48 49 50 51
%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.*
52
%{_libdir}/qt5/qml/org/nemomobile/transferengine
53 54

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

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

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

%package ts-devel
Summary:   Translation source for Nemo TransferEngine
License:   LGPLv2.1
Group:     System Environment/Daemon
73 74
Provides: nemo-transferengine-ts-devel > 0.0.19
Obsoletes: nemo-transferengine-ts-devel <= 0.0.19
75 76 77 78 79 80

%description ts-devel
Translation source for Nemo TransferEngine

%files ts-devel
%defattr(-,root,root,-)
81
%{_datadir}/translations/source/*.ts
82 83 84 85 86 87 88 89 90 91 92

%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,-)
93
/opt/tests/nemo-transfer-engine-qt5
94 95 96 97 98

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

%description doc
Documentation for Nemo TransferEngine

%files doc
%defattr(-,root,root,-)
107
%{_datadir}/doc/%{name}
108 109 110 111 112 113 114



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

%build
115 116
%qmake5 "VERSION=%{version}"
make %{?_smp_mflags}
117 118 119 120
make docs

%install
rm -rf %{buildroot}
121
mkdir -p %{buildroot}/%{_datadir}/nemo-transferengine
122
%qmake5_install
123 124 125 126

mkdir -p %{buildroot}/%{_docdir}/%{name}
cp -R doc/html/* %{buildroot}/%{_docdir}/%{name}/

127 128 129
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/mapplauncherd/privileges.d

130 131 132 133 134
%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)

135
%post -n libnemotransferengine-qt5
136
/sbin/ldconfig
137

138
%post -n %{name}
139 140 141 142 143 144 145
if [ -n "%{te_pid}" ]
then
    kill -s 10 %{te_pid}
fi

exit 0

146
%postun -n libnemotransferengine-qt5
147 148
/sbin/ldconfig