-
Notifications
You must be signed in to change notification settings - Fork 8
/
autoradio.spec
325 lines (268 loc) · 12.2 KB
/
autoradio.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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
Summary: radio automation software
Name: autoradio
Version: 3.6
Release: 6
Source0: %{name}-%{version}.tar.gz
# tmpfiles.d configuration for the /var/run directory
#Source1: %%{name}-tmpfiles.conf
License: GNU GPL v2
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Paolo Patruno <[email protected]>
Url: https://github.com/pat1/autoradio
BuildRequires: python3-devel, python3-setuptools, gettext, python3-configobj, python3-magic, python3-django >= 2.2 , help2man, python3-setuptools
Requires:python3-mutagen >= 1.17 , python3-django >= 2.2, python3-configobj, python3-cherrypy, python3-reportlab >= 2.0, python3-docutils, sqlite >= 3.6.22, speex-tools, python3-magic, python3-pillow
#, python-django-extensions
#Requires: initscripts
#%if 0%%{?fedora} < 10
#Requires: pyxmms, xmms
#%else
## Requires: dbus-python, audacious >= 1.5
Requires: python3-dbus, python3-gstreamer1, gstreamer1-plugins-base, gstreamer1-plugins-good
#, gstreamer-plugins-bad, gstreamer-plugins-bad-free, gstreamer-plugins-bad-free-extras
#%endif
%description
\
Radio automation software. Simple to use, starting from digital audio
files, manage on-air broadcasting over a radio-station or
web-radio. The main components are:
* Player integrated (gstreamer) or external (Xmms/Audacious):
plays all your media files and send digital sound to an audio
device or audio server
* Scheduler: real time manager for emission of special audio files
like jingles, spots, playlist and programs; interact with player
like supervisor User
* inteface: WEB interface to monitor the player and scheduler and
admin the schedules for the complete control over your station
format. The web interface allows you to easily publish podcasts
that conform to the RSS 2.0 and iTunes RSS podcast specifications
The web interface provide a "full compatible" ogg player.
Developed with Python, Django, Dbus it works in an production enviroment
%prep
%setup -n %{name}-%{version} -n %{name}-%{version}
%build
%py3_build
%install
%py3_install
##%{__install} -d -m 0710 %{buildroot}%{_var}/{run/autoradio,log/autoradio}
mkdir -p %{buildroot}%{_localstatedir}/run/
mkdir -p %{buildroot}%{_localstatedir}/log/
%{__install} -d -m 0710 %{buildroot}%{_localstatedir}/{run/autoradio,log/autoradio}
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
%{__install} -m 0644 %{name}-tmpfiles.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING README doc/*
%config(noreplace) %{_sysconfdir}/%{name}/autoradio-site.cfg
%config(noreplace) %{_sysconfdir}/%{name}/dbus-autoradio.conf
%dir %{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}/*
%{python3_sitelib}/%{name}-*
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
#%%{_datadir}/autoradio/*
%{_bindir}/autoradiod
%{_bindir}/autoradioweb
%{_bindir}/autoradioctrl
%{_bindir}/autoplayerd
%{_bindir}/autoplayergui
%{_bindir}/autoradiodbusd
%{_bindir}/jackdaemon
%attr(-,autoradio,autoradio) %dir %{_datadir}/autoradio
%attr(-,autoradio,autoradio) %{_datadir}/%{name}/*
%attr(-,autoradio,autoradio) %dir %{_var}/log/%{name}/
%attr(-,autoradio,autoradio) %dir %{_var}/run/%{name}/
%pre
/usr/bin/getent group autoradio >/dev/null || /usr/sbin/groupadd autoradio
/usr/bin/getent passwd autoradio >/dev/null || \
/usr/sbin/useradd -g autoradio -d %{_datadir}/autoradio -M \
-c "autoradio user for radio automation software" autoradio
#/usr/bin/getent group autoradio >/dev/null || /usr/sbin/groupadd -r autoradio
#/usr/bin/getent passwd autoradio >/dev/null || \
# /usr/sbin/useradd -r -s /sbin/nologin -d %{_datadir}/autoradio -g autoradio \
# -c "autoradio user for radio automation software" autoradio
## Fix homedir for upgrades
#/usr/sbin/usermod --home %{_datadir}/autoradio autoradio &>/dev/null
##exit 0
#%post
#
## set some useful variables
#AUTORADIO="autoradio"
#CHOWN="/bin/chown"
#ADDUSER="/usr/sbin/adduser"
#USERDEL="/usr/sbin/userdel"
#USERADD="/usr/sbin/useradd"
#GROUPDEL="/usr/sbin/groupdel"
#GROUPMOD="/usr/sbin/groupmod"
#ID="/usr/bin/id"
#
#set -e
#
####
## 1. get current autoradio uid and gid if user exists.
#if $ID $AUTORADIO > /dev/null 2>&1; then
# IUID=`$ID --user $AUTORADIO`
# IGID=`$ID --group $AUTORADIO`
#else
# IUID="NONE"
# IGID="NONE"
#fi
#
#####
### 2. Ensure that no standard account or group will remain before adding the
### new user
##if [ "$IUID" = "NONE" ] || [ $IUID -ge 1000 ]; then # we must do sth :)
## if ! [ "$IUID" = "NONE" ] && [ $IUID -ge 1000 ]; then
## # autoradio user exists but isn't a system user... delete it.
## $USERDEL $PEERCAST
## $GROUPDEL $PEERCAST
## fi
##
#####
#
## 3. Add the system account.
## Issue a debconf warning if it fails.
# if $GROUPMOD $AUTORADIO > /dev/null 2>&1; then
# # peercast group already exists, use --ingroup
# if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/autoradio --no-create-home --ingroup $AUTORADIO $AUTORADIO; then
# echo "The adduser command failed."
# fi
# else
# if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/peercast --no-create-home --group $AUTORADIO; then
# echo "The adduser command failed."
# fi
# fi
#fi
#set +e
#
####
## 4. change ownership of directory
#$CHOWN -R $AUTORADIO:$AUTORADIO /usr/share/autoradio/
#$CHOWN -R $AUTORADIO:$AUTORADIO /var/log/autoradio/
#$CHOWN -R $AUTORADIO:$AUTORADIO /etc/autoradio/
#$CHOWN -R $AUTORADIO:$AUTORADIO /var/run/autoradio/
%changelog
* Mon Apr 08 2024 Paolo Patruno <[email protected]> 3.6-6
- close #35 ([email protected])
- migrate to django 3 ([email protected])
* Fri Apr 05 2024 Paolo Patruno <[email protected]> 3.6-5
- close #39 ([email protected])
- close #36 ([email protected])
- close #40 ([email protected])
- DJango 3.x compatibility ([email protected])
* Fri Dec 29 2023 Paolo Patruno <[email protected]> 3.6-4
- sintax error ([email protected])
* Fri Dec 29 2023 Paolo Patruno <[email protected]> 3.6-3
- remove python3-future dependency ([email protected])
* Fri Dec 29 2023 Paolo Patruno <[email protected]> 3.6-2
- bugs on string codec ([email protected])
* Fri Dec 29 2023 Paolo Patruno <[email protected]> 3.6-1
- drop extraneous imports of part of stdlib ([email protected])
- remove Python2 support ([email protected])
- remove SIX crumbs ([email protected])
- minor improvements ([email protected])
* Wed Sep 29 2021 Paolo Patruno <[email protected]> 3.5-1
- changed securesec (the time to have to play in current position in playlist
when we insert track in playlist) from 10 to 20 sec
- revert busaddress patch and limit the number of districa call to solve
infinite loop, ported the web interface ([email protected])
- migrate to the last mpris2 python interface ([email protected])
- close #30 ([email protected])
- bug loading playlist; generator in python 3 do not work if used more time
- more documentation ([email protected])
- new release for debian new convenction with matainer
- new README ([email protected])
* Thu Jan 23 2020 Paolo Patruno <[email protected]> 3.3-4
- exception with player without track list ([email protected])
* Wed Jan 15 2020 Paolo Patruno <[email protected]> 3.3-3
- working on spec file ([email protected])
- little update in documentation ([email protected])
* Wed Jan 15 2020 Paolo Patruno <[email protected]> 3.3-2
- working on spec file ([email protected])
- working on spec file ([email protected])
- working on spec file ([email protected])
- working on spec file ([email protected])
- new sper release ([email protected])
* Wed Jan 15 2020 Paolo Patruno <[email protected]> 3.3-1
- added shebang for python3 ; release 3.3 ([email protected])
- release 3.2 for Debian ([email protected])
- migrate to django 2.2 and python3 bugs ([email protected])
- bug on debian install (default locale) and python3 refinements
- ready for release 3.0 ([email protected])
- ported player to python 3 ([email protected])
- new migration for python3 ([email protected])
- porting to python3 with futurize ([email protected])
- sure you specify the proper version support in your setup.py file
- new stable release for Debian ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]> 2.8.9-1
-
* Wed Feb 01 2017 Paolo Patruno <[email protected]> 2.8.8-1
- standard spec file ([email protected])
- bug in spec ([email protected])
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- bug in spec ([email protected])
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- removed SOURCE1 fron spec file ([email protected])
- better monit example ([email protected])
- new package built with tito ([email protected])
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]>
- lost autoradio-tmpfiles.conf ([email protected])
* Wed Feb 01 2017 Paolo Patruno <[email protected]> 2.8.7-8
- new package built with tito
* Sat Aug 10 2013 Paolo Patruno <[email protected]> - 2.8.0-1%{?dist}
- bumped to version 2.8
* Mon Feb 18 2013 Paolo Patruno <[email protected]> - 2.7.0-1%{?dist}
- autoradio 2.7 with pygst
* Sat Apr 14 2012 Paolo Patruno <[email protected]> - 2.3-2%{?dist}
- tmpfiles.d is a service provided by both systemd and upstart in Fedora 15 and later for managing temporary files and directories for daemons https://fedoraproject.org/wiki/Packaging:Tmpfiles.d
* Sat Apr 14 2012 Paolo Patruno <[email protected]> - 2.3-1%{?dist}
- updated to 2.3
* Fri Aug 12 2011 Paolo Patruno <[email protected]> - 2.1beta-1%{?dist}
- upstream version 2.1beta