From 5df8ebee630e9cbc6dfaea72925a7be596bd44f3 Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 5 May 1999 19:01:01 +0000 Subject: [PATCH] Add perl macros (from Artur Frysiak ) CVS patchset: 3050 CVS date: 1999/05/05 19:01:01 --- macros.in | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/macros.in b/macros.in index 97008e9..cc49c56 100644 --- a/macros.in +++ b/macros.in @@ -1,4 +1,4 @@ -# $Id: macros.in,v 1.28 1999/05/04 15:11:23 jbj Exp $ +# $Id: macros.in,v 1.29 1999/05/05 19:01:01 jbj Exp $ #============================================================================== # Macro naming conventions (preliminary): # @@ -213,3 +213,31 @@ %{-C:_mydir="`pwd`"; %{-M:%{__mkdir} -p %{-C*};} cd %{-C*};} \ CFLAGS="%{optflags}" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} %* \ %{-C:cd ${_mydir}; unset _mydir} + +#------------------------------------------------------------------------------ +# Useful perl macros (from Artur Frysiak ) +# +# For example, these can be used as (from ImageMagick.spec from PLD site) +# [...] +# BuildPrereq: perl +# [...] +# %package perl +# Summary: libraries and modules for access to ImageMagick from perl +# Group: Development/Languages/Perl +# Requires: %{name} = %{version} +# %requires_eq perl +# [...] +# %install +# rm -fr $RPM_BUILD_ROOT +# install -d $RPM_BUILD_ROOT/%{perl_sitearch} +# [...] +# %files perl +# %defattr(644,root,root,755) +# %{perl_sitearch}/Image +# %dir %{perl_sitearch}/auto/Image +# +%requires_eq() %(LC_ALL="C" rpm -q \ + --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| \ + grep -v "is not") +%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) +%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib) -- 2.7.4