aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-08 16:42:13 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-12 22:29:41 +0200
commita3ac89871102bb2697e2b38a637826d33f80add9 (patch)
tree453c2713bc931b9ba26538867309e31924122e0a
parent06efb215c18a0f7225f636c953f7d6bced24eee8 (diff)
downloadrpm-setup-a3ac89871102bb2697e2b38a637826d33f80add9.tar
rpm-setup-a3ac89871102bb2697e2b38a637826d33f80add9.tar.gz
rpm-setup-a3ac89871102bb2697e2b38a637826d33f80add9.tar.bz2
rpm-setup-a3ac89871102bb2697e2b38a637826d33f80add9.tar.xz
rpm-setup-a3ac89871102bb2697e2b38a637826d33f80add9.zip
convert "perlapi" deps to internal generator
-rw-r--r--Makefile.am4
-rw-r--r--NEWS1
-rwxr-xr-xfind-provides.in17
-rwxr-xr-xfind-requires.in16
-rw-r--r--perlapi.attr3
-rwxr-xr-xperlapi.prov14
-rwxr-xr-xperlapi.req15
-rw-r--r--perlapi_base.attr3
8 files changed, 40 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index 9fb85d5..c5231a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,8 @@ pkg_scripts = \
magic.prov \
magic.req \
kmod.prov \
+ perlapi.prov \
+ perlapi.req \
perl_base.req \
perl.prov \
perl.req \
@@ -49,6 +51,8 @@ pkg_gscripts = \
pkg_scripts_in = $(pkg_gscripts:=.in)
pkg_attr_defs = \
+ perlapi_base.attr \
+ perlapi.attr \
perl_base.attr
php.attr
diff --git a/NEWS b/NEWS
index e7eb3c0..1150e53 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- convert "perlapi" deps to internal generator
- convert perl-base deps to internal generator
- convert PHP deps to internal generator
- drop gstreamer/haskell/ruby/typelib deps generators
diff --git a/find-provides.in b/find-provides.in
index b03c952..4402573 100755
--- a/find-provides.in
+++ b/find-provides.in
@@ -9,23 +9,6 @@ filelist=`sed "s/['\"]/\\\&/g"`
export LC_ALL=C
#
-# --- If libperl.so is found in buildroot, we provide perlapi-<version>
-if [ -n "`echo $filelist | grep -e '/CORE/libperl\.so'`" ]; then
- for i in $filelist; do
- if [ -n "`echo $i | grep -e '/CORE/libperl\.so\$'`" ]; then
- perlpath=$i
- version=${i/CORE*/}
- version=$(echo $version| sed -e 's!/$!!' -e 's!/[^/]*$!!' -e 's!.*/!!')
- minor=$(echo $version| sed -e 's!^.*\.!!')
- major=$(echo $version| sed -e 's!\.[0-9]*$!!')
- if [ -n "$version" ] && [ -n "$minor" ]; then
- for i in $(seq 0 $minor); do echo "perlapi-$major.$i"; done
- fi
- fi
- done
-fi
-
-#
# --- Kernel modules.
[ -x @RPMVENDORDIR@/kmod.prov ] &&
echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/kmod.prov | sort -u \
diff --git a/find-requires.in b/find-requires.in
index 377389b..5f3335f 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -40,22 +40,6 @@ fi
#
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-#
-# --- If libperl.so exists and if XS modules are found, depend on perlapi-<version> and libperl.so
-if [ -n "$perllist" ]; then
- if perl -V:useshrplib | grep -q true ; then
- if echo $perllist | grep -q `perl -MConfig -e 'print $Config{archname}'` ; then
- version=`perl -MConfig -e 'print $Config{version}'`
- echo perlapi-$version
-
- f=`perl -MConfig -e 'print $Config{archlib}'`/CORE/libperl.so
- lib64=`if file -L $f 2>/dev/null | \
- grep "ELF 64-bit" >/dev/null; then echo "()$mark64"; fi`
- echo libperl.so$lib64
- fi
- fi
-fi
-
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
diff --git a/perlapi.attr b/perlapi.attr
new file mode 100644
index 0000000..34fe519
--- /dev/null
+++ b/perlapi.attr
@@ -0,0 +1,3 @@
+# --- If libperl.so exists and if XS modules are found, depend on perlapi-<version> and libperl.so
+%__perlapi_requires %{_rpmconfigdir}/mageia/perlapi.req
+%__perlapi_magic Perl script|Perl5 module source
diff --git a/perlapi.prov b/perlapi.prov
new file mode 100755
index 0000000..a82d1b9
--- /dev/null
+++ b/perlapi.prov
@@ -0,0 +1,14 @@
+#!/bin/sh
+# --- If libperl.so is found in buildroot, we provide perlapi-<version>
+while read instfile ; do
+ perlpath=$instfile
+ version=${instfile/CORE*/}
+ version=$(echo $version| sed -e 's!/$!!' -e 's!/[^/]*$!!' -e 's!.*/!!')
+ minor=$(echo $version| sed -e 's!^.*\.!!')
+ major=$(echo $version| sed -e 's!\.[0-9]*$!!')
+ if [ -n "$version" ] && [ -n "$minor" ]; then
+ for i in $(seq 0 $minor); do echo "perlapi-$major.$i"; done
+ fi
+done
+
+
diff --git a/perlapi.req b/perlapi.req
new file mode 100755
index 0000000..507f74b
--- /dev/null
+++ b/perlapi.req
@@ -0,0 +1,15 @@
+#!/bin/sh
+# --- If libperl.so exists and if XS modules are found, depend on perlapi-<version> and libperl.so
+while read instfile ; do
+ if perl -V:useshrplib | grep -q true ; then
+ if echo $instfile | grep -q `perl -MConfig -e 'print $Config{archname}'` ; then
+ version=`perl -MConfig -e 'print $Config{version}'`
+ echo perlapi-$version
+
+ f=`perl -MConfig -e 'print $Config{archlib}'`/CORE/libperl.so
+ lib64=`if file -L $f 2>/dev/null | \
+ grep "ELF 64-bit" >/dev/null; then echo "()(64bit)"; fi`
+ echo libperl.so$lib64
+ fi
+ fi
+done
diff --git a/perlapi_base.attr b/perlapi_base.attr
new file mode 100644
index 0000000..de7fd62
--- /dev/null
+++ b/perlapi_base.attr
@@ -0,0 +1,3 @@
+# --- If libperl.so is found in buildroot, we provide perlapi-<version>
+%__perlapi_base_provides %{_rpmconfigdir}/mageia/perlapi.prov
+%__perlapi_base_path /CORE/libperl\.so