1 |
%define tarname pulse-agent-plugins |
2 |
|
3 |
# Multi-distro conditionals |
4 |
%{!?__python2: %global __python2 /usr/bin/python2} |
5 |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} |
6 |
%{!?py2_build: %global py2_build CFLAGS="%{optflags}" %{__python2} setup.py build} |
7 |
%{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot}} |
8 |
%{!?mkrel: %global mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?dist:%dist}} |
9 |
|
10 |
Summary: Pulse Agent Plugins |
11 |
Name: pulse-agent-plugins |
12 |
Version: 1.2 |
13 |
Release: %mkrel 1 |
14 |
Source0: %name-%version.tar.gz |
15 |
License: MIT |
16 |
Group: Development/Python |
17 |
Url: http://www.siveo.net |
18 |
BuildArch: noarch |
19 |
BuildRequires: python-setuptools |
20 |
BuildRequires: python-sphinx |
21 |
|
22 |
%description |
23 |
Pulse Agent Plugins |
24 |
|
25 |
#-------------------------------------------------------------------- |
26 |
|
27 |
%package -n pulse-xmppmaster-agentplugins |
28 |
Summary: Console agent |
29 |
Group: System/Servers |
30 |
Requires: python-netifaces |
31 |
Requires: python-sleekxmpp |
32 |
|
33 |
|
34 |
%description -n pulse-xmppmaster-agentplugins |
35 |
plugins for pulse xmppmaster |
36 |
|
37 |
%files -n pulse-xmppmaster-agentplugins |
38 |
%_var/lib/pulse2/xmpp_baseplugin |
39 |
%{python2_sitelib}/pulse_agent_plugins-%{version}-py?.?.egg-info |
40 |
|
41 |
#-------------------------------------------------------------------- |
42 |
|
43 |
%package -n pulseagent-plugins-relay |
44 |
Summary: Console agent |
45 |
Group: System/Servers |
46 |
Requires: python-wakeonlan |
47 |
Requires: python-netifaces |
48 |
Requires: python-sleekxmpp |
49 |
Requires: lsof |
50 |
|
51 |
%description -n pulseagent-plugins-relay |
52 |
plugins for pulse xmppmaster |
53 |
|
54 |
%files -n pulseagent-plugins-relay |
55 |
%{python2_sitelib}/pulse_xmpp_agent/pluginsrelay |
56 |
%_var/lib/pulse2/clients/config/ |
57 |
|
58 |
#-------------------------------------------------------------------- |
59 |
|
60 |
%package -n pulseagent-plugins-machine |
61 |
Summary: Console agent |
62 |
Group: System/Servers |
63 |
Requires: python-netifaces |
64 |
Requires: python-sleekxmpp |
65 |
|
66 |
%description -n pulseagent-plugins-machine |
67 |
plugins for pulse xmppmaster |
68 |
|
69 |
%files -n pulseagent-plugins-machine |
70 |
%{python2_sitelib}/pulse_xmpp_agent/pluginsmachine |
71 |
%_sysconfdir/pulse-xmpp-agent/inventory.ini |
72 |
|
73 |
#-------------------------------------------------------------------- |
74 |
|
75 |
%prep |
76 |
%setup -q |
77 |
|
78 |
# Remove bundled egg-info |
79 |
rm -rf %{tarname}.egg-info |
80 |
|
81 |
%build |
82 |
%py2_build |
83 |
|
84 |
%install |
85 |
%py2_install |
86 |
|
87 |
mkdir -p %buildroot%_var/lib/pulse2/xmpp_baseplugin |
88 |
cp -frv pulse_agent_plugins/common/* %buildroot%_var/lib/pulse2/xmpp_baseplugin |
89 |
cp -frv pulse_agent_plugins/machine/* %buildroot%_var/lib/pulse2/xmpp_baseplugin |
90 |
cp -frv pulse_agent_plugins/relay/* %buildroot%_var/lib/pulse2/xmpp_baseplugin |
91 |
|
92 |
mkdir -p %buildroot%_var/lib/pulse2/clients/config |
93 |
cp pulse_agent_plugins/config/guacamoleconf.ini.in %buildroot%_var/lib/pulse2/clients/config |
94 |
cp pulse_agent_plugins/config/inventory.ini %buildroot%_var/lib/pulse2/clients/config |