/
buteo-mtp-qt5.spec
132 lines (106 loc) · 3.17 KB
/
buteo-mtp-qt5.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Name: buteo-mtp-qt5
Version: 0.8.3
Release: 1
Summary: MTP library
License: BSD and LGPLv2
URL: https://git.sailfishos.org/mer-core/buteo-mtp
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.privileges
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Sparql)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(buteosyncfw5)
BuildRequires: pkgconfig(Qt5SystemInfo)
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(mount)
BuildRequires: pkgconfig(mlite5)
# for the thumbnailer unit test
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: ssu-devel >= 0.37.9
BuildRequires: pkgconfig(systemsettings) >= 0.2.25
Requires: mtp-vendor-configuration
Requires: thumbnaild
Requires: libqt5sparql-tracker-direct
Requires: libqt5sparql-tracker
Requires(pre): shadow-utils
Requires(pre): /usr/bin/groupadd-user
Provides: buteo-mtp = %{version}
Obsoletes: buteo-mtp < %{version}
%description
%{summary}.
# TODO: once proper activation as msyncd plugin works as expected,
# move user session startup into sub-package
%files
%defattr(-,root,root,-)
%{_unitdir}/*.mount
%{_unitdir}/local-fs.target.wants/*.mount
%{_libexecdir}/mtp_service
%{_libdir}/*.so.*
%{_libdir}/mtp
%{_userunitdir}/buteo-mtp.service
%{_datadir}/mapplauncherd/privileges.d/*
# Own the fstorage.d and mtp data directories.
%dir %{_sysconfdir}/fsstorage.d
%dir %{_datadir}/mtp
%license COPYING
%package sample-vendor-configuration
Summary: Vendor configuration example for MTP
Provides: mtp-vendor-configuration
%description sample-vendor-configuration
%{summary}.
# TODO: the deviceinfo xml here should only contain things like model,
# vendor, ... -- the supported datatypes are tied in tighly with
# the mtp daemon currently, and therefore can't be changed that
# easily
%files sample-vendor-configuration
%defattr(-,root,root,-)
%{_datadir}/mtp/*.xml
%{_datadir}/mtp/*.ico
%config %{_sysconfdir}/fsstorage.d/*
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
%{summary}.
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%package sync-plugin
Summary: MTP plugin for buteo-sync
%description sync-plugin
%{summary}.
%files sync-plugin
%defattr(-,root,root,-)
%{_libdir}/buteo-plugins-qt5/*.so
%config %{_sysconfdir}/buteo/profiles/server/*.xml
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{version}-%{release}
Conflicts: buteo-mtp-tests
%description tests
%{summary}.
%files tests
%defattr(-,root,root,-)
/opt/tests/buteo-mtp
%prep
%setup -q
%build
%qmake5
make %{_smp_mflags}
%install
make INSTALL_ROOT=%{buildroot} install
mkdir -p %{buildroot}/%{_unitdir}/local-fs.target.wants
ln -s ../dev-mtp.mount %{buildroot}/%{_unitdir}/local-fs.target.wants/
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/mapplauncherd/privileges.d/
# create group if it does not exist yet, though don't remove it
# as it should come from other packages
%pre
groupadd -f -g 1024 mtp
groupadd-user mtp
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig