aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--NEWS1
-rwxr-xr-xfind-requires.in18
-rw-r--r--perl_base.attr3
-rw-r--r--perl_base.req18
5 files changed, 30 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index c9ae590..aba0c4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,7 @@ pkg_scripts = \
magic.prov \
magic.req \
kmod.prov \
+ perl_base.req \
perl.prov \
perl.req \
perl.req-from-meta \
@@ -50,6 +51,9 @@ pkg_gscripts = \
pkg_scripts_in = $(pkg_gscripts:=.in)
+pkg_attr_defs = \
+ perl_base.attr
+
BUILT_SOURCES = macros-perarch make_arch_macrosfiles.sh rpmgenplatform
foobar_pkglibdir = @RPMVENDORDIR@
@@ -78,6 +82,7 @@ foobar_pkglib_SCRIPTS = \
EXTRA_DIST = \
$(pkg_data_in) \
$(pkg_sysconf_macros_in) \
+ $(pkg_attr_defs) \
$(pkg_scripts) \
$(pkg_scripts_in) \
macros-perarch.in make_arch_macrosfiles.sh.in \
@@ -124,6 +129,9 @@ endif
for i in $(pkg_sysconf_macros); do \
$(install_sh_DATA) $${i} $(DESTDIR)$(RPMSYSCONFDIR)/macros.d/$${i}; \
done
+ for i in $(pkg_attr_defs); do \
+ $(install_sh_DATA) $${i} $(DESTDIR)$(RPMLIBDIR)/fileattrs/$${i}; \
+ done
if RPMPLATFORM
for i in $(pkg_gconfig); do \
$(install_sh_DATA) $${i} $(DESTDIR)$(RPMSYSCONFDIR)/$${i}; \
diff --git a/NEWS b/NEWS
index 8634817..956dd03 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- convert perl-base deps to internal generator
- use internal dependency generator instead of "external generator"
(like all other distros) which is way much faster :-)
See:
diff --git a/find-requires.in b/find-requires.in
index bc69f0c..ab365a5 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -100,24 +100,6 @@ if [ "$needed" -eq 0 ]; then
fi
#
-# --- Perl or python deps
-perlepoch=`rpm -q --qf '%|EPOCH?{[%{EPOCH}]:}|' perl-base`
-if [ $? != 0 ]; then
- unset perlepoch
-fi
-
-tmpdeplist=
-for f in $filelist; do
- dep="`echo $f | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p"`"
- if [[ -n $dep && -z `echo $uniqdeplist $tmpdeplist|grep "$dep"` ]]; then
- tmpdeplist+="$dep\n"
- fi
-done
-echo -n -e $tmpdeplist | sort -u
-uniqdeplist+="$tmpdeplist"
-
-
-#
# --- Script interpreters.
for f in $scriptlist; do
[ -r $f -a -x $f ] || continue
diff --git a/perl_base.attr b/perl_base.attr
new file mode 100644
index 0000000..36f697d
--- /dev/null
+++ b/perl_base.attr
@@ -0,0 +1,3 @@
+# Requires on perl-base
+%__perl_base_requires %{_rpmconfigdir}/mageia/perl_base.req
+%__perl_base_path /usr/lib/perl5/(vendor_perl/|site_perl/|)([.0-9]{1,}).*$
diff --git a/perl_base.req b/perl_base.req
new file mode 100644
index 0000000..eb95024
--- /dev/null
+++ b/perl_base.req
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Requires on perl-base
+
+perlepoch=`rpm -q --qf '%|EPOCH?{[%{EPOCH}]:}|' perl-base`
+if [ $? != 0 ]; then
+ unset perlepoch
+fi
+
+tmpdeplist=
+
+while read instfile ; do
+ dep="`echo $instfile | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p"`"
+ if [[ -n $dep && -z `echo $uniqdeplist $tmpdeplist|grep "$dep"` ]]; then
+ tmpdeplist+="$dep\n"
+ fi
+done
+
+echo -n -e $tmpdeplist | sort -u