]> git.pld-linux.org Git - packages/airvideo.git/blob - airvideo.spec
3d9bf80346bb923b3e189b1fef9298caba3c4f60
[packages/airvideo.git] / airvideo.spec
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
10 Release:        0.4
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
33 Requires:       mpeg4ip
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 \
82 %ifnarch %{ix86} %{x8664}
83         --disable-mmx \
84 %endif
85 %ifarch i386 i486
86         --disable-mmx \
87 %endif
88         --enable-runtime-cpudetect
89
90 %{__make}
91
92 %install
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}
97
98 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}
99 sed -e '
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
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post
109 /sbin/chkconfig --add %{name}
110 %service %{name} restart
111
112 %preun
113 if [ "$1" = "0" ]; then
114         %service -q %{name} stop
115         /sbin/chkconfig --del %{name}
116 fi
117
118 %files
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
This page took 0.178435 seconds and 3 git commands to generate.