]>
Commit | Line | Data |
---|---|---|
246fbce2 ER |
1 | # NOTE |
2 | # - setup guide: | |
3 | # http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux | |
4 | # - clarify source files license and remove nosource | |
5 | ||
6 | %include /usr/lib/rpm/macros.java | |
7 | Summary: Air-Video Video Streaming Server | |
8 | Name: airvideo | |
9 | Version: 2.2.5 | |
029fd6c4 | 10 | Release: 0.8 |
246fbce2 ER |
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 | |
15 | NoSource: 0 | |
16 | Source1: %{name}.init | |
17 | Source2: http://inmethod.com/air-video/download/linux/alpha1/AirVideoServerLinux.jar | |
18 | # NoSource2-md5: 312d6dd45f6c9928e1570da67a6d8ee6 | |
19 | NoSource: 2 | |
20 | Source3: http://inmethod.com/air-video/download/linux/alpha1/test.properties | |
21 | # NoSource3-md5: 7bc6524cf7f8c2ec2cfac900bc6325cd | |
22 | NoSource: 3 | |
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 | |
30 | Requires: faac | |
31 | Requires: jpackage-utils | |
32 | Requires(post,preun): /sbin/chkconfig | |
029fd6c4 | 33 | Requires: mpeg4ip-server |
246fbce2 ER |
34 | Requires: rc-scripts |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %define _noautoreqdep libGL.so.1 libGLU.so.1 | |
38 | ||
39 | %define specflags -fno-strict-aliasing | |
40 | ||
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 | |
47 | ||
48 | %description | |
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 | |
51 | to watch them. | |
52 | ||
53 | %prep | |
54 | %setup -qc | |
55 | mv ffmpeg/* .; rmdir ffmpeg | |
56 | ||
57 | %build | |
58 | # notes: | |
59 | # - it's not autoconf configure | |
60 | # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags | |
61 | ||
62 | ./configure \ | |
63 | --arch=%{_target_base_arch} \ | |
64 | --prefix=%{_prefix} \ | |
65 | --libdir=%{_libdir} \ | |
66 | --shlibdir=%{_libdir} \ | |
67 | --mandir=%{_mandir} \ | |
68 | --cc="%{__cc}" \ | |
69 | --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \ | |
70 | --extra-ldflags="%{rpmcflags} %{rpmldflags}" \ | |
71 | --disable-debug \ | |
72 | --disable-optimizations \ | |
73 | --disable-stripping \ | |
74 | --enable-pthreads \ | |
75 | --disable-shared \ | |
76 | --enable-static \ | |
77 | --enable-gpl \ | |
78 | --enable-libx264 \ | |
79 | --enable-libmp3lame \ | |
80 | --enable-libfaad \ | |
81 | --disable-decoder=aac \ | |
2780439a ER |
82 | --disable-indevs \ |
83 | --disable-outdevs \ | |
029fd6c4 | 84 | --disable-vaapi \ |
246fbce2 ER |
85 | %ifnarch %{ix86} %{x8664} |
86 | --disable-mmx \ | |
87 | %endif | |
88 | %ifarch i386 i486 | |
89 | --disable-mmx \ | |
90 | %endif | |
91 | --enable-runtime-cpudetect | |
92 | ||
93 | %{__make} | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
1ea1c37c | 97 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/rc.d/init.d,/var/lib/airvideo} |
246fbce2 ER |
98 | install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name} |
99 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
100 | ||
101 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_javadir} | |
102 | sed -e ' | |
103 | /path.ffmpeg/ s;=.*;= %{_sbindir}/%{name}; | |
104 | /path.mp4creator/ s;=.*;= %{_bindir}/mp4creator; | |
105 | /path.faac/ s;=.*;= %{_bindir}/faac; | |
106 | ' %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post | |
112 | /sbin/chkconfig --add %{name} | |
113 | %service %{name} restart | |
114 | ||
115 | %preun | |
116 | if [ "$1" = "0" ]; then | |
117 | %service -q %{name} stop | |
118 | /sbin/chkconfig --del %{name} | |
119 | fi | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %attr(755,root,root) %{_sbindir}/airvideo | |
124 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties | |
125 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
126 | %{_javadir}/AirVideoServerLinux.jar | |
1ea1c37c ER |
127 | # XXX, if it really writes something, get dedicated user |
128 | %dir %attr(755,nobody,nobody) /var/lib/airvideo |