Gentoo Archives: gentoo-commits

From: "Amadeusz Zolnowski (aidecoe)" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mjpg-streamer/files: mjpg-streamer.confd 0_pre20110522-make-var-instead-of-cmd.patch mjpg-streamer.initd
Date: Thu, 17 Nov 2011 20:00:49
Message-Id: 20111117200039.885572004B@flycatcher.gentoo.org
1 aidecoe 11/11/17 20:00:39
2
3 Added: mjpg-streamer.confd
4 0_pre20110522-make-var-instead-of-cmd.patch
5 mjpg-streamer.initd
6 Log:
7 media-video/mjpg-streamer: Initial ebuild. Fixes bug #260969.
8
9 Proxy commit on behalf of Andrzej Pauli <andrzej.pauli@×××××.com>.
10
11 (Portage version: 2.1.10.34/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.1 media-video/mjpg-streamer/files/mjpg-streamer.confd
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/mjpg-streamer.confd?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/mjpg-streamer.confd?rev=1.1&content-type=text/plain
18
19 Index: mjpg-streamer.confd
20 ===================================================================
21 # The input plugins and options:
22 # uvc
23 # testpicture
24 # file
25 #ex. INPUT_PLUGIN="uvc"
26 INPUT_PLUGIN=""
27 INPUT_PLUGIN_OPTS=""
28
29 # The output plugins and options:
30 # autofocus
31 # file
32 # http
33 # udp
34 # rtsp
35 #ex. OUTPUT_PLUGIN="http"
36 OUTPUT_PLUGIN=""
37 OUTPUT_PLUGIN_OPTS=""
38
39 # Deamon runing as user/group
40 MJPG_STREAMER_USER="nobody"
41 MJPG_STREAMER_GROUP="video"
42
43
44
45 1.1 media-video/mjpg-streamer/files/0_pre20110522-make-var-instead-of-cmd.patch
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/0_pre20110522-make-var-instead-of-cmd.patch?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/0_pre20110522-make-var-instead-of-cmd.patch?rev=1.1&content-type=text/plain
49
50 Index: 0_pre20110522-make-var-instead-of-cmd.patch
51 ===================================================================
52 Index: Makefile
53 ===================================================================
54 --- Makefile (revision 150)
55 +++ Makefile (working copy)
56 @@ -63,64 +63,64 @@
57 chmod 755 $(APP_BINARY)
58
59 output_autofocus.so: mjpg_streamer.h utils.h
60 - make -C plugins/output_autofocus all
61 + $(MAKE) -C plugins/output_autofocus all
62 cp plugins/output_autofocus/output_autofocus.so .
63
64 input_testpicture.so: mjpg_streamer.h utils.h
65 - make -C plugins/input_testpicture all
66 + $(MAKE) -C plugins/input_testpicture all
67 cp plugins/input_testpicture/input_testpicture.so .
68
69
70 ifeq ($(USE_LIBV4L2),true)
71 input_uvc.so: mjpg_streamer.h utils.h
72 - make -C plugins/input_uvc USE_LIBV4L2=true all
73 + $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all
74 cp plugins/input_uvc/input_uvc.so .
75 else
76 input_uvc.so: mjpg_streamer.h utils.h
77 - make -C plugins/input_uvc all
78 + $(MAKE) -C plugins/input_uvc all
79 cp plugins/input_uvc/input_uvc.so .
80 endif
81
82 input_control.so: mjpg_streamer.h utils.h
83 - make -C plugins/input_control all
84 + $(MAKE) -C plugins/input_control all
85 cp plugins/input_control/input_control.so .
86
87 output_file.so: mjpg_streamer.h utils.h
88 - make -C plugins/output_file all
89 + $(MAKE) -C plugins/output_file all
90 cp plugins/output_file/output_file.so .
91
92 ifeq ($(WXP_COMPAT),true)
93 output_http.so: mjpg_streamer.h utils.h
94 - make -C plugins/output_http -DWXP_COMPAT all
95 + $(MAKE) -C plugins/output_http -DWXP_COMPAT all
96 cp plugins/output_http/output_http.so .
97 else
98 output_http.so: mjpg_streamer.h utils.h
99 - make -C plugins/output_http all
100 + $(MAKE) -C plugins/output_http all
101 cp plugins/output_http/output_http.so .
102 endif
103
104 output_udp.so: mjpg_streamer.h utils.h
105 - make -C plugins/output_udp all
106 + $(MAKE) -C plugins/output_udp all
107 cp plugins/output_udp/output_udp.so .
108
109 input_gspcav1.so: mjpg_streamer.h utils.h
110 - make -C plugins/input_gspcav1 all
111 + $(MAKE) -C plugins/input_gspcav1 all
112 cp plugins/input_gspcav1/input_gspcav1.so .
113
114 input_file.so: mjpg_streamer.h utils.h
115 - make -C plugins/input_file all
116 + $(MAKE) -C plugins/input_file all
117 cp plugins/input_file/input_file.so .
118
119 output_rtsp.so: mjpg_streamer.h utils.h
120 - make -C plugins/output_rtsp all
121 + $(MAKE) -C plugins/output_rtsp all
122 cp plugins/output_rtsp/output_rtsp.so .
123
124 output_ptp2.so: mjpg_streamer.h utils.h
125 - make -C plugins/input_ptp2 all
126 + $(MAKE) -C plugins/input_ptp2 all
127 cp plugins/input_ptp2/input_ptp2.so .
128
129 #input_http.so: mjpg_streamer.h utils.h
130 -# make -C plugins/input_http all
131 +# $(MAKE) -C plugins/input_http all
132 # cp plugins/input_http/input_http.so .
133
134 # The viewer plugin requires the SDL library for compilation
135 @@ -129,22 +129,22 @@
136 # execute the following command:
137 # make output_viewer.so
138 output_viewer.so: mjpg_streamer.h utils.h
139 - make -C plugins/output_viewer all
140 + $(MAKE) -C plugins/output_viewer all
141 cp plugins/output_viewer/output_viewer.so .
142
143 # cleanup
144 clean:
145 - make -C plugins/input_uvc $@
146 - make -C plugins/input_testpicture $@
147 - make -C plugins/output_file $@
148 - make -C plugins/output_http $@
149 - make -C plugins/output_udp $@
150 - make -C plugins/output_autofocus $@
151 - make -C plugins/input_gspcav1 $@
152 - make -C plugins/output_viewer $@
153 - make -C plugins/input_control $@
154 - make -C plugins/output_rtsp $@
155 -# make -C plugins/input_http $@
156 + $(MAKE) -C plugins/input_uvc $@
157 + $(MAKE) -C plugins/input_testpicture $@
158 + $(MAKE) -C plugins/output_file $@
159 + $(MAKE) -C plugins/output_http $@
160 + $(MAKE) -C plugins/output_udp $@
161 + $(MAKE) -C plugins/output_autofocus $@
162 + $(MAKE) -C plugins/input_gspcav1 $@
163 + $(MAKE) -C plugins/output_viewer $@
164 + $(MAKE) -C plugins/input_control $@
165 + $(MAKE) -C plugins/output_rtsp $@
166 +# $(MAKE) -C plugins/input_http $@
167 rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo
168
169 # useful to make a backup "make tgz"
170
171
172
173 1.1 media-video/mjpg-streamer/files/mjpg-streamer.initd
174
175 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/mjpg-streamer.initd?rev=1.1&view=markup
176 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mjpg-streamer/files/mjpg-streamer.initd?rev=1.1&content-type=text/plain
177
178 Index: mjpg-streamer.initd
179 ===================================================================
180 #!/sbin/runscript
181 # Copyright 1999-2011 Gentoo Foundation
182 # Distributed under the terms of the GNU General Public License v2
183 # $Header: /var/cvsroot/gentoo-x86/media-video/mjpg-streamer/files/mjpg-streamer.initd,v 1.1 2011/11/17 20:00:39 aidecoe Exp $
184
185 MJPG_STREAMER_PIDFILE="${MJPG_STREAMER_PIDFILE:-/var/run/${SVCNAME}.pid}"
186 MY_NAME=${SVCNAME//-/_}
187
188 depend() {
189 use logger
190 }
191
192 checkconfig() {
193 local vars
194
195 [[ ${INPUT_PLUGIN} ]] || vars+=\ INPUT_PLUGIN
196 [[ ${OUTPUT_PLUGIN} ]] || vars+=\ OUTPUT_PLUGIN
197 [[ ${MJPG_STREAMER_USER} ]] || vars+=\ MJPG_STREAMER_USER
198 [[ ${MJPG_STREAMER_GROUP} ]] || vars+=\ MJPG_STREAMER_GROUP
199 vars="${vars# }"
200
201 if [[ ${vars} ]]; then
202 eerror "Required variables in /etc/conf.d/${SVCNAME} are not set:"
203 eerror " ${vars// /, }"
204 return 1
205 fi
206
207 return 0
208 }
209
210 start() {
211 checkconfig || return $?
212 ebegin "Starting ${SVCNAME}"
213 start-stop-daemon --start --exec /usr/bin/${MY_NAME} \
214 --user "${MJPG_STREAMER_USER}" \
215 --group "${MJPG_STREAMER_GROUP}" -w 100 -b -m \
216 --pidfile "${MJPG_STREAMER_PIDFILE}" \
217 -- -i "/usr/lib/input_${INPUT_PLUGIN}.so ${INPUT_PLUGIN_OPTS}" \
218 -o "/usr/lib/output_${OUTPUT_PLUGIN}.so ${OUTPUT_PLUGIN_OPTS}"
219 eend $? "Check syslog to see why startup failed."
220 }
221
222 stop() {
223 ebegin "Stopping ${SVCNAME}"
224 start-stop-daemon --stop --exec /usr/bin/${MY_NAME} \
225 --pidfile "${MJPG_STREAMER_PIDFILE}"
226 eend $?
227 }