Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   recursively adding files/folders in %files (http://www.linux-archive.org/fedora-packaging/664760-recursively-adding-files-folders-files.html)

Kamal Ahmed 05-09-2012 02:51 PM

recursively adding files/folders in %files
 
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.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Jochen Schmitt 05-09-2012 03:04 PM

recursively adding files/folders in %files
 
-----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



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAk+qh3AACgkQZLAIBz9lVu/qJwQAuQDTr0/wrIjIXPFqtqb0wlzZ
MhDssggFkuna1vsVIv5bvDGL5dISRKtBHWCBYd7KFKA0P6/VNl1sOcyXGaIWGBjY
vN6fzZgI6sukSgAat0ptW5G+GoSp8s5+8rfbKRcQmFN7B6M+d+ qkj6fFOqnUObvj
fp7ZlGJgq+g5Nq4dmNg=
=W8Fs
-----END PGP SIGNATURE-----

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Rex Dieter 05-09-2012 03:05 PM

recursively adding files/folders in %files
 
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 mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging


All times are GMT. The time now is 04:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.