On 03/27/2012 05:56 AM, Marcos Lois Bermúdez wrote:
Hi,
I'm building some packages using CentOS 6, and i have a question that i
can't get answer for, i think that is a common task in rpm build that
will get some info that will help in automate some process.
I need to get a spec file with all macro exanded, so i can extract info
of buildrequires, etc..
If you want to know the buildrequries, you can do this to with the SRPM:
rpm -qp --requires <name>.src.rpm
You can also extract the spec file directly with the command and then do
things with sed or grep to that file:
rpm2cpio <name>.src.rpm | cpio -i *.spec
You can also see all the macro information for rpm with the command:
rpmbuild --showrc
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel