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: http://inmethod.com/air-video/download/linux/alpha1/test.properties
21 # NoSource3-md5: 7bc6524cf7f8c2ec2cfac900bc6325cd
23 URL: http://www.inmethod.com/air-video/
24 BuildRequires: faad2-devel
25 BuildRequires: lame-libs-devel
26 BuildRequires: libx264-devel >= 0.1.3
27 BuildRequires: pkgconfig
28 BuildRequires: rpm-javaprov
29 BuildRequires: rpmbuild(macros) >= 1.470
31 Requires: jpackage-utils
32 Requires(post,preun): /sbin/chkconfig
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _noautoreqdep libGL.so.1 libGLU.so.1
39 %define specflags -fno-strict-aliasing
41 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
42 %define specflags_ia32 -fomit-frame-pointer
43 # -mmmx is needed to enable <mmintrin.h> code.
44 %define specflags_i586 -mmmx
45 %define specflags_i686 -mmmx
46 %define specflags_ppc -fPIC
49 Air Video can stream videos in almost any format to your iPhone, iPad
50 and iPod touch. You don't need to copy your videos to the device just
55 mv ffmpeg/* .; rmdir ffmpeg
59 # - it's not autoconf configure
60 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
63 --arch=%{_target_base_arch} \
66 --shlibdir=%{_libdir} \
69 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
70 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
72 --disable-optimizations \
81 --disable-decoder=aac \
82 %ifnarch %{ix86} %{x8664}
88 --enable-runtime-cpudetect
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/rc.d/init.d,/var/lib/airvideo}
95 install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name}
96 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
98 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}
100 /path.ffmpeg/ s;=.*;= %{_sbindir}/%{name};
101 /path.mp4creator/ s;=.*;= %{_bindir}/mp4creator;
102 /path.faac/ s;=.*;= %{_bindir}/faac;
103 ' %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties
106 rm -rf $RPM_BUILD_ROOT
109 /sbin/chkconfig --add %{name}
110 %service %{name} restart
113 if [ "$1" = "0" ]; then
114 %service -q %{name} stop
115 /sbin/chkconfig --del %{name}
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_sbindir}/airvideo
121 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties
122 %attr(754,root,root) /etc/rc.d/init.d/%{name}
123 %{_javadir}/AirVideoServerLinux.jar
124 # XXX, if it really writes something, get dedicated user
125 %dir %attr(755,nobody,nobody) /var/lib/airvideo