%define name libdca
%define version 0.0.5
%define release 4%{?_dist_release}

Summary: DTS Coherent Acoustics decoder library
Name: %{name}
Version: %{version}
Release: %{release}
Source: http://download.videolan.org/pub/videolan/libdca/0.0.5/%{name}-%{version}.tar.bz2
Patch0: libdca-0.0.5-relsymlinks.patch
URL: http://www.videolan.org/developers/libdca.html
License: GPLv2+
Group: System Environment/Libraries

#Requires: 
BuildRequires: automake, libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
libdca is a free library for decoding DTS Coherent Acoustics streams. It is
released under the terms of the GPL license. The DTS Coherent Acoustics
standard is used in a variety of applications, including DVD, DTS audio CD and
radio broadcasting.

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig

%description devel
Development files for %{name}.

Install %{name}-devel if you wish to develop or compile
applications that use %{name}.

%package tools
Summary: Various tools for use with %{name}
Group: Applications/Multimedia

%description tools
Various tools that use %{name}.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q
%patch0 -p1 -b .relsymlinks

%build
%configure
%{__make} %{?_smp_mflags} OPT_CFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,0755)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/*.so.*

%files tools
%defattr(-,root,root,0755)
%{_bindir}/*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%doc TODO doc/%{name}.txt
%{_libdir}/pkgconfig/libd??.pc
%{_includedir}/d??.h
%{_libdir}/%{name}.so
%{_libdir}/libd??.a
%exclude %{_libdir}/libd??.la

%changelog
* Sat Mar 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.5-4
- change release to sync with self-build-libdca

* Tue May 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.0.5-3
- change release to sync with self-build-libdca

* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.0.5-2
- spec in utf8
- remove *.la

* Sun May 18 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.0.5-1
- apply new versioning policy

* Sat Mar 1 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.0.5-0vl1
- initial build for Vine Linux 4.2

### end of file