From a7ce74ff6a31348fe1443dddd7f6923c14fa27ec Mon Sep 17 00:00:00 2001 From: Benjamin Schieder Date: Thu, 23 Mar 2006 00:13:30 +0000 Subject: [PATCH] Benjamin Schieder: add a new variable ${desktopfiles} This variable can be used to specify a desktop file to install for this package or unset to not install one. This prevents forked packages from having shared packages with one another. Retains full compatibility with current system (hopefully). [2006030813163201140] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7320 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/PKG-BUILD-VARS | 2 ++ scripts/Build-Pkg | 4 ++++ scripts/functions | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/Developers/PKG-BUILD-VARS b/Documentation/Developers/PKG-BUILD-VARS index 76906183c..909299ad9 100644 --- a/Documentation/Developers/PKG-BUILD-VARS +++ b/Documentation/Developers/PKG-BUILD-VARS @@ -57,6 +57,8 @@ includedir .... where the header files should be installed autoextract ... '0' = skip automatic untar autopatch ..... '0' = skip automatic patching chownsrcdir ... '0' = don't make a chown to root after extracting the $srctar +desktopfiles .. filenames of the desktop files to install ($confdir/*.desktop) + set to an empty string to deactivate desktop file installation nocvsinsrcdir . '0' = don't remove CVS and .svn directories in $srcdir srctar ........ filename of source tar file ('auto' = autodetect) srcdir ........ directory in source tar file ('auto' = autodetect) diff --git a/scripts/Build-Pkg b/scripts/Build-Pkg index c3d40a0ec..6b1013284 100755 --- a/scripts/Build-Pkg +++ b/scripts/Build-Pkg @@ -45,6 +45,7 @@ debug=0 chroot=0 root="" id='' +desktopfiles='' stagelevel=9 this_is_the_2nd_run=0 @@ -178,6 +179,9 @@ builddir="$base/src.$xpkg.$id" # get real pkg name for mapped packages . build/$ROCKCFG_ID/ROCK/$toolsdir/lib/pkgmapper +# set desktop file name +desktopfiles="$( echo ${base}/package/*/${pkg} )/*.desktop" + export ROCK_PKG=$pkg export ROCK_XPKG=$xpkg diff --git a/scripts/functions b/scripts/functions index 724c95702..f78b9e886 100644 --- a/scripts/functions +++ b/scripts/functions @@ -758,8 +758,8 @@ build_this_package() { fi [ -z "$createdocs" ] && createdocs="$ROCKCFG_CREATE_DOCS" fi - - for file in $confdir/*.desktop ; do + + [ -n "${desktopfiles}" ] && for file in ${desktopfiles} ; do [ -f $file ] || continue echo -n "Install desktop file '$file': "