Name: libmediascan Version: 0.1 Release: 1%{?dist} Summary: C library for scanning audio/video/image file metadata License: LGPL+ # https://github.com/Logitech/slimserver-vendor/blob/public/7.8/CPAN/libmediascan-0.1.tar.gz?raw=true 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 BuildRequires: libjpeg-devel libpng-devel giflib-devel libexif-devel BuildRequires: ffmpeg-devel libtool automake autoconf BuildRequires: perl(ExtUtils::MakeMaker) 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} 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} 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 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 autoreconf -ivf %build CFLAGS="$RPM_OPT_FLAGS -I/usr/include/ffmpeg" %configure --disable-static make %{?_smp_mflags} pushd bindings/perl %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" \ --with-lms-includes=../../include --with-lms-libs=../../src/.libs \ --with-ffmpeg-includes=/usr/include/ffmpeg make %{?_smp_mflags} popd %install make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' pushd bindings/perl make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc COPYING README %{_libdir}/*.so.* %files devel %{_includedir}/* %{_libdir}/*.so %files -n perl-Media-Scan %{perl_vendorarch}/auto/Media %{perl_vendorarch}/Media %{_mandir}/man3/Media* %changelog * Fri Aug 08 2014 Hans de Goede - 0.1-1 - Initial rpmfusion package