File vo-amrwbenc.spec of Package vo-amrwbenc

%define realname vo-amrwbenc
%define srcext   tar.bz2

%define so_ver   0

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          lib%{realname}%{?so_ver}
Version:       0.1.3
Release:       %{?extraver:0.}1%{?rhel:.el%{rhel}}%{?fedora:.fc%{fedora}}
License:       Apache-2.0
Group:         Productivity/Multimedia/Sound/Editors and Convertors
URL:           http://sourceforge.net/projects/opencore-amr/
Summary:       VisualOn AMR-WB encoder library

# Install-time parameters
Provides:      %{realname}

# Build-time parameters
BuildRequires: autoconf automake libtool
BuildRequires: gcc-c++ pkgconfig
BuildRoot:     %{_tmppath}/%{name}-root
#Source:        http://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/%{realname}-%{realver}%{?extraver}.%{srcext}
Source:        %{realname}-%{version}%{?extraver}.%{srcext}

%description
This library contains an encoder implementation of the Adaptive Multi
Rate Wideband (AMR-WB) audio codec. The library is based on a codec
implementation by VisualOn as part of the Stagefright framework from
the Google Android project.

%package -n lib%{realname}-devel
Group:         Development/Languages/C and C++
Summary:       Development files for %{name}
Requires:      %{name} = %{version}
Provides:      %{name}-devel %{realname}-devel

%description -n lib%{realname}-devel
Development files for %{name}

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
test -x configure || autoreconf --force --install

%build
%configure \
 --disable-static \
 CFLAGS="%{optflags}" \
 CXXFLAGS="%{optflags}" \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all"
%{__make} %{?_smp_mflags}

%install
%{__make} install DESTDIR=%{buildroot}

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING NOTICE README
%{_libdir}/lib%{realname}.so.%{?so_ver}*

# Development stuff
%files -n lib%{realname}-devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/*.pc
%dir %{_includedir}/%{realname}
%{_includedir}/%{realname}/enc_if.h
%{_libdir}/*.so
%exclude %{_libdir}/*.la

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by