Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-26-2010, 04:39 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2010
Posts: 14
Rep:
|
Question on rpm for ffmpeg
I have a rpm to install ffmpeg on linux, but I don't quite understand how it works. Please help me. Here is the spec for rpm:
Code:
Summary: Custom FFmpeg RPM
Name:ffmpeg
Version: 1.1.0
Release: 1
License: GPL
Group: Development/Tools
Source: ffmpeg-1.1.0.tar.gz
BuildRoot: %{_builddir}/%{name}-root
%description
Custom FFMPEG RPM.
%prep
%setup -c -q
%build
%install
cp -a ./ $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/lib/libfaac.so.0
/usr/lib/libmp3lame.so.0
/usr/lib/libfaad.so.0
/usr/lib/libxvidcore.so.4
/usr/lib/libxvidcore.so.4.1
/usr/bin/ffmpeg
/usr/lib/libvorbisenc.so.2
/usr/lib/libogg.so.0
/usr/lib/libvorbis.so.0
%doc
The questions are:
1. What is and how to set the value of _builddir?
2. What is and how to set the value of $RPM_BUILD_ROOT?
3. This rpm is supposed to be built in BuildRoot, what is the value of BuildRoot?
4. How does it copy binary of ffmpeg to /usr/bin and libraries to /usr/lib?
5. What is the meaning of /usr/lib/libfaac.so.0... under %defattr(-,root,root)? Are they libraries to be built or already exist and to be linked?
Thanks.
Last edited by yzhang738@hotmail.com; 11-26-2010 at 06:50 PM.
|
|
|
|
11-27-2010, 12:50 PM
|
#2
|
|
Moderator
Registered: May 2001
Posts: 24,827
|
Quote:
Originally Posted by yzhang738@hotmail.com
I have a rpm to install ffmpeg on linux, but I don't quite understand how it works.
|
If you don't then you are probably better off installing the standard software. In addition no answer will make you understand things the way you could by reading your distributions package building documentation, http://wiki.centos.org/PackageManagement/Rpm, http://fedoraproject.org/wiki/Docs/D...gPackagesGuide, http://www.rpm.org/wiki/Docs#PackagerDocumentation, rpm5.org/docs/rpm-guide.pdf and rpm5.org/docs/max-rpm.pdf.
Quote:
Originally Posted by yzhang738@hotmail.com
What is and how to set the value of _builddir?
|
%_builddir as set in your ~/.rpmmacros or package.spec file and shown by 'rpmbuild --showrc' (also see "%%dump").
Quote:
Originally Posted by yzhang738@hotmail.com
What is and how to set the value of $RPM_BUILD_ROOT?
|
%BuildRoot.
Quote:
Originally Posted by yzhang738@hotmail.com
This rpm is supposed to be built in BuildRoot, what is the value of BuildRoot?
|
That depends on what "%{_builddir}" expands to. One good reason to NOT build packages as root account user.
Quote:
Originally Posted by yzhang738@hotmail.com
How does it copy binary of ffmpeg to /usr/bin and libraries to /usr/lib?
|
See the %install section. This package simply runs 'cp -a ./ $RPM_BUILD_ROOT' (while ffmpeg comes with a 'make' script that has an "install" target).
Quote:
Originally Posted by yzhang738@hotmail.com
What is the meaning of /usr/lib/libfaac.so.0... under %defattr(-,root,root)? Are they libraries to be built or already exist and to be linked?
|
The %files section lists files (to be) installed that belong to this package. This .specs %files section lists libraries that on a sane system belong to several other packages, meaning problems with dependency resolution, updating, de-installation, RPMDB corruption and whatnot may all be yours for free if you install this package. (Saying the person who wrote this spec file needs to read a few docs is an understatement.)
|
|
|
|
12-03-2010, 11:55 PM
|
#3
|
|
LQ Newbie
Registered: Oct 2010
Posts: 14
Original Poster
Rep:
|
My qustion is: how to create rpm for ffmpeg that builds other libraries too. For example, we need to build libfaac, libxvidcore, libx264, libogg, libvorbis and etc. How to build these libraries along with ffmpeg because ffmpeg need them to run?
|
|
|
|
12-04-2010, 03:06 AM
|
#4
|
|
LQ Newbie
Registered: Oct 2010
Posts: 14
Original Poster
Rep:
|
If x264, lame, ogg, ... are installed through separate rpm, how in rpm to install ffmpeg know if they are installed already?
|
|
|
|
12-04-2010, 04:23 AM
|
#5
|
|
Moderator
Registered: May 2001
Posts: 24,827
|
Quote:
Originally Posted by yzhang738@hotmail.com
If x264, lame, ogg, ... are installed through separate rpm, how in rpm to install ffmpeg know if they are installed already?
|
By the %requires tag. BTW did you read any of the docs I linked to?
|
|
|
|
12-04-2010, 03:28 PM
|
#6
|
|
LQ Newbie
Registered: Oct 2010
Posts: 14
Original Poster
Rep:
|
Yes, I have read the pdf file about rpm that is the best I've seen. Many thanks unSpawn. My understanding is that separate rpm to install x264, ogg, vorbis, ... should be created and put to ffmpeg.spec as:
Code:
%require x264-.rpm
%require ogg-.rpm
...
So ffmpeg rpm is dependent on other rpms, right?
My question is:
1. If x264-.rpm is not installed, can it detect in ffmpeg rpm?
2. In order to install ffmpeg.rpm, other rpms must be installed separately. Is it possible to create a single rpm to install everything?
3. Can multiple rpms be installed at same time, eg rpm -i x264-rpm ogg-rpm...?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:41 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|