Summary:       FreeBoB firewire audio driver library
Summary(ja):   FreeBoB firewire オーディオドライバライブラリ
Name:          libfreebob
Version:       1.0.11
Release:       5%{?_dist_release}
License:       GPLv2+
Group:         System Environment/Libraries
URL:           http://freebob.sourceforge.net

Vendor:        Project Vine
Distribution:  Vine Linux

Source0:       http://surfnet.dl.sourceforge.net/sourceforge/freebob/libfreebob-%{version}.tar.gz
Patch0:	       libfreebob-1.0.11-gcc-4.5.patch
Patch1:	       libfreebob-1.0.11-includes.patch
Patch2:	       libfreebob-1.0.11-usleep.patch

BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libavc1394-devel >= 0.5.3
BuildRequires: libiec61883-devel >= 1.1.0
BuildRequires: libraw1394-devel >= 1.2.1
BuildRequires: alsa-lib-devel
BuildRequires: libxml2-devel
BuildRequires: autoconf

%description
libfreebob implements a userland driver for BeBoB-based fireware audio
devices.

%package devel
Summary: Libraries, includes etc to develop with libfreebob
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig

%description devel
Libraries, includes etc to develop with libfreebob.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Tweak libiec61883 build requirements.
perl -pi -e 's/1.1.0/1.0.0/' configure

%build
%configure --disable-static
make %{?_smp_mflags} 

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

%files devel
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/libfreebob.pc
%{_includedir}/*

%changelog
* Sat Jul  2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.11-5
- rebuilt with new toolchain.

* Sun Jul 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.11-4
- rebuild with VineSeed environment
- add Patch2 (libfreebob-1.0.11-usleep.patch)

* Sat Oct 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.11-3
- rebuild with libraw1394-2.1.0
- add Patch0 (libfreebob-1.0.11-gcc-4.5.patch) from alt

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.11-2
- rebuild with rpm-4.8.1 for pkg-config file

* Tue Apr 27 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.11-1
- updated to 1.0.11
- built with new toolchain
- added Patch1 from Fedora
  * Thu Mar  5 2009 Caolán McNamara <caolanm@redhat.com> - 1.0.11-5
  - fix up includes for gcc44

* Wed Oct 29 2008 Seiichirou Babasaki - 1.0.7-2
- Version 1.0.7 for VineLinux-4.2 (Frpm VineSeed)
- replase libraw1394-devel -> libraw1394_121-devel

* Thu Jul 10 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.7-1
- initial build for Vine Linux

* Thu Feb 28 2008 Anthony Green <green@redhat.com> 1.0.7-4
- Add another gcc 4.3 patch.

* Thu Feb 28 2008 Anthony Green <green@redhat.com> 1.0.7-3
- Add another gcc 4.3 patch.

* Thu Feb 28 2008 Anthony Green <green@redhat.com> 1.0.7-2
- Add another gcc 4.3 patch.

* Thu Feb 28 2008 Anthony Green <green@redhat.com> 1.0.7-1
- Upgrade to 1.0.7.

* Thu Feb 28 2008 Anthony Green <green@redhat.com> 1.0.3-4
- Add another gcc 4.3 patch.

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.3-3
- Autorebuild for GCC 4.3

* Thu Jan 03 2008 Anthony Green <green@redhat.com> 1.0.3-2
- Add cstdlib patch for gcc 4.3.

* Thu Mar 15 2007 Anthony Green <green@redhat.com> 1.0.3-1
- Upgrade sources to 1.0.3.

* Sat Oct 21 2006 Anthony Green <green@redhat.com> 1.0.0-3
- Remove %%doc line from devel package.
- Remove trailing '.' from devel package summary.

* Wed Oct 11 2006 Anthony Green <green@redhat.com> 1.0.0-2
- Use upstream tarball release, not svn 1.0 release.
- Tweak %%files.
- Tweak libiec61883 build requirements in configure script.
- Don't generate configure script and remove some autotools dependencies.

* Sat Sep  9 2006 Anthony Green <green@redhat.com> 1.0-1
- Created.