# # 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/ # %global perl_only 1 Name: perl-Media-Scan Version: 0.1 Release: 24.52 %if %{perl_only} Summary: Perl bindings for %{name} %else ! %{perl_only} Summary: C library for scanning audio/video/image file metadata %endif 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-devel BuildRequires: libexif-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtool BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Warn) %if %{perl_only} BuildRequires: libmediascan-devel Requires: %{name}%{?_isa} = %{version}-%{release} # FIXME: Use %requires_eq macro instead Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Perl bindings for libmediascan %else ! %{perl_only} %package -n libmediascan0 Summary: C library for scanning audio/video/image file metadata Group: System/Libraries %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}. %endif %prep %setup -q -n libmediascan-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 %patch5 #%patch6 #%patch8 autoreconf -fiv %build %configure --disable-static --with-bdb=/usr %if %{perl_only} pushd bindings/perl perl Makefile.PL --with-ffmpeg-includes=/usr/include/ffmpeg INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} popd %else ! %{perl_only} make %{?_smp_mflags} %endif %install %if %{perl_only} pushd bindings/perl %perl_make_install %perl_process_packlist %perl_gen_filelist popd ln -sf bindings/perl/perl-Media-Scan.files %else ! %{perl_only} make DESTDIR=%{buildroot} install %{?_smp_mflags} find %{buildroot} -type f -name "*.la" -delete -print %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n libmediascan0 %defattr(-,root,root) %doc COPYING README %{_libdir}/*.so.* %files devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so #%{_libdir}/*.la %endif %if %{perl_only} %files -f perl-Media-Scan.files %defattr(-,root,root) #%{_mandir}/man3/Media* %endif %changelog