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': "