]> git.pld-linux.org Git - packages/airvideo.git/blob - airvideo.spec
61d13e7acb89faa5f622fbc53ad9b6b2298fb884
[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.8
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:        test.properties
21 URL:            http://www.inmethod.com/air-video/
22 BuildRequires:  faad2-devel
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
28 Requires:       faac
29 Requires:       jpackage-utils
30 Requires(post,preun):   /sbin/chkconfig
31 Requires:       mpeg4ip-server
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
51 %prep
52 %setup -qc
53 mv ffmpeg/* .; rmdir ffmpeg
54
55 %build
56 # notes:
57 # - it's not autoconf configure
58 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
59
60 ./configure \
61         --arch=%{_target_base_arch} \
62         --prefix=%{_prefix} \
63         --libdir=%{_libdir} \
64         --shlibdir=%{_libdir} \
65         --mandir=%{_mandir} \
66         --cc="%{__cc}" \
67         --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
68         --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
69         --disable-debug \
70         --disable-optimizations \
71         --disable-stripping \
72         --enable-pthreads \
73         --disable-shared \
74         --enable-static \
75         --enable-gpl \
76         --enable-libx264 \
77         --enable-libmp3lame \
78         --enable-libfaad \
79         --disable-decoder=aac \
80         --disable-indevs \
81         --disable-outdevs \
82         --disable-vaapi \
83 %ifnarch %{ix86} %{x8664}
84         --disable-mmx \
85 %endif
86 %ifarch i386 i486
87         --disable-mmx \
88 %endif
89         --enable-runtime-cpudetect
90
91 %{__make}
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/rc.d/init.d,/var/lib/airvideo}
96 install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name}
97 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
98
99 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}
100 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post
106 /sbin/chkconfig --add %{name}
107 %service %{name} restart
108
109 %preun
110 if [ "$1" = "0" ]; then
111         %service -q %{name} stop
112         /sbin/chkconfig --del %{name}
113 fi
114
115 %files
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_sbindir}/airvideo
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.properties
119 %attr(754,root,root) /etc/rc.d/init.d/%{name}
120 %{_javadir}/AirVideoServerLinux.jar
121 # XXX, if it really writes something, get dedicated user
122 %dir %attr(755,nobody,nobody) /var/lib/airvideo
This page took 0.052347 seconds and 2 git commands to generate.