]> git.pld-linux.org Git - packages/airvideo.git/commitdiff
- initial
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 2 Sep 2010 15:51:00 +0000 (15:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    airvideo.init -> 1.1
    airvideo.spec -> 1.1

airvideo.init [new file with mode: 0644]
airvideo.spec [new file with mode: 0644]

diff --git a/airvideo.init b/airvideo.init
new file mode 100644 (file)
index 0000000..7d7c600
--- /dev/null
@@ -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
diff --git a/airvideo.spec b/airvideo.spec
new file mode 100644 (file)
index 0000000..2d2868d
--- /dev/null
@@ -0,0 +1,123 @@
+# 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
This page took 0.099067 seconds and 4 git commands to generate.