Packaging talk:AutoProvidesAndRequiresFiltering
From FedoraProject
(Difference between revisions)
(Created page with 'Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install.') |
(Suggestion for EPEL-related change) |
||
| Line 1: | Line 1: | ||
Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install. | Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install. | ||
| + | |||
| + | The instructions provided for EPEL don't work, at least for EPEL5. Something like this (from Marcela Maslanova) would be better: | ||
| + | |||
| + | <pre># Filter unwanted Requires: | ||
| + | cat << \EOF > %{name}-req | ||
| + | #!/bin/sh | ||
| + | %{__perl_requires} $* |\ | ||
| + | sed -e '/perl(the)$/d' | ||
| + | EOF | ||
| + | |||
| + | %define __perl_requires %{_builddir}/perl-ldap-%{version}/%{name}-req | ||
| + | chmod +x %{__perl_requires}</pre> | ||
| + | --[[User:Verdurin|Verdurin]] 10:09, 18 March 2011 (UTC) | ||
Revision as of 10:09, 18 March 2011
Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install.
The instructions provided for EPEL don't work, at least for EPEL5. Something like this (from Marcela Maslanova) would be better:
# Filter unwanted Requires:
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(the)$/d'
EOF
%define __perl_requires %{_builddir}/perl-ldap-%{version}/%{name}-req
chmod +x %{__perl_requires}
--Verdurin 10:09, 18 March 2011 (UTC)