1# option to compile without XMMS plugin
2%if %{?without_xmms:1}%{!?without_xmms:0}
3 %define _without_xmms --without-xmms
4%else
5 %define _with_xmms --with-xmms
6%endif
7# this has been taken from http://www.hyperborea.org/software/dillo/dillo.spec
8#################################################################################
9# Identify which distribution we're building on.
10# This will determine any changes in menu structure or release number (i.e. .mdk)
11# Eventually, need to make this configurable from the rpmbuild command line.
12
13%define freedesktop %(if [ -e /usr/share/applications ]; then echo 1; else echo 0; fi;)
14%define conectiva %(if [ -e /etc/conectiva-release ]; then echo 1; else echo 0; fi;)
15%define mdk  %(if [ -e /etc/mandrake-release ]; then echo 1; else echo 0; fi;)
16%define suse %(if [ -e /etc/SuSE-release ]; then echo 1; else echo 0; fi;)
17%define oldsuse 0
18%if %{suse}
19	%define oldsuse %(if [ `grep VERSION /etc/SuSE-release | sed -e "s/VERSION = //"` \\< 8.0 ]; then echo 1; else echo 0; fi;)
20%endif
21
22%define oldredhat %(if [ -e /etc/redhat-release ]; then echo 1; else echo 0; fi;) && !%{mdk} && !%{suse} && !%{conectiva} && !%{freedesktop}
23%define plain !%{mdk} && !%{suse} && !%{conectiva} && !%{oldredhat} && !%{freedesktop}
24
25Summary:    C library and frontend for decoding MPEG2/4 AAC
26Name:       faad2
27Version:    @VERSION@
28Release:    1
29License:    GPL
30Group:      Applications/Multimedia
31Source0:    http://download.sourceforge.net/faad/%{name}-%{version}.tar.gz
32#Patch:                faad2-%{version}.patch
33BuildRequires: autoconf, automake, libtool, gcc-c++
34
35%if %{?_with_xmms:1}%{!?_with_xmms:0}
36BuildRequires: xmms-devel
37%endif
38
39URL:        http://www.audiocoding.com/
40#################################################################################
41%if %{?_with_xmms:1}%{!?_with_xmms:0}
42# GTK Dependencies
43%if %{mdk}
44BuildRequires: libgtk+-devel >= 1.2.0
45%endif
46%if %{suse}
47BuildRequires: gtk-devel >= 1.2.0
48%endif
49%if !%{suse} && !%{mdk}
50BuildRequires: gtk+-devel >= 1.2.0
51%endif
52%endif
53
54BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root
55Packager:   a.kurpiers@nt.tu-darmstadt.de
56
57%description
58FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely
59written from scratch. FAAD 2 is licensed under the GPL.
60
61Includes libmp4ff, a Quicktime library for UNIX in a freely redistributable,
62statically linkable library.
63
64%package devel
65Summary: Development libraries the FAAD 2 AAC decoder.
66Group: Development/Libraries
67Requires: %{name}
68
69%description devel
70Header files and development documentation for libfaad.
71
72%if %{?_with_xmms:1}%{!?_with_xmms:0}
73%package xmms
74Group: Applications/Multimedia
75Summary: AAC and MP4 input plugin for xmms
76Requires: %{name}, xmms
77
78
79%description xmms
80The AAC xmms input plugin for xmms recognizes AAC files by an
81.aac extension.
82This MP4 xmms plugin reads AAC files with and without ID3 tags (version 2.x).
83AAC files are MPEG2 or MPEG4 files that can be found in MPEG4 audio files
84(.mp4). MPEG4 files with AAC inside can be read by RealPlayer or Quicktime.
85%endif
86
87%prep
88#%setup -n %{name}
89%setup -n %{name}-%{version}
90#%patch -p0
91
92%build
93#sh bootstrap
94./configure --with-drm %{?_with_xmms} %{?_without_xmms} --prefix=/usr
95make
96
97%install
98rm -rf %{buildroot}
99# Hack to work around a problem with DESTDIR in libtool 1.4.x
100LIBRARY_PATH="%{buildroot}/usr/lib:${LIBRARY_PATH}" make install DESTDIR=%{buildroot}
101# install libmp4ff
102install -m 755 common/mp4ff/libmp4ff.a %{buildroot}%{_libdir}
103install common/mp4ff/mp4ff.h %{buildroot}%{_includedir}
104
105%post -p /sbin/ldconfig
106
107%postun -p /sbin/ldconfig
108
109%clean
110rm -rf %{buildroot}
111
112%files
113%defattr(-, root, root)
114%doc AUTHORS COPYING ChangeLog NEWS README TODO
115%{_bindir}/*
116%{_libdir}/libfaad.so*
117
118%files devel
119%defattr(-, root, root)
120%{_libdir}/libfaad.a
121%{_libdir}/libfaad.la
122%{_includedir}/faad.h
123%{_includedir}/neaacdec.h
124%{_includedir}/mp4ff.h
125%{_libdir}/libmp4ff.a
126
127%if %{?_with_xmms:1}%{!?_with_xmms:0}
128%files xmms
129%defattr(-,root,root)
130%doc plugins/xmms/README
131%_libdir/xmms/Input/*
132%endif
133
134%changelog
135* Tue Jan 24 2006 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
136- fix wrong function declaration in mp4ffint.h
137
138* Wed Nov 15 2005 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
139- fix requirements for xmms plugin
140- add libmp4ff to devel package (only static library)
141
142* Sat Aug 13 2005 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
143- fix dependencies for xmms plugin. libmp4v2/id3lib no longer needed
144
145* Sun Apr 24 2005 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
146- make xmms plugin generation optional. Build with '--define "without_xmms 1"'
147
148* Tue Nov 02 2004 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
149- remove libmp4ff and libmp4v2 from RPM
150- changes for new version of faad2
151
152* Sat Apr 17 2004 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
153- apply fix to make DRM support work
154- use "platform-independant" dependencies (taken from dillo.spec)
155
156* Fri Feb 06 2004 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
157- remove seperate libmp4ff target
158
159* Wed Nov 05 2003 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
160- include xmms plugins/libmp4v2/libmp4ff into RPM
161
162* Tue Aug 12 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
163- Update to 2.0rc1.
164- Introduced LD_LIBRARY_PATH workaround.
165- Removed optional xmms plugin build, it seems mandatory now.
166- Added gtk+ build dep for the xmms plugin.
167
168* Wed May 14 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
169- Added xmms plugin build.
170
171* Wed Apr  9 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
172- Spec file cleanup.
173- Now exclude .la file.
174- Update to latest CVS checkout to fix compile problem.
175
176
177* Fri Aug 10 2002 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
178- changes to compile v1.1 release
179
180* Tue Jun 18 2002 Alexander Kurpiers <a.kurpiers@nt.tu-darmstadt.de>
181- First RPM.
182
183