View Full Version : subpackage %install section?
14th March 2012, 05:57 PM
I'm wanting to separate out the gui that is an option for an application I'm compiling.
I know that for the subpackage, I need the extra %package name, %summary, %description, and %files section, but do I also make a separate %install section as well to install the binary?
14th March 2012, 06:03 PM
No, you don't need a separate %install section for the sub-package as that should have already been done in the main %install section. Just don't duplicate any of the files in the two %files sections, one for the main package and one for the sub-package.
14th March 2012, 06:05 PM
Ok, cool. That's what I was thinking.
14th March 2012, 06:20 PM
You can learn a lot by looking at the spec files for other Fedora packages. Pick a package that you know has one or more sub-packages (e.g. *-libs, *-devel, *-common) and use something like,
"yumdownloader --source ncurses" to pull down the src.rpm package.
Then, "rpm -ivh ncurses-5.9-2.20110716.fc16.src.rpm"
Then you can examine the spec file.
14th March 2012, 06:27 PM
Awesome. Thanks for the tip!
14th March 2012, 06:29 PM
Or.. just get the spec file directly from the git repo (http://pkgs.fedoraproject.org/gitweb/?p=ncurses.git;a=blob;f=ncurses.spec;h=21451a70a32 837c782b42c97756ecb27b6637699;hb=51ec5b54fd2897117 49808d4facaf84e269567a1)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.