-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdrouter.spec.in
208 lines (173 loc) · 6.91 KB
/
drouter.spec.in
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
## drouter.spec.in
##
## Dynamic router framework for Livewire
##
## Copyright (C) 2017-2021 Fred Gleason <[email protected]>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of version 2 of the GNU General Public License as
## published by the Free Software Foundation;
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330,
## Boston, MA 02111-1307 USA
##
Summary: Dynamic router framework for Livewire
Name: drouter
Version: @VERSION@
Release: @RPM_RELEASE@%{?dist}
License: GPLv2
Source: %{name}-@[email protected]
BuildRequires: qt5-qtbase-devel, systemd-devel, python36
BuildRoot: /var/tmp/%{name}-@VERSION@
Requires: drouter-python = @VERSION@, mariadb-server, qt5-qtbase-mysql
%package panels
Summary: GUI control panels for DRouter
Requires: qt5-qtbase-mysql firefox lwmon
%package python
Summary: Python API for using state scripts with Drouter
Requires: python36
%description
DRouter is a dynamic router framework for controling a Livewire audio network.
In addition to its own native ProtocolD, it also provides support for
legacy PathFinder control clients by means of Software Authority protocol.
%description panels
GUI control panels for DRouter. Most of these actually use Software
Authority protocol and so should work fine with the various PathFinder
versions as well.
%description python
Python API for the Drouter framework. This allows creation of "state scripts"
that can be used to provide automated responses to changes in the state
of the Livewire network.
%prep
%setup
%build
%configure
make -j @CPUS_AVAIL@
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/drouter/maps.d
mkdir -p $RPM_BUILD_ROOT/etc/drouter/scripts.d
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}
cp AUTHORS $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
cp ChangeLog $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
cp COPYING $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
cp NEWS $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
cp README $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
cp conf/drouter.conf-sample $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/protocols
cp docs/protocol_d.pdf $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/protocols/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples
scripts/install_python.sh python/examples/show_changes.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_changes.py
scripts/install_python.sh python/examples/show_destinations.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_destinations.py
scripts/install_python.sh python/examples/show_gpis.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_gpis.py
scripts/install_python.sh python/examples/show_gpos.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_gpos.py
scripts/install_python.sh python/examples/show_nodes.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_nodes.py
scripts/install_python.sh python/examples/show_sources.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/show_sources.py
scripts/install_python.sh python/examples/silence_alarm.py $RPM_BUILD_ROOT/%{_datadir}/doc/drouter-%{version}/examples/silence_alarm.py
%post
if [ -x %{_bindir}/systemctl ] ; then
/bin/systemctl daemon-reload
/bin/systemctl start drouter.socket
/bin/systemctl enable drouter.socket
/bin/systemctl start drouter.service
/bin/systemctl enable drouter.service
fi
if test "@DISTRO@" = "suse" ; then
PACKAGE_DOC_DIR=%_docdir/%{name}
fi
if test "@DISTRO@" = "redhat" ; then
PACKAGE_DOC_DIR=%_docdir/%{name}-@VERSION@
fi
if test ! -e /etc/drouter/drouter.conf ; then
mkdir -p /etc/drouter
mkdir -p /etc/drouter/maps.d
mkdir -p /etc/drouter/scripts.d
cp $PACKAGE_DOC_DIR/drouter.conf-sample /etc/drouter/drouter.conf
mkdir -p /var/cache/drouter
chown root:root /var/cache/drouter
chmod 0600 /var/cache/drouter
fi
%preun
if [ -x %{_bindir}/systemctl ] ; then
/bin/systemctl stop drouter.socket
/bin/systemctl disable drouter.socket
/bin/systemctl stop drouter.service
/bin/systemctl disable drouter.service
fi
%postun
if [ -x %{_bindir}/systemctl ] ; then
systemctl daemon-reload
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/dmap
%{_bindir}/drouter_init_db.sh
%{_bindir}/pf_import.py
%{_sbindir}/drouterd
%{_sbindir}/dprotod
%{_datadir}/man/man1/dmap.1.gz
%{_datadir}/man/man5/drouter.conf.5.gz
%{_datadir}/man/man5/drouter.map.5.gz
%{_datadir}/man/man8/drouterd.8.gz
%dir /var/cache/drouter
/lib/systemd/system/drouter.service
/lib/systemd/system/drouter.socket
%dir /etc/drouter/maps.d
%dir /etc/drouter/scripts.d
%{_datadir}/doc/drouter-%{version}/protocols/*
%{_datadir}/doc/drouter-%{version}/AUTHORS
%{_datadir}/doc/drouter-%{version}/ChangeLog
%{_datadir}/doc/drouter-%{version}/COPYING
%{_datadir}/doc/drouter-%{version}/NEWS
%{_datadir}/doc/drouter-%{version}/README
%{_datadir}/doc/drouter-%{version}/drouter.conf-sample
%files panels
%defattr(-,root,root)
%{_bindir}/buttonpanel
%{_bindir}/eventlogpanel
%{_bindir}/outputpanel
%{_bindir}/shotpanel
%{_bindir}/xpointpanel
%{_bindir}/xypanel
%{_datadir}/man/man1/buttonpanel.1.gz
%{_datadir}/man/man1/eventlogpanel.1.gz
%{_datadir}/man/man1/outputpanel.1.gz
%{_datadir}/man/man1/shotpanel.1.gz
%{_datadir}/man/man1/xpointpanel.1.gz
%{_datadir}/man/man1/xypanel.1.gz
%{_datadir}/icons/hicolor/16x16/apps/drouter.png
%{_datadir}/icons/hicolor/48x48/apps/drouter.png
%files python
%{_bindir}/dlist
%{_bindir}/dstate
%{_libdir}/python@PYTHON_VERSION@/site-packages/Drouter
%{_datadir}/man/man1/dlist.1.gz
%{_datadir}/man/man1/dstate.1.gz
%{_datadir}/doc/drouter-%{version}/examples/*
%changelog
* Sat Jul 30 2022 Fred Gleason <[email protected]>
-- Removed the 32x32 version of the 'drouter' icon.
* Thu Jul 21 2022 Fred Gleason <[email protected]>
-- Added eventlogpanel(1).
* Thu May 7 2020 Fred Gleason <[email protected]>
-- Added 'lwmon' and 'firefox' dependencies to the 'gui' subpackage.
* Thu Aug 8 2019 Fred Gleason <[email protected]>
-- Added the shotpanel(1) man page.
* Tue Mar 6 2018 Fred Gleason <[email protected]>
-- Added python API example scripts.
* Mon Mar 5 2018 Fred Gleason <[email protected]>
-- Added a 'python' subpackage.
* Thu Oct 12 2017 Fred Gleason <[email protected]>
-- Added a 'panels' subpackage.
* Thu Oct 5 2017 Fred Gleason <[email protected]>
-- Initial RPM creation.