/
ofono.spec
129 lines (105 loc) · 3.14 KB
/
ofono.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
Name: ofono
Summary: Open Source Telephony
Version: 1.16
Release: 1
Group: Communications/Connectivity Adaptation
License: GPLv2
URL: http://ofono.org
Source0: http://www.kernel.org/pub/linux/network/ofono/ofono-%{version}.tar.xz
Requires: dbus
Requires: systemd
Requires: ofono-configs
Requires(preun): systemd
Requires(post): systemd
Requires(postun): systemd
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libudev) >= 145
BuildRequires: pkgconfig(bluez) >= 4.85
BuildRequires: pkgconfig(mobile-broadband-provider-info)
BuildRequires: pkgconfig(libwspcodec) >= 2.0
BuildRequires: pkgconfig(libglibutil)
BuildRequires: pkgconfig(libgrilio) >= 1.0.3
BuildRequires: libtool
BuildRequires: automake
BuildRequires: autoconf
%description
Telephony stack
%package devel
Summary: Headers for oFono
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Development headers and libraries for oFono
%package tests
Summary: Test Scripts for oFono
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: dbus-python3
Requires: python3-gobject
Provides: ofono-test >= 1.0
Obsoletes: ofono-test < 1.0
%description tests
Scripts for testing oFono and its functionality
%package configs-mer
Summary: Package to provide default configs for ofono
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Provides: ofono-configs
%description configs-mer
This package provides default configs for ofono
%prep
%setup -q -n %{name}-%{version}/%{name}
./bootstrap
%build
autoreconf --force --install
%configure --disable-static \
--enable-test \
--enable-logcontrol \
--enable-jolla-rilmodem \
--with-systemdunitdir="/%{_lib}/systemd/system"
make %{?jobs:-j%jobs}
%check
# run unit tests
make check
%install
rm -rf %{buildroot}
%make_install
mkdir -p %{buildroot}/%{_sysconfdir}/ofono/push_forwarder.d
mkdir -p %{buildroot}/%{_lib}/systemd/system/network.target.wants
ln -s ../ofono.service %{buildroot}/%{_lib}/systemd/system/network.target.wants/ofono.service
%preun
if [ "$1" -eq 0 ]; then
systemctl stop ofono.service ||:
fi
%post
systemctl daemon-reload ||:
# Do not restart during update
# We don't want to break anything during update
# New daemon is taken in use after reboot
# systemctl reload-or-try-restart ofono.service ||:
%postun
systemctl daemon-reload ||:
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog AUTHORS README
%config %{_sysconfdir}/dbus-1/system.d/*.conf
%{_sbindir}/*
/%{_lib}/systemd/system/network.target.wants/ofono.service
/%{_lib}/systemd/system/ofono.service
%dir %{_sysconfdir}/ofono/
%dir %{_sysconfdir}/ofono/push_forwarder.d
# This file is part of phonesim and not needed with ofono.
%exclude %{_sysconfdir}/ofono/phonesim.conf
%doc /usr/share/man/man8/ofonod.8.gz
%dir %attr(775,radio,radio) /var/lib/ofono
%files devel
%defattr(-,root,root,-)
%{_includedir}/ofono/
%{_libdir}/pkgconfig/ofono.pc
%files tests
%defattr(-,root,root,-)
%{_libdir}/%{name}/test/*
%files configs-mer
%defattr(-,root,root,-)
%config /etc/ofono/ril_subscription.conf