]>
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 | ||
246fbce2 ER |
6 | Summary: Air-Video Video Streaming Server |
7 | Name: airvideo | |
1b0c47eb ER |
8 | Version: 2.4.5 |
9 | Release: 0.11 | |
246fbce2 ER |
10 | License: GPL v2+ with LGPL v2+ parts |
11 | Group: Applications/Multimedia | |
1b0c47eb ER |
12 | Source0: http://inmethod.com/air-video/download/ffmpeg-for-%{version}-beta6.tar.bz2 |
13 | # NoSource0-md5: 241844e9d41bbd9f8852955291490910 | |
246fbce2 ER |
14 | NoSource: 0 |
15 | Source1: %{name}.init | |
1b0c47eb ER |
16 | Source2: http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar#/avs-alpha6.jar |
17 | # NoSource2-md5: b619c088eea230afa92181393a36e1c0 | |
246fbce2 | 18 | NoSource: 2 |
fa7bf6bc | 19 | Source3: test.properties |
1b0c47eb | 20 | Source4: avs.avahi |
246fbce2 | 21 | URL: http://www.inmethod.com/air-video/ |
246fbce2 ER |
22 | BuildRequires: lame-libs-devel |
23 | BuildRequires: libx264-devel >= 0.1.3 | |
24 | BuildRequires: pkgconfig | |
25 | BuildRequires: rpm-javaprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.470 | |
1b0c47eb | 27 | Requires(post,preun): /sbin/chkconfig |
246fbce2 ER |
28 | Requires: faac |
29 | Requires: jpackage-utils | |
029fd6c4 | 30 | Requires: mpeg4ip-server |
246fbce2 ER |
31 | Requires: rc-scripts |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define _noautoreqdep libGL.so.1 libGLU.so.1 | |
35 | ||
36 | %define specflags -fno-strict-aliasing | |
37 | ||
38 | # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one) | |
39 | %define specflags_ia32 -fomit-frame-pointer | |
40 | # -mmmx is needed to enable <mmintrin.h> code. | |
41 | %define specflags_i586 -mmmx | |
42 | %define specflags_i686 -mmmx | |
43 | %define specflags_ppc -fPIC | |
44 | ||
45 | %description | |
46 | Air Video can stream videos in almost any format to your iPhone, iPad | |
47 | and iPod touch. You don't need to copy your videos to the device just | |
48 | to watch them. | |
49 | ||
1b0c47eb ER |
50 | %package avahi |
51 | Summary: airvideo service configuration for avahi | |
52 | Summary(pl.UTF-8): Konfiguracja serwisu airvideo dla avahi | |
53 | Group: Applications | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | Requires: avahi | |
56 | ||
57 | %description avahi | |
58 | airvideo service configuration for avahi. | |
59 | ||
246fbce2 ER |
60 | %prep |
61 | %setup -qc | |
1b0c47eb | 62 | mv ffmpeg/{*,.??*} .; rmdir ffmpeg |
246fbce2 ER |
63 | |
64 | %build | |
65 | # notes: | |
66 | # - it's not autoconf configure | |
67 | # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags | |
68 | ||
69 | ./configure \ | |
70 | --arch=%{_target_base_arch} \ | |
71 | --prefix=%{_prefix} \ | |
72 | --libdir=%{_libdir} \ | |
73 | --shlibdir=%{_libdir} \ | |
74 | --mandir=%{_mandir} \ | |
75 | --cc="%{__cc}" \ | |
76 | --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \ | |
77 | --extra-ldflags="%{rpmcflags} %{rpmldflags}" \ | |
78 | --disable-debug \ | |
79 | --disable-optimizations \ | |
80 | --disable-stripping \ | |
81 | --enable-pthreads \ | |
82 | --disable-shared \ | |
83 | --enable-static \ | |
84 | --enable-gpl \ | |
85 | --enable-libx264 \ | |
86 | --enable-libmp3lame \ | |
246fbce2 | 87 | --disable-decoder=aac \ |
2780439a ER |
88 | --disable-indevs \ |
89 | --disable-outdevs \ | |
029fd6c4 | 90 | --disable-vaapi \ |
246fbce2 ER |
91 | %ifnarch %{ix86} %{x8664} |
92 | --disable-mmx \ | |
93 | %endif | |
94 | %ifarch i386 i486 | |
95 | --disable-mmx \ | |
96 | %endif | |
97 | --enable-runtime-cpudetect | |
98 | ||
99 | %{__make} | |
100 | ||
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
1b0c47eb | 103 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/{rc.d/init.d,avahi/services},/var/lib/airvideo} |
246fbce2 ER |
104 | install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name} |
105 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
106 | ||
1b0c47eb | 107 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}/AirVideoServerLinux.jar |
fa7bf6bc | 108 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties |
1b0c47eb | 109 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/%{name}.service |
246fbce2 ER |
110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post | |
115 | /sbin/chkconfig --add %{name} | |
116 | %service %{name} restart | |
117 | ||
118 | %preun | |
119 | if [ "$1" = "0" ]; then | |
120 | %service -q %{name} stop | |
121 | /sbin/chkconfig --del %{name} | |
122 | fi | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_sbindir}/airvideo | |
127 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties | |
128 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
129 | %{_javadir}/AirVideoServerLinux.jar | |
1ea1c37c | 130 | # XXX, if it really writes something, get dedicated user |
1b0c47eb ER |
131 | %dir /var/lib/airvideo |
132 | ||
133 | %files avahi | |
134 | %defattr(644,root,root,755) | |
135 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/avahi/services/%{name}.service |