%define major_ver 1.20
%define ver %{major_ver}.0
%define rel 1

Summary:	A mixer library for MATE desktop
Name:		libmatemixer
Version:	%{ver}
Release:	%{rel}%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/%{major_ver}/%{name}-%{version}.tar.xz
License:	LGPLv2.1
Group:		System Environment/Libraries 
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	glib2-devel
BuildRequires:	pulseaudio-libs-devel
BuildRequires:	alsa-lib-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(posttrans,postun):	glib2
Requires(post,postun):	gtk2

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi, iwaim


%description
It provides an abstract API allowing access to mixer functionality available
in the PulseAudio, ALSA and OSS sound systems.


%package	devel
Summary:        Development tools for libmatemixer
Summary(ja):    libmatemixer の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
libmatemixer.


%package        docs
Summary:        Documentation for libmatemixer
Summary(ja):    libmatemixer 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description    docs
This package contains documentation for libmatemixer.


%prep
%setup -q


%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--disable-static \
	--enable-pulseaudio \
	--enable-alsa \
	--disable-oss
	
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

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

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_libdir}/%{name}.so.*
%{_libdir}/%{name}/libmatemixer-alsa.so
%{_libdir}/%{name}/libmatemixer-null.so
%{_libdir}/%{name}/libmatemixer-pulse.so

%files devel
%defattr(-,root,root,-)
%{_includedir}/mate-mixer/%{name}
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%files docs
%defattr(-,root,root,-)
%{_datadir}/gtk-doc/html/%{name}


%changelog
* Wed Mar 28 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.20.0-1
- update to 1.20.0

* Sun Apr  2 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.0-1
- update to 1.18.0

* Sat Nov 26 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.0-1
- new upstream release
- fix License
- fix Summary and description
- add Packager

* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.0-1
- new upstream release

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- initial build

