I am particularly interested to know :
1. How to determine if a particular package can have a -devel version?
2. How to know what %files to be included in the devel section?
A package will have a -devel if it provides a library that other packages will want to use in their builds. It's just like when you build normal packages you use BuildRequires to locate the -devel packages required by the build.
For example: libpng3 provides a library which takes care of handling png images. Any developer who wants to handle png images can use code provided in libpng rather than writing their own routines. To do so the developer will install libpng-devel which will install the necessary development files to enable the code to call libpng3 to be included in the build.
The files to include in the devel package are the files needed for other applications to include the library code in their build. These include (but are not limited to):
header (.h) files (usually found in %{_includedir})
linker libraries (.so) files (usually found in %{_libdir} or a subdirectory of)
pkgconfig (.pc) files (usually found in %{_libdir}/pkgconfig)
any documentation specifically aimed at developers
You need to be very careful which files you put in the runtime package and which you put in the -devel package. Getting it wrong can result in lots of -devel packages being pulled in as dependencies when users install your package. See
http://www.pclinuxos.com/forum/index.php/topic,101266.msg905539.html#msg905539 section on devel dependencies.
Also you should
avoid packaging any .la files if they are produced during the build otherwise it can lead to problems like
this.
Terry.