3 # http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux
4 # - clarify source files license and remove nosource
6 %include /usr/lib/rpm/macros.java
7 Summary: Air-Video Video Streaming Server
11 License: GPL v2+ with LGPL v2+ parts
12 Group: Applications/Multimedia
13 Source0: http://www.inmethod.com/air-video/download/ffmpeg-for-%{version}.tar.bz2
14 # NoSource0-md5: 1623d51b433555e08d0c2fcf1dee1b55
17 Source2: http://inmethod.com/air-video/download/linux/alpha1/AirVideoServerLinux.jar
18 # NoSource2-md5: 312d6dd45f6c9928e1570da67a6d8ee6
20 Source3: test.properties
21 URL: http://www.inmethod.com/air-video/
22 BuildRequires: faad2-devel
23 BuildRequires: lame-libs-devel
24 BuildRequires: libx264-devel >= 0.1.3
25 BuildRequires: pkgconfig
26 BuildRequires: rpm-javaprov
27 BuildRequires: rpmbuild(macros) >= 1.470
29 Requires: jpackage-utils
30 Requires(post,preun): /sbin/chkconfig
31 Requires: mpeg4ip-server
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _noautoreqdep libGL.so.1 libGLU.so.1
37 %define specflags -fno-strict-aliasing
39 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
40 %define specflags_ia32 -fomit-frame-pointer
41 # -mmmx is needed to enable <mmintrin.h> code.
42 %define specflags_i586 -mmmx
43 %define specflags_i686 -mmmx
44 %define specflags_ppc -fPIC
47 Air Video can stream videos in almost any format to your iPhone, iPad
48 and iPod touch. You don't need to copy your videos to the device just
53 mv ffmpeg/* .; rmdir ffmpeg
57 # - it's not autoconf configure
58 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
61 --arch=%{_target_base_arch} \
64 --shlibdir=%{_libdir} \
67 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
68 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
70 --disable-optimizations \
79 --disable-decoder=aac \
83 %ifnarch %{ix86} %{x8664}
89 --enable-runtime-cpudetect
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/rc.d/init.d,/var/lib/airvideo}
96 install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name}
97 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
99 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}
100 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties
103 rm -rf $RPM_BUILD_ROOT
106 /sbin/chkconfig --add %{name}
107 %service %{name} restart
110 if [ "$1" = "0" ]; then
111 %service -q %{name} stop
112 /sbin/chkconfig --del %{name}
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_sbindir}/airvideo
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties
119 %attr(754,root,root) /etc/rc.d/init.d/%{name}
120 %{_javadir}/AirVideoServerLinux.jar
121 # XXX, if it really writes something, get dedicated user
122 %dir %attr(755,nobody,nobody) /var/lib/airvideo