connectionagent-qt5.spec 3.24 KB
Newer Older
1 2 3 4 5 6
Name:       connectionagent-qt5

# >> macros
# << macros

Summary:    User Agent daemon
Slava Monich's avatar
Slava Monich committed
7
Version:    0.11.24
8 9 10 11 12
Release:    0
Group:      Communications/Connectivity Adaptation
License:    LGPLv2
URL:        http://github.com/lpotter/connectionagent
Source0:    %{name}-%{version}.tar.bz2
13
Source1:    connectionagent.tracing
14
Requires:   connman-qt5-declarative
15 16
Requires:   systemd
Requires:   systemd-user-session-targets
17
Requires: connman >= 1.21
18 19 20
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(connman-qt5)
21
BuildRequires:  pkgconfig(qofono-qt5)
22 23
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
24
BuildRequires:  pkgconfig(Qt5Qml)
25
BuildRequires:  pkgconfig(qt5-boostable)
26
Provides:   connectionagent > 0.10.1
27
Obsoletes:   connectionagent <= 0.7.6
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

%description
Connection Agent provides multi user access to connman's User Agent.
It also provides autoconnecting features.


%package declarative
Summary:    Declarative plugin for connection agent.
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description declarative
This package contains the declarative plugin for connection agent.

%package test
44
Summary:    auto test for connection agent.
45 46 47 48 49
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description test
50
This package contains the auto tests for connection agent.
51

52 53 54 55 56 57 58 59 60
%package tracing
Summary:    Configuration for Connectionagent to enable tracing
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}

%description tracing
Will enable tracing for Connectionagent


61 62 63 64 65 66 67 68 69 70
%prep
%setup -q -n %{name}-%{version}

# >> setup
# << setup

%build
# >> build pre
# << build pre

71 72
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
73

74 75
%qtc_qmake5
%qtc_make %{?_smp_mflags}
76 77 78 79 80 81 82 83

# >> build post
# << build post

%install
rm -rf %{buildroot}
# >> install pre
# << install pre
84
%qmake5_install
85

86 87 88 89
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/tracing/connectionagent/
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/tracing/connectionagent/

90
# >> install post
91 92
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
93 94
# << install post

95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
%post
# >> post
if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || :
systemctl-user restart connectionagent.service || :
fi
# << post

%postun
# >> postun
if [ "$1" -eq 0 ]; then
systemctl-user stop connectionagent.service || :
systemctl-user daemon-reload || :
fi
# << postun

111 112 113 114 115
%files
%defattr(-,root,root,-)
%{_bindir}/connectionagent
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service
%{_libdir}/systemd/user/connectionagent.service
116
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf
117
# >> files
118
%{_libdir}/systemd/user/user-session.target.wants/connectionagent.service
119 120 121 122
# << files

%files declarative
%defattr(-,root,root,-)
123
%{_libdir}/qt5/qml/com/jolla/connection/*
124 125 126
# >> files declarative
# << files declarative

127 128
%files test
%defattr(-,root,root,-)
129
%{_prefix}/opt/tests/libqofono/*
130 131
# >> files test
# << files test
132 133 134 135 136 137 138

%files tracing
%defattr(-,root,root,-)
%config %{_sysconfdir}/tracing/connectionagent
# >> files tracing
# << files tracing