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

Diff of /eclass/eutils.eclass

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

Revision 1.157 Revision 1.159
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.157 2005/03/07 17:45:07 carlo Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.159 2005/03/18 22:50:26 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.
386 fi 386 fi
387 387
388 if [ "${count}" -eq 5 ] 388 if [ "${count}" -eq 5 ]
389 then 389 then
390 echo 390 echo
391 eerror "Failed Patch: ${patchname}!" 391 eerror "Failed Patch: ${patchname} !"
392 eerror " ( ${PATCH_TARGET} )"
392 eerror 393 eerror
393 eerror "Include in your bugreport the contents of:" 394 eerror "Include in your bugreport the contents of:"
394 eerror 395 eerror
395 eerror " ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}" 396 eerror " ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}"
396 echo 397 echo
912# a full path to an icon 913# a full path to an icon
913# type: what kind of application is this ? for categories: 914# type: what kind of application is this ? for categories:
914# http://www.freedesktop.org/wiki/Standards_2fmenu_2dspec 915# http://www.freedesktop.org/wiki/Standards_2fmenu_2dspec
915# path: if your app needs to startup in a specific dir 916# path: if your app needs to startup in a specific dir
916make_desktop_entry() { 917make_desktop_entry() {
917 [ -z "$1" ] && eerror "make_desktop_entry: You must specify the executable" && return 1 918 [[ -z $1 ]] && eerror "make_desktop_entry: You must specify the executable" && return 1
918 919
919 local exec="${1}" 920 local exec=${1}
920 local name="${2:-${PN}}" 921 local name=${2:-${PN}}
921 local icon="${3:-${PN}.png}" 922 local icon=${3:-${PN}.png}
922 local type="${4}" 923 local type=${4}
923 local subdir="${6}" 924 local path=${5}
924 local path="${5:-${GAMES_BINDIR}}" 925
925 if [ -z "${type}" ] 926 if [[ -z ${type} ]] ; then
926 then 927 local catmaj=${CATEGORY%%-*}
927 case ${CATEGORY} in 928 local catmin=${CATEGORY##*-}
928 "app-emulation") 929 case ${catmaj} in
929 type=Emulator 930 app)
930 subdir="Emulation" 931 case ${catmin} in
932 admin) type=System;;
933 cdr) type=DiscBurning;;
934 dicts) type=Dictionary;;
935 editors) type=TextEditor;;
936 emacs) type=TextEditor;;
937 emulation) type=Emulator;;
938 laptop) type=HardwareSettings;;
939 office) type=Office;;
940 vim) type=TextEditor;;
941 xemacs) type=TextEditor;;
942 *) type=;;
943 esac
931 ;; 944 ;;
932 "games-"*) 945
933 type=Game 946 dev)
934 subdir="Games" 947 type="Development"
935 ;; 948 ;;
936 "net-"*) 949
937 type=Network 950 games)
938 subdir="${type}" 951 [[ -z ${path} ]] && path=${GAMES_BINDIR}
952
953 case ${catmin} in
954 action) type=ActionGame;;
955 arcade) type=ArcadeGame;;
956 board) type=BoardGame;;
957 kid) type=KidsGame;;
958 emulation) type=Emulator;;
959 puzzle) type=LogicGame;;
960 rpg) type=RolePlaying;;
961 roguelike) type=RolePlaying;;
962 simulation) type=Simulation;;
963 sports) type=SportsGame;;
964 strategy) type=StrategyGame;;
965 *) type=;;
966 esac
967 type="Game;${type}"
939 ;; 968 ;;
969
970 mail)
971 type="Network;Email"
972 ;;
973
974 media)
975 case ${catmin} in
976 gfx) type=Graphics;;
977 radio) type=Tuner;;
978 sound) type=Audio;;
979 tv) type=TV;;
980 video) type=Video;;
981 *) type=;;
982 esac
983 type="AudioVideo;${type}"
984 ;;
985
986 net)
987 case ${catmin} in
988 dialup) type=Dialup;;
989 ftp) type=FileTransfer;;
990 im) type=InstantMessaging;;
991 irc) type=IRCClient;;
992 mail) type=Email;;
993 news) type=News;;
994 nntp) type=News;;
995 p2p) type=FileTransfer;;
996 *) type=;;
997 esac
998 type="Network;${type}"
999 ;;
1000
1001 sci)
1002 case ${catmin} in
1003 astro*) type=Astronomoy;;
1004 bio*) type=Biology;;
1005 calc*) type=Calculator;;
1006 chem*) type=Chemistry;;
1007 geo*) type=Geology;;
1008 math*) type=Math;;
1009 *) type=;;
1010 esac
1011 type="Science;${type}"
1012 ;;
1013
1014 www)
1015 case ${catmin} in
1016 client) type=WebBrowser;;
1017 *) type=;;
1018 esac
1019 type="Network"
1020 ;;
1021
940 *) 1022 *)
941 type= 1023 type=
942 subdir=
943 ;; 1024 ;;
944 esac 1025 esac
945 fi 1026 fi
1027
946 local desktop="${T}/${exec%% *}-${P}.desktop" 1028 local desktop=${T}/${exec%% *}-${P}.desktop
947 1029
948echo "[Desktop Entry] 1030echo "[Desktop Entry]
949Encoding=UTF-8 1031Encoding=UTF-8
950Version=0.9.2 1032Version=0.9.2
951Name=${name} 1033Name=${name}

Legend:
Removed from v.1.157  
changed lines
  Added in v.1.159

  ViewVC Help
Powered by ViewVC 1.1.20