packages: airvideo/airvideo.init (NEW), airvideo/airvideo.spec (NEW) - initial
glen
glen at pld-linux.org
Thu Sep 2 17:51:05 CEST 2010
Author: glen Date: Thu Sep 2 15:51:05 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- initial
---- Files affected:
packages/airvideo:
airvideo.init (NONE -> 1.1) (NEW), airvideo.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/airvideo/airvideo.init
diff -u /dev/null packages/airvideo/airvideo.init:1.1
--- /dev/null Thu Sep 2 17:51:05 2010
+++ packages/airvideo/airvideo.init Thu Sep 2 17:51:00 2010
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# airvideo Air-Video Video Streaming Server
+#
+# chkconfig: 345 20 80
+#
+# description: Air-Video Video Streaming Server
+#
+# processname: airvideo
+# config: /etc/airvideo.properties
+# pidfile: /var/run/airvideo.pid
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down "Air-Video Server"
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/airvideo ] && . /etc/sysconfig/airvideo
+
+start() {
+ # Check if the service is already running?
+ if [ -f /var/lock/subsys/airvideo ]; then
+ msg_already_running "Air-Video Server"
+ return
+ fi
+
+ msg_starting "Air-Video Server"
+ daemon --user nobody /usr/bin/java -jar /usr/share/java/AirVideoServerLinux.jar /etc/airvideo.properties
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/airvideo
+}
+
+stop() {
+ if [ ! -f /var/lock/subsys/airvideo ]; then
+ msg_not_running "Air-Video Server"
+ return
+ fi
+
+ # Stop daemons.
+ msg_stopping "Air-Video Server"
+ killproc --pidfile /var/run/airvideo.pid airvideo -TERM
+ rm -f /var/lock/subsys/airvideo
+}
+
+condrestart() {
+ if [ ! -f /var/lock/subsys/airvideo ]; then
+ msg_not_running "Air-Video Server"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
+ status)
+ status --pidfile /var/run/airvideo.pid airvideo java
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
================================================================
Index: packages/airvideo/airvideo.spec
diff -u /dev/null packages/airvideo/airvideo.spec:1.1
--- /dev/null Thu Sep 2 17:51:05 2010
+++ packages/airvideo/airvideo.spec Thu Sep 2 17:51:00 2010
@@ -0,0 +1,133 @@
+# $Revision$, $Date$
+# NOTE
+# - setup guide:
+# http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux
+# - clarify source files license and remove nosource
+
+%include /usr/lib/rpm/macros.java
+Summary: Air-Video Video Streaming Server
+Name: airvideo
+Version: 2.2.5
+Release: 0.3
+License: GPL v2+ with LGPL v2+ parts
+Group: Applications/Multimedia
+Source0: http://www.inmethod.com/air-video/download/ffmpeg-for-%{version}.tar.bz2
+# NoSource0-md5: 1623d51b433555e08d0c2fcf1dee1b55
+NoSource: 0
+Source1: %{name}.init
+Source2: http://inmethod.com/air-video/download/linux/alpha1/AirVideoServerLinux.jar
+# NoSource2-md5: 312d6dd45f6c9928e1570da67a6d8ee6
+NoSource: 2
+Source3: http://inmethod.com/air-video/download/linux/alpha1/test.properties
+# NoSource3-md5: 7bc6524cf7f8c2ec2cfac900bc6325cd
+NoSource: 3
+URL: http://www.inmethod.com/air-video/
+BuildRequires: faad2-devel
+BuildRequires: lame-libs-devel
+BuildRequires: libx264-devel >= 0.1.3
+BuildRequires: pkgconfig
+BuildRequires: rpm-javaprov
+BuildRequires: rpmbuild(macros) >= 1.470
+Requires: faac
+Requires: jpackage-utils
+Requires(post,preun): /sbin/chkconfig
+Requires: mpeg4ip
+Requires: rc-scripts
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _noautoreqdep libGL.so.1 libGLU.so.1
+
+%define specflags -fno-strict-aliasing
+
+# -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
+%define specflags_ia32 -fomit-frame-pointer
+# -mmmx is needed to enable <mmintrin.h> code.
+%define specflags_i586 -mmmx
+%define specflags_i686 -mmmx
+%define specflags_ppc -fPIC
+
+%description
+Air Video can stream videos in almost any format to your iPhone, iPad
+and iPod touch. You don't need to copy your videos to the device just
+to watch them.
+
+%prep
+%setup -qc
+mv ffmpeg/* .; rmdir ffmpeg
+
+%build
+# notes:
+# - it's not autoconf configure
+# - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
+
+./configure \
+ --arch=%{_target_base_arch} \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --shlibdir=%{_libdir} \
+ --mandir=%{_mandir} \
+ --cc="%{__cc}" \
+ --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
+ --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
+ --disable-debug \
+ --disable-optimizations \
+ --disable-stripping \
+ --enable-pthreads \
+ --disable-shared \
+ --enable-static \
+ --enable-gpl \
+ --enable-libx264 \
+ --enable-libmp3lame \
+ --enable-libfaad \
+ --disable-decoder=aac \
+%ifnarch %{ix86} %{x8664}
+ --disable-mmx \
+%endif
+%ifarch i386 i486
+ --disable-mmx \
+%endif
+ --enable-runtime-cpudetect
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/rc.d/init.d}
+install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+
+cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}
+sed -e '
+ /path.ffmpeg/ s;=.*;= %{_sbindir}/%{name};
+ /path.mp4creator/ s;=.*;= %{_bindir}/mp4creator;
+ /path.faac/ s;=.*;= %{_bindir}/faac;
+' %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+ %service -q %{name} stop
+ /sbin/chkconfig --del %{name}
+fi
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/airvideo
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%{_javadir}/AirVideoServerLinux.jar
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/09/02 15:51:00 glen
+- initial
================================================================
More information about the pld-cvs-commit
mailing list