/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.313 Revision 1.314
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.313 2009/02/18 20:17:18 betelgeuse Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.314 2009/02/21 07:35:14 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
969 einfo "Passing desktop entry validity check. Install dev-util/desktop-file-utils, if you want to help to improve Gentoo." 969 einfo "Passing desktop entry validity check. Install dev-util/desktop-file-utils, if you want to help to improve Gentoo."
970 fi 970 fi
971} 971}
972 972
973# @FUNCTION: make_session_desktop 973# @FUNCTION: make_session_desktop
974# @USAGE: <title> <command> 974# @USAGE: <title> <command> [command args...]
975# @DESCRIPTION: 975# @DESCRIPTION:
976# Make a GDM/KDM Session file. The title is the file to execute to start the 976# Make a GDM/KDM Session file. The title is the file to execute to start the
977# Window Manager. The command is the name of the Window Manager. 977# Window Manager. The command is the name of the Window Manager.
978#
979# You can set the name of the file via the ${wm} variable.
978make_session_desktop() { 980make_session_desktop() {
979 [[ -z $1 ]] && eerror "make_session_desktop: You must specify the title" && return 1 981 [[ -z $1 ]] && eerror "$0: You must specify the title" && return 1
980 [[ -z $2 ]] && eerror "make_session_desktop: You must specify the command" && return 1 982 [[ -z $2 ]] && eerror "$0: You must specify the command" && return 1
981 983
982 local title=$1 984 local title=$1
983 local command=$2 985 local command=$2
984 local desktop=${T}/${wm}.desktop 986 local desktop=${T}/${wm:-${PN}}.desktop
987 shift 2
985 988
986 cat <<-EOF > "${desktop}" 989 cat <<-EOF > "${desktop}"
987 [Desktop Entry] 990 [Desktop Entry]
988 Name=${title} 991 Name=${title}
989 Comment=This session logs you into ${title} 992 Comment=This session logs you into ${title}
990 Exec=${command} 993 Exec=${command} $*
991 TryExec=${command} 994 TryExec=${command}
992 Type=Application 995 Type=XSession
993 EOF 996 EOF
994 997
995 ( 998 (
996 # wrap the env here so that the 'insinto' call 999 # wrap the env here so that the 'insinto' call
997 # doesn't corrupt the env of the caller 1000 # doesn't corrupt the env of the caller

Legend:
Removed from v.1.313  
changed lines
  Added in v.1.314

  ViewVC Help
Powered by ViewVC 1.1.20