aboutsummaryrefslogtreecommitdiff
path: root/Mk/Scripts/desktop-categories.sh
blob: a80c048b7dea24f4b9fc597b928e3f53310bea85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/sh
# $FreeBSD$
#
# MAINTAINER: portmgr@FreeBSD.org

set -e
set -o pipefail

. "${dp_SCRIPTSDIR}/functions.sh"

validate_env dp_CATEGORIES dp_SORT dp_TR dp_ECHO_CMD

[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_DESKTOP_CATEGORIES}" ] && set -x

set -u

categories=""
for native_category in ${dp_CATEGORIES}; do
	c=""
	case ${native_category} in
		accessibility)	c="Utility Accessibility"		;;
		archivers)	c="Utility Archiving"			;;
		astro)		c="Education Science Astronomy"		;;
		audio)		c="AudioVideo Audio"			;;
		benchmarks)	c="System"				;;
		biology)	c="Education Science Biology"		;;
		cad)		c="Graphics Engineering"		;;
		comms)		c="Utility"				;;
		converters)	c="Utility"				;;
		databases)	c="Office Database"			;;
		deskutils)	c="Utility"				;;
		devel)		c="Development"				;;
		dns)		c="Network"				;;
		elisp)		c="Development"				;;
		editors)	c="Utility"				;;
		education)	c="Education"				;;
		emulators)	c="System Emulator"			;;
		finance)	c="Office Finance"			;;
		ftp)		c="Network FileTransfer"		;;
		games)		c="Game"				;;
		geography)	c="Education Science Geography"		;;
		gnome)		c="GNOME GTK"				;;
		graphics)	c="Graphics"				;;
		hamradio)	c="HamRadio"				;;
		haskell)	c="Development"				;;
		irc)		c="Network IRCClient"			;;
		java)		c="Development Java"			;;
		kde)		c="KDE Qt"				;;
		lang)		c="Development"				;;
		lisp)		c="Development"				;;
		mail)		c="Office Email"			;;
		mate)		c="MATE GTK"				;;
		math)		c="Education Science Math"		;;
		mbone)		c="Network AudioVideo"			;;
		multimedia)	c="AudioVideo"				;;
		net)		c="Network"				;;
		net-im)		c="Network InstantMessaging"		;;
		net-mgmt)	c="Network"				;;
		net-p2p)	c="Network P2P"				;;
		net-vpn)	c="Network VPN"				;;
		news)		c="Network News"			;;
		parallel)	c="ParallelComputing"			;;
		pear)		c="Development WebDevelopment"		;;
		perl5)		c="Development"				;;
		python)		c="Development"				;;
		ruby)		c="Development"				;;
		rubygems)	c="Development"				;;
		scheme)		c="Development"				;;
		science)	c="Science Education"			;;
		security)	c="System Security"			;;
		shells)		c="System Shell"			;;
		sysutils)	c="System"				;;
		tcl*|tk*)	c="Development"				;;
		textproc)	c="Utility TextTools"			;;
		www)		c="Network"				;;
		x11-clocks)	c="Utility Clock"			;;
		x11-fm)		c="System FileManager"			;;
		xfce)		c="GTK XFCE"				;;
		zope)		c="Development WebDevelopment"		;;
	esac
	if [ -n "${c}" ]; then
		categories="${categories} ${c}"
	fi
done

if [ -n "${categories}" ]; then
	for c in ${categories}; do
		${dp_ECHO_CMD} "${c}"
	done | ${dp_SORT} -u | ${dp_TR} '\n' ';'
	${dp_ECHO_CMD}
fi