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