]> git.pld-linux.org Git - packages/airvideo.git/blob - airvideo.spec
f9e50968f0e4c9e4c9da33c67629f75761fe91be
[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.4.5
10 Release:        0.11
11 License:        GPL v2+ with LGPL v2+ parts
12 Group:          Applications/Multimedia
13 Source0:        http://inmethod.com/air-video/download/ffmpeg-for-%{version}-beta6.tar.bz2
14 # NoSource0-md5:        241844e9d41bbd9f8852955291490910
15 NoSource:       0
16 Source1:        %{name}.init
17 Source2:        http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar#/avs-alpha6.jar
18 # NoSource2-md5:        b619c088eea230afa92181393a36e1c0
19 NoSource:       2
20 Source3:        test.properties
21 Source4:        avs.avahi
22 URL:            http://www.inmethod.com/air-video/
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(post,preun):   /sbin/chkconfig
29 Requires:       faac
30 Requires:       jpackage-utils
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 %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
61 %prep
62 %setup -qc
63 mv ffmpeg/{*,.??*} .; rmdir ffmpeg
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 \
88         --disable-decoder=aac \
89         --disable-indevs \
90         --disable-outdevs \
91         --disable-vaapi \
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
104 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_javadir},/etc/{rc.d/init.d,avahi/services},/var/lib/airvideo}
105 install -p ffmpeg $RPM_BUILD_ROOT%{_sbindir}/%{name}
106 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
107
108 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_javadir}/AirVideoServerLinux.jar
109 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.properties
110 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/%{name}.service
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
131 # XXX, if it really writes something, get dedicated user
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
This page took 0.042147 seconds and 3 git commands to generate.