File libsmf.spec of Package libsmf

%define name		libsmf
%define libname		%{name}0

Name:		%{name}
Version:	1.3
Release:	1
Summary:	Library for handling SMF ("*.mid") files
Group:		System/Libraries
License:	BSD-2-Clause
Source:		%{name}-1.3.tar.xz
URL:		http://sourceforge.net/projects/libsmf/files/libsmf/
#-----------------------------------
BuildRequires: glib2-devel
BuildRequires: readline-devel
#-----------------------------------
BuildRoot:	%{_tmppath}/%{name}-buildroot


%description
LibSMF is a BSD-licensed C library for handling SMF ("*.mid") files.
It transparently handles conversions between time and pulses, tempo
map handling etc. The only dependencies are C compiler and glib. Full
API documentation and examples are included.

%package -n %{libname}
Summary:	Library for handling SMF ("*.mid") files
Group:		System/Libraries

%description -n %{libname}
LibSMF is a BSD-licensed C library for handling SMF ("*.mid") files.
It transparently handles conversions between time and pulses, tempo
map handling etc. The only dependencies are C compiler and glib. Full
API documentation and examples are included.

This package holds the shared library files.

%package devel
Summary:	Development headers for %{name}
Group:		Development/Libraries
Provides:	%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}

%description devel
Files needed when developing with LibSMF.

%prep
%setup -q

%build
%configure --disable-static
%{__make}

%install
%makeinstall

rm -rf %{buildroot}/%{_libdir}/*.la

%clean
rm -rf %{buildroot}

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

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

%files -n %{libname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

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

%changelog