Summary: A CD-ROM image access library
Summary(ja): CD-ROM イメージにアクセスするためのライブラリ
Name: libmirage
Version: 3.1.0
Release: 1%{?_dist_release}
License: GPLv2+
Group: System Environment/Libraries
URL: http://cdemu.sourceforge.net
Source: http://downloads.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: cmake >= 2.8.5
BuildRequires: pkgconfig >= 0.16
BuildRequires: glib2-devel >= 2.28
BuildRequires: libsndfile-devel >= 1.0.0
BuildRequires: zlib-devel >= 1.2.0
BuildRequires: bzip2-devel >= 1.0.0
Buildrequires: xz-devel >= 5.0.0
BuildRequires: gtk-doc >= 1.4
BuildRequires: gobject-introspection-devel >= 1.30.0

Requires(post): shared-mime-info
Requires(postun): shared-mime-info

%description
This is libMirage library, a CD-ROM image access library, and part of the 
userspace-cdemu suite, a free, GPL CD/DVD-ROM device emulator for linux. It is
written in C and based on GLib.

The aim of libMirage is to provide uniform access to the data stored in 
different image formats, by creating a representation of disc stored in image 
file, which is based on GObjects.

%package devel
Summary: libmirage devel package
Summary(ja): libMirage の開発パッケージ
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This is libMirage library, a CD-ROM image access library, and part of the 
userspace-cdemu suite, a free, GPL CD/DVD-ROM device emulator for linux. It is
written in C and based on GLib.

This package contains files needed to develop with libMirage.

%prep
%setup -q

%build
%cmake .
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/libmirage*/*.{a,la}

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
/sbin/ldconfig
update-mime-database %{_datadir}/mime &> /dev/null || :

%files
%defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/libmirage.so.*
%{_libdir}/libmirage*/*.so
%{_libdir}/girepository-1.0/Mirage-*.typelib
%{_datadir}/mime/packages/*

%files devel
%defattr(-, root, root, -)
%{_libdir}/lib*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_datadir}/gir-1.0/Mirage-*.gir
%doc %{_datadir}/gtk-doc/html/*

%changelog
* Tue Jan 23 2018 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.1.0-1
- update to 3.1.0

* Sat Feb 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> - 3.0.5-1
- update to 3.0.5
- update BuildRequires

* Sun May 06 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.5.0-1
- new upstream release
- changed atchive type gzip to bzip2

* Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.4.0-1
- new upstream release

* Mon Sep 27 2010 Shu KONNO <owa@bg.wakwak.com> 1.3.0-2
- rebuilt with rpm-4.8.1 for pkg-config

* Thu Sep 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.0-1
- new upstream release

* Fri Sep 25 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0-1
- initial build for VineSeed

* Sat Jun 28 2008 Rok Mandeljc <rok.mandeljc@email.si> - 1.1.0-1
- Updated to 1.1.0

* Thu Dec 20 2007 Rok Mandeljc <rok.mandeljc@email.si> - 1.0.0-1
- Initial RPM release.