File shine.spec of Package shine-2.0

Name:           shine
Version:        2.0.0
Release:        0
Summary:        Fixed-point mp3 encoder
Source0:        http://downloads.sourceforge.net/project/savonet/%{name}/%{version}/%{name}-%{version}.tar.gz
License:        GPL-2.0
Group:          System/Libraries
Url:            http://savonet.sourceforge.net/
BuildRequires:  ocaml
BuildRequires:  ocaml-ocamldoc
BuildRequires:  ocaml-compiler-libs-devel
BuildRequires:  ocaml-camlp4-devel
BuildRequires:  ocaml-findlib
BuildRequires:  pkg-config

%description
Shine is a library for encoding mp3 data which is implemented in fixed-point arithmetic.
The library can thus be used to implement super fast mp3 encoding on architectures without a FPU,
such as `armel`, etc.. In fact, it is also super fast on architectures with a FPU!

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

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.


%prep
%setup -q

%build
#./configure --libdir=%{_libdir} --bindir=%{_bindir} --includedir=%{_includedir} 
%{configure}
make all %{?_smp_mflags}

%install
rm -rf %{buildroot}
export DESTDIR=%{buildroot}
export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml
export DLLDIR=$OCAMLFIND_DESTDIR/stublibs
mkdir -p $OCAMLFIND_DESTDIR/stublibs
mkdir -p $OCAMLFIND_DESTDIR/%{modname}
make install

%files
%defattr(-,root,root)
%doc COPYING
%{_bindir}/shineenc
%{_libdir}/libshine.so
%{_libdir}/libshine.so.*

%files devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.la
%{_libdir}/*.a