connectionagent-qt5.spec 2.71 KB
Newer Older
1 2 3
Name:       connectionagent-qt5

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

%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
38
Summary:    auto test for connection agent.
39 40 41 42 43
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description test
44
This package contains the auto tests for connection agent.
45

46 47 48 49 50 51 52 53
%package tracing
Summary:    Configuration for Connectionagent to enable tracing
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}

%description tracing
Will enable tracing for Connectionagent

54 55 56 57
%prep
%setup -q -n %{name}-%{version}

%build
58 59
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
60

61 62
%qtc_qmake5
%qtc_make %{?_smp_mflags}
63 64 65 66


%install
rm -rf %{buildroot}
67
%qmake5_install
68

69 70
%make_install

71 72
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
73

74 75 76 77 78 79 80 81 82 83 84 85
%post
if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || :
systemctl-user restart connectionagent.service || :
fi

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

86 87 88 89 90
%files
%defattr(-,root,root,-)
%{_bindir}/connectionagent
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service
%{_libdir}/systemd/user/connectionagent.service
91
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf
92
%{_libdir}/systemd/user/user-session.target.wants/connectionagent.service
93 94 95

%files declarative
%defattr(-,root,root,-)
96
%{_libdir}/qt5/qml/com/jolla/connection/*
97

98 99
%files test
%defattr(-,root,root,-)
100
%{_prefix}/opt/tests/connectionagent/*
101 102 103

%files tracing
%defattr(-,root,root,-)
104
%config /var/lib/environment/nemo/70-connectionagent-tracing.conf