1Name:		libao
2Version:	0.8.6
3Release:	1
4Summary:	Cross-Platform Audio Output Library
5
6Group:		System Environment/Libraries
7License:	GPL
8URL:		http://www.xiph.org/
9Vendor:		Xiph.org Foundation <team@xiph.org>
10Source:		http://www.xiph.org/ao/src/%{name}-%{version}.tar.gz
11BuildRoot:	%{_tmppath}/%{name}-%{version}-root
12
13# glibc-devel is needed for oss plug-in build
14BuildRequires:  glibc-devel
15%{!?_without_esd:BuildRequires: esound-devel >= 0.2.8}
16%{!?_without_arts:BuildRequires: arts-devel}
17%{?_with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0}
18# FIXME: perl is needed for the dirty configure flag trick, which should be
19# solved differently
20BuildRequires:  perl
21
22%description
23Libao is a cross-platform audio output library.  It currently supports
24ESD, aRts, ALSA, OSS, *BSD and Solaris.
25
26This package provides plug-ins for OSS, ESD, aRts, and ALSA (0.9).  You will
27need to install the supporting libraries for any plug-ins you want to use
28in order for them to work.
29
30Available rpmbuild rebuild options :
31--with : alsa
32--without : esd arts
33
34%package devel
35Summary: Cross Platform Audio Output Library Development
36Group: Development/Libraries
37Requires: libao = %{version}
38
39%description devel
40The libao-devel package contains the header files, libraries and
41documentation needed to develop applications with libao.
42
43%prep
44%setup -q -n %{name}-%{version}
45
46perl -p -i -e "s/-O20/$RPM_OPT_FLAGS/" configure
47perl -p -i -e "s/-ffast-math//" configure
48
49%build
50
51%configure \
52    --disable-nas \
53    --disable-alsa \
54    %{?_with_alsa:--enable-alsa09} %{!?_with_alsa:--disable-alsa09} \
55    %{?_without_esd:--disable-esd} \
56    %{?_without_arts:--disable-arts}
57
58make
59
60%install
61[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
62
63#FIXME: makeinstall breaks the plugin install location; they end up in /usr/lib
64make DESTDIR=$RPM_BUILD_ROOT install
65
66%clean
67[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
68
69%post -p /sbin/ldconfig
70
71%postun
72if [ "$1" -ge "1" ]; then
73  /sbin/ldconfig
74fi
75
76%files
77%defattr(-,root,root)
78%doc AUTHORS CHANGES COPYING README
79%{_libdir}/libao.so.*
80%{_libdir}/ao/*/liboss.so
81%{!?_without_esd:%{_libdir}/ao/*/libesd.so}
82%{!?_without_arts:%{_libdir}/ao/*/libarts.so}
83%{?_with_alsa:%{_libdir}/ao/*/libalsa09.so}
84%{_mandir}/man5/*
85
86%files devel
87%defattr(-,root,root)
88%doc doc/*
89%{_includedir}/ao
90%{_libdir}/libao.so
91%{_libdir}/libao.la
92%{_libdir}/ao/*/liboss.la
93%{!?_without_esd:%{_libdir}/ao/*/libesd.la}
94%{!?_without_arts:%{_libdir}/ao/*/libarts.la}
95%{?_with_alsa:%{_libdir}/ao/*/libalsa09.la}
96%{_datadir}/aclocal/ao.m4
97%{_libdir}/pkgconfig/ao.pc
98
99%changelog
100* Mon Mar 25 2004 Gary Peck <gbpeck@sbcglobal.net> 0.8.5-3
101- Set default user and permissions on the devel package
102
103* Mon Mar 22 2004 Gary Peck <gbpeck@sbcglobal.net> 0.8.5-2
104- Update source URL
105- Add support for "--with alsa", "--without esd" and "--without arts"
106- Make configure more explicit on what plugins to enable
107
108* Fri Mar 11 2004 Stan Seibert <volsung@xiph.org> 0.8.5-1
109- Version bump
110
111* Fri Oct 5 2003 Stan Seibert <volsung@xiph.org> 0.8.4-1
112- Remove alsa libraries from RPM since RedHat doesn't ship with ALSA
113  ALSA users will need to recompile from source.
114- Add ao.pc to -devel
115- Make the devel libraries .la instead of .a
116
117* Fri Jul 19 2002 Michael Smith <msmith@xiph.org> 0.8.3-2
118- re-disable static libraries (they do not work - at all)
119
120* Sun Jul 14 2002 Thomas Vander Stichele <thomas@apestaart.org> 0.8.3-1
121- new release for vorbis 1.0
122- small cleanups
123- added better BuildRequires
124- added alsa-lib-devel 0.9.0 buildrequires
125- added static libraries to -devel
126- added info about plug-ins to description
127- listed plug-in so files explicitly to ensure package build fails when one
128  is missing
129
130* Mon Jan  7 2002 Peter Jones <pjones@redhat.com> 0.8.2-4
131- minor cleanups, even closer to RH .spec
132- arts-devel needs a build dependancy to be sure the
133  plugin will get built
134
135* Wed Jan  2 2002 Peter Jones <pjones@redhat.com> 0.8.2-3
136- fix libao.so's provide
137
138* Wed Jan  2 2002 Peter Jones <pjones@redhat.com> 0.8.2-2
139- merge RH and Xiphophorous packages
140
141* Tue Dec 18 2001 Jack Moffitt <jack@xiph.org>
142- Update for 0.8.2 release.
143
144* Sun Oct 07 2001 Jack Moffitt <jack@xiph.org>
145- supports configurable prefixes
146
147* Sun Oct 07 2001 Stan Seibert <indigo@aztec.asu.edu>
148- devel packages look for correct documentation files
149- added ao/plugin.h include file to devel package
150- updated package description
151
152* Sun Sep 03 2000 Jack Moffitt <jack@icecast.org>
153- initial spec file created
154