Linux - SoftwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
%_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.)
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?
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...?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.