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

Diff of /eclass/eutils.eclass

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

Revision 1.117 Revision 1.118
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.117 2004/10/09 18:25:43 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.118 2004/10/13 14:33:01 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
894} 894}
895 895
896# Make a desktop file ! 896# Make a desktop file !
897# Great for making those icons in kde/gnome startmenu ! 897# Great for making those icons in kde/gnome startmenu !
898# Amaze your friends ! Get the women ! Join today ! 898# Amaze your friends ! Get the women ! Join today !
899# gnome2 /usr/share/applications
900# gnome1 /usr/share/gnome/apps/
901# KDE ${KDEDIR}/share/applnk /usr/share/applnk
902# 899#
903# make_desktop_entry(<binary>, [name], [icon], [type], [path]) 900# make_desktop_entry(<binary>, [name], [icon], [type], [path])
904# 901#
905# binary: what binary does the app run with ? 902# binary: what binary does the app run with ?
906# name: the name that will show up in the menu 903# name: the name that will show up in the menu
907# icon: give your little like a pretty little icon ... 904# icon: give your little like a pretty little icon ...
908# this can be relative (to /usr/share/pixmaps) or 905# this can be relative (to /usr/share/pixmaps) or
909# a full path to an icon 906# a full path to an icon
910# type: what kind of application is this ? for categories: 907# type: what kind of application is this ? for categories:
911# http://www.freedesktop.org/standards/menu-spec/ 908# http://www.freedesktop.org/standards/menu-spec/
912# path: if your app needs to startup in a specific dir 909# path: if your app needs to startup in a specific dir
913make_desktop_entry() { 910make_desktop_entry() {
914 [ -z "$1" ] && eerror "You must specify the executable" && return 1 911 [ -z "$1" ] && eerror "make_desktop_entry: You must specify the executable" && return 1
915 912
916 local exec="${1}" 913 local exec="${1}"
917 local name="${2:-${PN}}" 914 local name="${2:-${PN}}"
918 local icon="${3:-${PN}.png}" 915 local icon="${3:-${PN}.png}"
919 local type="${4}" 916 local type="${4}"
951Exec=${exec} 948Exec=${exec}
952Path=${path} 949Path=${path}
953Icon=${icon} 950Icon=${icon}
954Categories=Application;${type};" > "${desktop}" 951Categories=Application;${type};" > "${desktop}"
955 952
956 if [ -d "/usr/share/applications" ]
957 then
958 insinto /usr/share/applications 953 insinto /usr/share/applications
959 doins "${desktop}" 954 doins "${desktop}"
960 fi
961
962 #if [ -d "/usr/share/gnome/apps" ]
963 #then
964 # insinto /usr/share/gnome/apps/Games
965 # doins ${desktop}
966 #fi
967
968 #if [ ! -z "`ls /usr/kde/* 2>/dev/null`" ]
969 #then
970 # for ver in /usr/kde/*
971 # do
972 # insinto ${ver}/share/applnk/Games
973 # doins ${desktop}
974 # done
975 #fi
976
977 if [ -d "/usr/share/applnk" ]
978 then
979 insinto /usr/share/applnk/${subdir}
980 doins "${desktop}"
981 fi
982 955
983 return 0 956 return 0
984} 957}
985 958
986# for internal use only (unpack_pdv and unpack_makeself) 959# for internal use only (unpack_pdv and unpack_makeself)

Legend:
Removed from v.1.117  
changed lines
  Added in v.1.118

  ViewVC Help
Powered by ViewVC 1.1.20