PDA

View Full Version : ffmpegthumbnailer


ultra magnus
10th April 2010, 07:42 PM
I am trying to package ffmpegthumbnailer, which is supposedly faster than mplayerthumbs for creating video thumbnails in dolphin:

Name: ffmpegthumbnailer
Version: 2.0.0
Release: 1%{?dist}
Summary: Lightweight video thumbnailer that can be used by file managers

Group: Applications/Multimedia
License: GPLv2
URL: http://code.google.com/p/ffmpegthumbnailer/
Source0: http://ffmpegthumbnailer.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: ffmpeg-devel, libpng-devel
Requires: ffmpeg, libpng

%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }

%description
This video thumbnailer can be used to create thumbnails for your video files.

%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT



%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
%{_bindir}/ffmpegthumbnailer
%{_includedir}/libffmpegthumbnailer/*
%{_libdir}/libffmpegthumbnailer.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz


%changelog
* Sat Apr 10 2010 Magnus Tuominen <magnus.tuominen@gmail.com> 2.0.0-1
- initial build

It fails with

ERROR 0001: file '/usr/bin/ffmpegthumbnailer' contains a standard rpath '/usr/lib64' in [/usr/lib64]
error: Bad exit status from /var/tmp/rpm-tmp.0FBqxj (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.0FBqxj (%install)


why do I always run into these rpath thingys.. :rolleyes:
If you have any ideas on how to proceed, I'd appreciate the input.

PabloTwo
10th April 2010, 10:37 PM
You are adding a directory owned by the program (%{_includedir}/libffmepthumnailer) without declaring that directory in the %files section. Add the line shown in red.
%files
%defattr(-,root,root,-)
%doc
%{_bindir}/ffmpegthumbnailer
%{_includedir}/libffmpegthumbnailer/*
%{_libdir}/libffmpegthumbnailer.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz
%dir %{_includedir}libffmepthumbnailer
I'm not quite sure why the error message is complaining about /usr/lib64. If you still get that error, you might try:

%{_bindir}/*
%{_libdir}/*

ultra magnus
11th April 2010, 06:39 AM
Thanks, tried this, but it gives me the same error. Made some changes

Name: ffmpegthumbnailer
Version: 2.0.0
Release: 1%{?dist}
Summary: Lightweight video thumbnailer that can be used by file managers

Group: Applications/Multimedia
License: GPLv2
URL: http://code.google.com/p/ffmpegthumbnailer/
Source0: http://ffmpegthumbnailer.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: ffmpeg-devel, libpng-devel, chrpath
Requires: ffmpeg, libpng

%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }

%description
This video thumbnailer can be used to create thumbnails for your video files.

%prep
%setup -q


%build
%configure
./configure --prefix=/usr
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
%{_bindir}/ffmpegthumbnailer
%dir %{_includedir}/libffmpegthumbnailer
%{_includedir}/libffmpegthumbnailer/*
%{_libdir}/libffmpegthumbnailer.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz


%changelog
* Sat Apr 10 2010 Magnus Tuominen <magnus.tuominen@gmail.com> 2.0.0-1
- initial build


error:

File not found by glob: /home/magnus/rpmbuild/BUILDROOT/ffmpegthumbnailer-2.0.0-1.fc12.x86_64/usr/lib64/libffmpegthumbnailer.*

I think it is looking in the wrong place, /usr/lib64 instead of /usr/lib. I am on a fedora 12 x86_64

---------- Post added at 09:39 PM CDT ---------- Previous post was at 08:05 PM CDT ----------

This works

Name: ffmpegthumbnailer
Version: 2.0.0
Release: 1%{?dist}
Summary: Lightweight video thumbnailer that can be used by file managers

Group: Applications/Multimedia
License: GPLv2
URL: http://code.google.com/p/ffmpegthumbnailer/
Source0: http://ffmpegthumbnailer.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: ffmpeg-devel, libpng-devel
Requires: %{name} = %{version}-%{release}


%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }

%description
This video thumbnailer can be used to create thumbnails for your video files.

%package devel
Summary: Headers and libraries for building apps that use ffmpegthumbnailer
Group: Development/Libraries
Requires: ffmpeg-devel, libpng-devel

%description devel
This video thumbnailer can be used to create thumbnails for your video files,
development package.

%prep
%setup -q


%build
%configure

./configure --prefix=/usr --libdir=%{_libdir}
chmod -x README INSTALL COPYING AUTHORS
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
%{_bindir}/ffmpegthumbnailer
%dir %{_includedir}/libffmpegthumbnailer
%{_libdir}/*.so.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz

%files devel
%defattr(-,root,root,-)
%doc README INSTALL COPYING AUTHORS
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/pkgconfig/lib%{name}.pc
%{_includedir}/libffmpegthumbnailer/*.h
%changelog
* Sat Apr 10 2010 Magnus Tuominen <magnus.tuominen@gmail.com> 2.0.0-1
- initial build
- has to be built with "QA_RPATHS=$[0x0001|0x0010 ]" for now


If built with QA_RPATHS=$[0x0001|0x0010 ] rpmbuilld -ba ffmpegthumbnailer.spec

which isn't pretty, I think the Makefile or the configure file needs patching.

PabloTwo
11th April 2010, 07:38 AM
I would have never figured out the QA_RPATHS=$[0x0001|0x0010 ] thing.

There should be no reason to add the line: ./configure --prefix=/usr --libdir=%{_libdir}

The %configure macro takes care of that and much more. Do: "rpm --eval %configure"

Glad you got it sorted out.

ultra magnus
11th April 2010, 07:45 AM
Actually, if I don't specify --libdir=%{_libdir}, it puts them in /usr/lib as opposed to /usr/lib64 .. so then it won't the files it is looking for, but then on the other hand the rpath issue is gone then..

---------- Post added at 10:45 PM CDT ---------- Previous post was at 10:42 PM CDT ----------

edit: actually, you're right, I just checked, rpath issue remains. I have been trying som many diffrent ways to build this I get lost..

leigh123linux
11th April 2010, 08:33 AM
Try


Name: ffmpegthumbnailer
Version: 2.0.0
Release: 2%{?dist}
Summary: Lightweight video thumbnailer that can be used by file managers

Group: Applications/Multimedia
License: GPLv2
URL: http://code.google.com/p/ffmpegthumbnailer/
Source0: http://ffmpegthumbnailer.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: chrpath
BuildRequires: ffmpeg-devel, libpng-devel, libjpeg-devel


%description
This video thumbnailer can be used to create thumbnails for your video files.

%package devel
Summary: Headers and libraries for building apps that use ffmpegthumbnailer
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This video thumbnailer can be used to create thumbnails for your video files,
development package.

%prep
%setup -q


%build
%configure --disable-static \
--enable-png \
--enable-jpeg
chmod -x README INSTALL COPYING AUTHORS
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/ffmpegthumbnailer
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
%{_bindir}/ffmpegthumbnailer
%dir %{_includedir}/libffmpegthumbnailer
%{_libdir}/*.so.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz

%files devel
%defattr(-,root,root,-)
%doc README INSTALL COPYING AUTHORS
%{_libdir}/*.so
%{_libdir}/pkgconfig/lib%{name}.pc
%{_includedir}/libffmpegthumbnailer/*.h

%changelog
* Sun Apr 11 2010 leigh scott <leigh123linux@googlemail.com> 2.0.0-2
- fix rpath
- enable jpeg and png support
- clean up spec file
- remove static libs as they aren't needed

* Sat Apr 10 2010 Magnus Tuominen <magnus.tuominen@gmail.com> 2.0.0-1
- initial build
- has to be built with "QA_RPATHS=$[0x0001|0x0010 ]" for now

ultra magnus
11th April 2010, 08:41 AM
Hey, thanks leigh! Worked wonders!

leigh123linux
11th April 2010, 08:47 AM
Hey, thanks leigh! Worked wonders!


I have made some more changes.




Name: ffmpegthumbnailer
Version: 2.0.0
Release: 2%{?dist}
Summary: Lightweight video thumbnailer that can be used by file managers

Group: Applications/Multimedia
License: GPLv2
URL: http://code.google.com/p/ffmpegthumbnailer/
Source0: http://ffmpegthumbnailer.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: chrpath
BuildRequires: ffmpeg-devel, libpng-devel, libjpeg-devel


%description
This video thumbnailer can be used to create thumbnails for your video files.

%package devel
Summary: Headers and libraries for building apps that use ffmpegthumbnailer
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This video thumbnailer can be used to create thumbnails for your video files,
development package.

%prep
%setup -q


%build
%configure --disable-static \
--enable-png \
--enable-jpeg
chmod -x README INSTALL COPYING AUTHORS
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/ffmpegthumbnailer
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README INSTALL COPYING AUTHORS
%{_bindir}/ffmpegthumbnailer
%dir %{_includedir}/libffmpegthumbnailer
%{_libdir}/*.so.*
%{_mandir}/man1/ffmpegthumbnailer.1.gz

%files devel
%defattr(-,root,root,-)
%doc README INSTALL COPYING AUTHORS
%{_libdir}/*.so
%{_libdir}/pkgconfig/lib%{name}.pc
%{_includedir}/libffmpegthumbnailer/*.h

%changelog
* Sun Apr 11 2010 leigh scott <leigh123linux@googlemail.com> 2.0.0-2
- fix rpath
- enable jpeg and png support
- clean up spec file
- remove static libs as they aren't needed
- add docs

* Sat Apr 10 2010 Magnus Tuominen <magnus.tuominen@gmail.com> 2.0.0-1
- initial build
- has to be built with "QA_RPATHS=$[0x0001|0x0010 ]" for now

ultra magnus
11th April 2010, 08:51 AM
I'll make those changes, thank you. You wouldn't happen to know how to get this into rpmfusion, would you?

leigh123linux
11th April 2010, 08:57 AM
I'll make those changes, thank you. You wouldn't happen to know how to get this into rpmfusion, would you?

Try here

http://rpmfusion.org/Contributors

ultra magnus
11th April 2010, 10:44 AM
Bug submitted to rpmfusion.

leigh123linux
13th April 2010, 05:08 AM
Bug submitted to rpmfusion.

Are you sponsored ? , if not , tell Rex ( he may sponsor you if needed )

ultra magnus
13th April 2010, 12:28 PM
rdieter is doing the review on both ffmpegthumbnailer and kffmpegthumbnailer, I will request CVS access later tonight for ffmpegthumbnailer at least. I want to check that the patch does what it should do first.

ultra magnus
24th April 2010, 07:40 PM
11 days later, ffmpegthumbnailer has hit rpmfusion. I love how this works. :)

PabloTwo
24th April 2010, 11:53 PM
11 days later, ffmpegthumbnailer has hit rpmfusion. I love how this works. :)
Nice going. I had built my own rpm package using Leighs spec file. It does work nicely. Haven't figured out how to get Thunar to automatically use it yet, but then, the only time I ever really use Thunar is to browse icon files.
BASH:~/-> rpm -q ffmpegthumbnailer
ffmpegthumbnailer-2.0.0-2.fc12.i686