Hey guys, I'm guessing that packaging a library must be a somewhat different process than packaging other software (because a library and a devel package must be produced), but I am not clear on what those differences are. I.e, what special information does the SPEC file require? Are the rpmbuild commands any different?
I'd be glad to be pointed to the correct documentation. There didn't seem to be a section covering this in the Fedora RPM guide.
On Mon, 2012-05-07 at 09:36 -0800, Christopher Howard wrote:
Hey guys, I'm guessing that packaging a library must be a somewhat different process than packaging other software (because a library and a devel package must be produced), but I am not clear on what those differences are. I.e, what special information does the SPEC file require? Are the rpmbuild commands any different?
I'd be glad to be pointed to the correct documentation. There didn't seem to be a section covering this in the Fedora RPM guide.
Hi Christopher,
The process is mostly the same. The only difference is that you need to create a devel subpackage and ensure that you place the files in the correct places and packages/subpackages. Here's a little more that you need to do[1]. You could reference any of the library packages already in Fedora to see how it is done if you want.
[1] http://fedoraproject.org/wiki/Packaging:Guidelines#Shared_Libraries
On Mon, 07 May 2012 09:36:25 -0800, CH (Christopher) wrote:
Hey guys, I'm guessing that packaging a library must be a somewhat different process than packaging other software (because a library and a devel package must be produced), but I am not clear on what those differences are. I.e, what special information does the SPEC file require?
Just definition of at least one subpackage, the -devel subpackage.
Are the rpmbuild commands any different?
No.
I'd be glad to be pointed to the correct documentation. There didn't seem to be a section covering this in the Fedora RPM guide.
There's a lot:
https://fedoraproject.org/wiki/How_to_create_an_RPM_package https://fedoraproject.org/wiki/Packaging:Guidelines#Devel_Packages https://fedoraproject.org/wiki/PackageMaintainers
Is there a way to add all files recursively in the %files macro ? I tried :
%dir %{python_sitelib}/%{name} but that just adds the target directory in the rpm.
in my %install macro, i have:
mkdir -p -m 755 %{buildroot}/%{python_sitelib}/%{name} python -m compileall pcore/ cp -r pcore/*.pyc %{buildroot}/%{python_sitelib}/%{name}
Thanks, -Kamal.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 09.05.2012 16:51, Kamal Ahmed wrote:
Is there a way to add all files recursively in the %files macro ? I tried :
%dir %{python_sitelib}/%{name} but that just adds the target directory in the rpm.
in my %install macro, i have:
mkdir -p -m 755 %{buildroot}/%{python_sitelib}/%{name} python -m compileall pcore/ cp -r pcore/*.pyc %{buildroot}/%{python_sitelib}/%{name}
You can just add
%{python_sitelib}/%{name}/
into the %files stanza. It's imporant, that the line ands with a backslash. This indicates, that all files and directories will be recursively add to the package.
Best Regards:
JOchen Schmitt
On Wed, 09 May 2012 17:04:28 +0200, JS (Jochen) wrote:
On 09.05.2012 16:51, Kamal Ahmed wrote:
Is there a way to add all files recursively in the %files macro ? I tried :
%dir %{python_sitelib}/%{name} but that just adds the target directory in the rpm.
in my %install macro, i have:
mkdir -p -m 755 %{buildroot}/%{python_sitelib}/%{name} python -m compileall pcore/ cp -r pcore/*.pyc %{buildroot}/%{python_sitelib}/%{name}
You can just add
%{python_sitelib}/%{name}/
into the %files stanza. It's imporant, that the line ands with a backslash. This indicates, that all files and directories will be recursively add to the package.
It is _not_ important, and it is not a "backslash" but a "trailing slash".
Adding the trailing slash is just highly recommended since it increases readability of the spec file. One can easily see whether it's the path to a directory or a single file.
On 05/09/2012 09:51 AM, Kamal Ahmed wrote:
Is there a way to add all files recursively in the %files macro ? I tried :
%dir %{python_sitelib}/%{name} but that just adds the target directory in the rpm.
using just: %{python_sitelib}/%{name}/ will include the dir and everything under it (notice the lack of %dir)
-- rex
packaging@lists.fedoraproject.org