xbps-src: added a new var for templates "dkms_modules".

It will be used by packages that will install DKMS modules.
This commit is contained in:
Juan RP 2010-12-23 14:29:38 +01:00
parent 90922f9936
commit ae3c15cb59
3 changed files with 38 additions and 20 deletions

View file

@ -288,6 +288,13 @@ xbps_write_metadata_pkg_real()
<key>long_desc</key>
<string>$long_desc</string>
_EOF
#
# If package sets $dkms_modules, add dkms rundep.
#
if [ -n "$dkms_modules" ]; then
Add_dependency run dkms
fi
#
# If package sets $openrc_services, add the OpenRC rundep.
#

View file

@ -63,7 +63,7 @@ xbps_write_metadata_scripts_pkg()
# not possible to chroot(3).
#
export PATH="./bin:./sbin:./usr/bin:./usr/sbin"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
TRIGGERSDIR="./var/db/xbps/triggers"
ACTION="\$1"
@ -77,25 +77,12 @@ UPDATE="\$4"
_EOF
#
# Handle GNU Info files.
# Handle DKMS modules.
#
if [ -d "${DESTDIR}/usr/share/info" ]; then
unset info_files
for f in $(find ${DESTDIR}/usr/share/info -type f); do
j=$(echo $f|sed -e "$fpattern")
[ "$j" = "" ] && continue
[ "$j" = "/usr/share/info/dir" ] && continue
if [ -z "$info_files" ]; then
info_files="$j"
else
info_files="$info_files $j"
fi
done
if [ -n "${info_files}" ]; then
_add_trigger info-files
echo "export info_files=\"${info_files}\"" >> $tmpf
fi
fi
if [ -n "${dkms_modules}" ]; then
_add_trigger dkms
echo "export dkms_modules=\"${dkms_modules}\"" >> $tmpf
fi
#
# Handle OpenRC services.
@ -132,6 +119,27 @@ _EOF
done
fi
#
# Handle GNU Info files.
#
if [ -d "${DESTDIR}/usr/share/info" ]; then
unset info_files
for f in $(find ${DESTDIR}/usr/share/info -type f); do
j=$(echo $f|sed -e "$fpattern")
[ "$j" = "" ] && continue
[ "$j" = "/usr/share/info/dir" ] && continue
if [ -z "$info_files" ]; then
info_files="$j"
else
info_files="$info_files $j"
fi
done
if [ -n "${info_files}" ]; then
_add_trigger info-files
echo "export info_files=\"${info_files}\"" >> $tmpf
fi
fi
#
# (Un)Register a shell in /etc/shells.
#
@ -208,6 +216,9 @@ _EOF
fi
fi
# End of trigger var exports.
echo >> $tmpf
#
# Write the INSTALL/REMOVE package scripts.
#

View file

@ -75,7 +75,7 @@ reset_tmpl_vars()
noarch subpackages sourcepkg gtk_iconcache_dirs \
abi_depends api_depends triggers openrc_services \
replaces system_accounts build_wrksrc create_wrksrc \
ignore_vdeps_dir noverifyrdeps conflicts \
ignore_vdeps_dir noverifyrdeps conflicts dkms_modules \
gconf_entries gconf_schemas stow_copy stow_copy_files \
pre_remove post_remove post_stow do_build do_install \
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \