File libmediascan.spec of Package libmediascan
#
# spec file for package libmediascan
#
# Copyright (c) 2015 SUSE LINUX 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/
#
Name: libmediascan0
Version: 0.1
Release: 0
Summary: C library for scanning audio/video/image file metadata
Group: System/Libraries
License: GPL-3.0
# https://github.com/Logitech/slimserver-vendor/blob/public/7.8/CPAN/libmediascan-0.1.tar.gz?raw=true
URL: https://github.com/Logitech/slimserver-vendor/
Source0: libmediascan-0.1.tar.gz
Patch0: libmediascan-0.1-new-ffmpeg.patch
Patch1: libmediascan-0.1-noinstheaders.patch
Patch2: libmediascan-0.1-fix-missing-prototypes.patch
Patch3: libmediascan-0.1-fix-some-warnings.patch
Patch4: libmediascan-0.1-database.c.patch
Patch5: libmediascan-0.1-disable_gif.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fake_ffmpeg-devel
#Patch6: libmediascan-0.1-audio.c.patch
#Patch8: libmediascan-0.1-result.c.patch
BuildRequires: giflib-devel
BuildRequires: libdb-4_8-devel
BuildRequires: libexif-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Warn)
%description
C library for scanning audio/video/image file metadata, mainly intended
for use with squeezeboxserver.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n perl-Media-Scan
Summary: Perl bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
# FIXME: Use %requires_eq macro instead
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description -n perl-Media-Scan
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n libmediascan-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4
%patch5
#%patch6
#%patch8
autoreconf -fiv
%build
%configure --disable-static
make %{?_smp_mflags}
pushd bindings/perl
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" --with-lms-includes=../../include
make %{?_smp_mflags}
popd
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
pushd bindings/perl
%perl_make_install
%perl_process_packlist
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING README
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
#%{_libdir}/*.la
%files -n perl-Media-Scan
%defattr(-,root,root)
%{perl_vendorarch}/auto/Media
%{perl_vendorarch}/Media
%{_mandir}/man3/Media*
%changelog