forked from Flumotion/flumotion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flumotion.spec.in
336 lines (268 loc) · 10.1 KB
/
flumotion.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
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
326
327
328
329
330
331
332
333
334
335
336
%define gst_minver @GST_010_REQ@
%define gstpb_minver @GST_010_REQ@
%define gstpy_minver @PYGST_010_REQ@
%define pygtk_minver @PYGTK_010_REQ@
%define kiwi_minver 1.9.13
%{!?gstreamer: %define gstreamer gstreamer}
Name: @PACKAGE@
Version: @PACKAGE_VERSION_SPEC@
Release: @PACKAGE_VERSION_RELEASE@%{?dist}
Summary: Streaming Server based on GStreamer and Twisted
Group: Applications/Internet
License: LGPL
URL: http://www.flumotion.net/
Source: http://www.flumotion.net/src/flumotion/@PACKAGE_TARNAME@-@[email protected]
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: python >= 2.4
Requires: %{gstreamer} >= %{gst_minver}
Requires: %{gstreamer}-plugins-base >= %{gstpb_minver}
Requires: %{gstreamer}-python >= %{gstpy_minver}
Requires: python-twisted-core >= 2.5.0
Requires: python-twisted-names
Requires: python-twisted-web
Requires: python-twisted-conch
Requires: python-dateutil
Requires: pygtk2-libglade
Requires: pygtk2 >= %{pygtk_minver}
Requires: pyOpenSSL
Requires: pkgconfig
Requires: pyparsing
Requires: python-crypto
Requires: python-kiwi >= %{kiwi_minver}
# for make-dummy-cert to work
Requires(post): openssl
BuildRequires: python-devel >= 2.4
BuildRequires: python >= 2.4
# docs
BuildRequires: epydoc
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: pygtk2
BuildRequires: %{gstreamer}-python
BuildRequires: python-twisted-core
# sigh, libtool
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: intltool
# since we compile fdpass, we're no longer noarch
# BuildArch: noarch
%description
Flumotion is a LGPL streaming media server written in Python. It is distributed
and component-based: every step in the streaming process (production,
conversion, consumption) can be run inside a separate process on separate
machines.
Flumotion uses Twisted and GStreamer. Twisted enables the high-level
functionality, distributing components over the network. GStreamer, through the
Python bindings, enables the high-speed low-level functionality: actual media
processing.
Flumotion uses a central manager process to control the complete network; one
or more worker processes distributed over machines to run actual streaming
components; and one or more admin clients connecting to the manager to control
it.
To define the base name of GStreamer packages to build against
(gstreamer or gstreamer010, depending on your distro), use e.g.:
--define 'gstreamer gstreamer010'
%prep
%setup -q -n @PACKAGE_TARNAME@-@PACKAGE_VERSION@
%build
%configure
make
%install
rm -rf $RPM_BUILD_ROOT
# use DESTDIR so compiled python files get tagged correctly with their
# final location
make DESTDIR=$RPM_BUILD_ROOT install
# desktop file
desktop-file-install \
--vendor fedora \
--mode 644 \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category X-Fedora \
--delete-original \
$RPM_BUILD_ROOT%{_datadir}/applications/flumotion-admin.desktop
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/flumotion
# install service files
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
install -m 755 \
doc/redhat/flumotion \
$RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
# create log and run and cache and lib rrd directory
install -d $RPM_BUILD_ROOT%{_localstatedir}/log/flumotion
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/flumotion
install -d $RPM_BUILD_ROOT%{_localstatedir}/cache/flumotion
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/flumotion/rrd
# Install the logrotate entry
%{__install} -m 0644 -D doc/redhat/flumotion.logrotate \
%{buildroot}%{_sysconfdir}/logrotate.d/flumotion
%find_lang flumotion
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/useradd -s /sbin/nologin \
-r -d %{_localstatedir}/cache/flumotion -M \
flumotion > /dev/null 2> /dev/null || :
# for old installs, we need to move the homedir
/usr/sbin/usermod -d %{_localstatedir}/cache/flumotion \
flumotion > /dev/null 2> /dev/null || :
%post
/sbin/chkconfig --add flumotion
# generate a default .pem certificate ?
PEM_FILE="%{_sysconfdir}/flumotion/default.pem"
if ! test -e ${PEM_FILE}
then
sh %{_datadir}/flumotion/make-dummy-cert ${PEM_FILE}
chown :flumotion ${PEM_FILE}
chmod 640 ${PEM_FILE}
fi
# create a default planet config if no manager configs present
# the default login will be user/test
if ! test -e %{_sysconfdir}/flumotion/managers
then
mkdir -p %{_sysconfdir}/flumotion/managers/default/flows
cat > %{_sysconfdir}/flumotion/managers/default/planet.xml <<EOF
<planet>
<manager>
<!-- <debug>3</debug> -->
<host>localhost</host>
<!--
<port>7531</port>
<transport>ssl</transport>
-->
<!-- certificate path can be relative to /etc/flumotion,
or absolute -->
<!--
<certificate>default.pem</certificate>
-->
<component name="manager-bouncer" type="htpasswdcrypt-bouncer">
<property name="data"><![CDATA[
user:PSfNpHTkpTx1M
]]></property>
</component>
</manager>
</planet>
EOF
fi
# create a default worker config if no worker configs present
# the default login will be user/test
if ! test -e %{_sysconfdir}/flumotion/workers
then
mkdir -p %{_sysconfdir}/flumotion/workers
cat > %{_sysconfdir}/flumotion/workers/default.xml <<EOF
<worker>
<!-- <debug>3</debug> -->
<manager>
<!--
<host>localhost</host>
<port>7531</port>
-->
</manager>
<authentication type="plaintext">
<username>user</username>
<password>test</password>
</authentication>
<!-- <feederports>8600-8639</feederports> -->
</worker>
EOF
fi
%preun
# if removal and not upgrade, stop the processes, clean up locks
if [ $1 -eq 0 ]
then
/sbin/service flumotion stop > /dev/null
rm -rf %{_localstatedir}/lock/flumotion*
rm -rf %{_localstatedir}/run/flumotion*
# clean out the cache/home dir too, without deleting it or the user
rm -rf %{_localstatedir}/cache/flumotion/*
rm -rf %{_localstatedir}/cache/flumotion/.[^.]*
/sbin/chkconfig --del flumotion
fi
# Think about this first, we don't really want to stop everything
#%postun
# if [ $1 -ge 1 ]; then
# /sbin/service flumotion condrestart
# fi
%files -f flumotion.lang
%defattr(-,root,root,-)
%doc ChangeLog COPYING README AUTHORS flumotion.doap
%doc doc/reference/html
%doc conf
%config(noreplace) %{_sysconfdir}/logrotate.d/flumotion
%{_bindir}/flumotion-manager
%{_bindir}/flumotion-worker
%{_bindir}/flumotion-admin
%{_bindir}/flumotion-admin-text
%{_bindir}/flumotion-command
%{_bindir}/flumotion-tester
%{_bindir}/flumotion-job
%{_bindir}/flumotion-inspect
%{_bindir}/flumotion-launch
%{_bindir}/flumotion-rrdmon
%{_bindir}/flumotion-nagios
%{_sbindir}/flumotion
%{_libdir}/flumotion
%{_libdir}/pkgconfig/flumotion.pc
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*
%{_mandir}/man1/flumotion*.1*
%{_datadir}/flumotion/glade
%{_datadir}/flumotion/image
%{_datadir}/flumotion/make-dummy-cert
%{_datadir}/flumotion/*.xsl
%{_datadir}/flumotion/*.html
%{_datadir}/hal/fdi/policy/20thirdparty/91-flumotion-device-policy.fdi
%attr(750,root,flumotion) %{_sysconfdir}/flumotion
%attr(770,root,flumotion) %{_localstatedir}/run/flumotion
%attr(770,root,flumotion) %{_localstatedir}/log/flumotion
%attr(770,root,flumotion) %{_localstatedir}/lib/flumotion
%attr(770,root,flumotion) %{_localstatedir}/lib/flumotion/rrd
%attr(770,flumotion,flumotion) %{_localstatedir}/cache/flumotion
%{_sysconfdir}/rc.d/init.d/flumotion
%changelog
* Thu Jul 15 2010 Jan Urbanski <jurbanski at flumotion dot com>
- Add BuildRequires necessary for docs building.
* Thu Jun 03 2010 Andoni Morales Alastruey <amorales at flumotion dot com>
- Replace PIL dependency with pycairo.
* Thu Oct 30 2008 Thomas Vander Stichele <thomas at apestaart dot org>
- Add directory for rrd databases now that we have a plug for it.
* Tue Jul 22 2008 Thomas Vander Stichele <thomas at apestaart dot org>
- Add gettext buildrequires; looks like on RHEL5 intltool doesn't pull it in.
* Wed Apr 02 2008 Thomas Vander Stichele <thomas at apestaart dot org>
- Add intltool buildrequires
* Wed Nov 28 2007 Johan Dahlin <johan at gnome dot org>
- Add kiwi dependency and bump pygtk to 2.8.4
* Fri Aug 24 2007 Zaheer Abbas Merali <zaheerabbas at merali dot org>
- Add flumotion-nagios
* Mon Jul 30 2007 Arek Korbik <arkadini at gmail dot com>
- Add flumotion-rrdmon
* Tue Jun 26 2007 Christian Schaller <christian at fluendo dot com>
- Adding SELinux policy file for setting device access
* Wed May 16 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- Add a python-crypto dependency for the sha256 bouncer
* Mon Jan 22 2007 Andy Wingo <wingo at pobox.com>
- Make the run, log, and cache directories group-writable, so that
processes can manage their own pid, log files, and registry caches.
* Tue Dec 19 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- switch around to root:flumotion for ownership of various directories,
allowing users in the flumotion group to see logs and config
- remove flumotion cache/home dir contents
- clean up commenting in manager config
* Sun Jun 18 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- only create default worker if there is not /etc/flumotion/workers
- only create default manager if there is not /etc/flumotion/managers
- make gstreamer versions defines
- change flumotion home directory to /var/cache/flumotion
* Fri Jul 29 2005 Thomas Vander Stichele <thomas at apestaart dot org>
- added translations
* Thu May 19 2005 Thomas Vander Stichele <thomas at apestaart dot org>
- use disted make-dummy-cert
* Mon Feb 14 2005 Christian Schaller <christian at fluendo dot com>
- Add desktop file for admin tool and icon
* Thu Nov 11 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- Integrate changes from issue 86
* Fri Nov 05 2004 Christian Schaller <christian at fluendo com>
- Add call to chkconfig script in post and preun parts to get our service into
the service list
* Fri Nov 05 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- use DESTDIR install to fix python compiles
* Mon Jun 07 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- first package