File cdio-utils.spec of Package libcdio

#
# spec file for package cdio-utils
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define cdioutils 1

Name:           cdio-utils
Version:        0.90
Release:        0
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  help2man
BuildRequires:  libcdio-devel
BuildRequires:  libtool
BuildRequires:  ncurses-devel
BuildRequires:  pkg-config
BuildRequires:  popt-devel
BuildRequires:  pkgconfig(libcddb)
BuildRequires:  pkgconfig(libvcdinfo)
%if 0%{suse_version} > 1220
BuildRequires:  makeinfo
%endif
Url:            http://savannah.gnu.org/projects/libcdio
Summary:        CD-ROM Access Library
License:        GPL-3.0+
Group:          Productivity/Multimedia/Other
# http://ftp.gnu.org/gnu/libcdio/
Source0:        libcdio-%{version}.tar.gz
Source1:        baselibs.conf
# bug437293
%ifarch ppc64
Obsoletes:      libcdio-64bit
%endif
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Provides:       libcdio-utils = %{version}
Obsoletes:      libcdio-utils < %{version}

%description
This library encapsulates CD-ROM reading and control. Applications
wanting to be oblivious to the OS and device-dependent properties of a
CD-ROM can use this library.

%prep
%setup -q -n libcdio-%{version}
%define buildir ${PWD}

%build
export VCDINFO_CFLAGS=-I%{_includedir}/libvcd
export VCDINFO_LIBS="-L%{_libdir} -lvcdinfo -L%{buildir}/lib/iso9660/.libs/ -liso9660 -L%{buildir}/lib/driver/.libs/ -lcdio"
#autoreconf -f -i
# FIXME: Required .pc files are not installed without --enable-cpp-progs.

VCDINFO_CFLAGS=-I%{_includedir}/libvcd VCDINFO_LIBS="-L%{_libdir} -lvcdinfo -L%{buildir}/lib/iso9660/.libs -liso9660 \
-L%{buildir}/lib/driver/.libs -lcdio" \
%configure \
	--disable-rpath \
	--enable-static=n \
	--enable-shared=yes \
	--with-pic \
	--disable-cxx \
	--enable-vcd-info=yes

VCDINFO_CFLAGS=-I%{_includedir}/libvcd VCDINFO_LIBS="-L%{_libdir} -lvcdinfo \
-L%{buildir}/lib/iso9660/.libs/ -liso9660 -L%{buildir}/lib/driver/.libs/ -lcdio" \
 VERBOSE=1 make -e %{?jobs:-j%jobs}
#-lcdioutils 

%install
%makeinstall
%if 1 == 0
mv $RPM_BUILD_ROOT%{_mandir}/jp $RPM_BUILD_ROOT%{_mandir}/ja
%endif
#empty depdendency libs
rm -rf %{buildroot}%{_libdir} %{buildroot}%{_includedir} %{buildroot}%{_infodir}
%fdupes -s %{buildroot}%{_mandir}

%files -n cdio-utils
%defattr (-, root, root)
%doc AUTHORS COPYING NEWS README README.libcdio THANKS TODO
#ChangeLog
%{_bindir}/cd-*
%{_bindir}/cdda-*
%{_bindir}/iso-*
%{_bindir}/mmc-*
%doc %{_mandir}/man?/*.*
%if 1 == 0
%lang(ja) %doc %{_mandir}/ja/man?/*.*
%endif

%changelog
openSUSE Build Service is sponsored by