|
Lines 5074-5269
pretty-print-config:
Link Here
|
| 5074 |
.endif # pretty-print-config |
5074 |
.endif # pretty-print-config |
| 5075 |
|
5075 |
|
| 5076 |
desktop-categories: |
5076 |
desktop-categories: |
| 5077 |
@categories=""; \ |
5077 |
@${SETENV} \ |
| 5078 |
for native_category in ${CATEGORIES}; do \ |
5078 |
dp_CATEGORIES="${CATEGORIES}" \ |
| 5079 |
c=""; \ |
5079 |
dp_ECHO_CMD=${ECHO_CMD} \ |
| 5080 |
case $$native_category in \ |
5080 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
| 5081 |
accessibility) c="Utility Accessibility" ;; \ |
5081 |
dp_SORT="${SORT}" \ |
| 5082 |
archivers) c="Utility Archiving" ;; \ |
5082 |
dp_TR="${TR}" \ |
| 5083 |
astro) c="Education Science Astronomy" ;; \ |
5083 |
${SH} ${SCRIPTSDIR}/desktop-categories.sh |
| 5084 |
audio) c="AudioVideo Audio" ;; \ |
|
|
| 5085 |
benchmarks) c="System" ;; \ |
| 5086 |
biology) c="Education Science Biology" ;; \ |
| 5087 |
cad) c="Graphics Engineering" ;; \ |
| 5088 |
comms) c="Utility" ;; \ |
| 5089 |
converters) c="Utility" ;; \ |
| 5090 |
databases) c="Office Database" ;; \ |
| 5091 |
deskutils) c="Utility" ;; \ |
| 5092 |
devel) c="Development" ;; \ |
| 5093 |
dns) c="Network" ;; \ |
| 5094 |
elisp) c="Development" ;; \ |
| 5095 |
editors) c="Utility" ;; \ |
| 5096 |
emulators) c="System Emulator" ;; \ |
| 5097 |
finance) c="Office Finance" ;; \ |
| 5098 |
ftp) c="Network FileTransfer" ;; \ |
| 5099 |
games) c="Game" ;; \ |
| 5100 |
geography) c="Education Science Geography" ;; \ |
| 5101 |
gnome) c="GNOME GTK" ;; \ |
| 5102 |
graphics) c="Graphics" ;; \ |
| 5103 |
hamradio) c="HamRadio" ;; \ |
| 5104 |
haskell) c="Development" ;; \ |
| 5105 |
irc) c="Network IRCClient" ;; \ |
| 5106 |
java) c="Development Java" ;; \ |
| 5107 |
kde) c="KDE Qt" ;; \ |
| 5108 |
lang) c="Development" ;; \ |
| 5109 |
lisp) c="Development" ;; \ |
| 5110 |
mail) c="Office Email" ;; \ |
| 5111 |
mate) c="MATE GTK" ;; \ |
| 5112 |
math) c="Education Science Math" ;; \ |
| 5113 |
mbone) c="Network AudioVideo" ;; \ |
| 5114 |
multimedia) c="AudioVideo" ;; \ |
| 5115 |
net) c="Network" ;; \ |
| 5116 |
net-im) c="Network InstantMessaging" ;; \ |
| 5117 |
net-mgmt) c="Network" ;; \ |
| 5118 |
net-p2p) c="Network P2P" ;; \ |
| 5119 |
news) c="Network News" ;; \ |
| 5120 |
palm) c="Office PDA" ;; \ |
| 5121 |
parallel) c="ParallelComputing" ;; \ |
| 5122 |
pear) c="Development WebDevelopment" ;; \ |
| 5123 |
perl5) c="Development" ;; \ |
| 5124 |
python) c="Development" ;; \ |
| 5125 |
ruby) c="Development" ;; \ |
| 5126 |
rubygems) c="Development" ;; \ |
| 5127 |
scheme) c="Development" ;; \ |
| 5128 |
science) c="Science Education" ;; \ |
| 5129 |
security) c="System Security" ;; \ |
| 5130 |
shells) c="System Shell" ;; \ |
| 5131 |
sysutils) c="System" ;; \ |
| 5132 |
tcl*|tk*) c="Development" ;; \ |
| 5133 |
textproc) c="Utility TextTools" ;; \ |
| 5134 |
www) c="Network" ;; \ |
| 5135 |
x11-clocks) c="Utility Clock" ;; \ |
| 5136 |
x11-fm) c="System FileManager" ;; \ |
| 5137 |
xfce) c="GTK XFCE" ;; \ |
| 5138 |
zope) c="Development WebDevelopment" ;; \ |
| 5139 |
esac; \ |
| 5140 |
if [ -n "$$c" ]; then \ |
| 5141 |
categories="$$categories $$c"; \ |
| 5142 |
fi; \ |
| 5143 |
done; \ |
| 5144 |
if [ -n "$$categories" ]; then \ |
| 5145 |
for c in $$categories; do ${ECHO_MSG} "$$c"; done \ |
| 5146 |
| ${SORT} -u | ${TR} '\n' ';'; \ |
| 5147 |
${ECHO_MSG}; \ |
| 5148 |
fi |
| 5149 |
|
| 5150 |
# http://standards.freedesktop.org/menu-spec/menu-spec-latest.html |
| 5151 |
DESKTOP_CATEGORIES_MAIN= AudioVideo Audio Video Development Education \ |
| 5152 |
Game Graphics Network Office Science Settings System Utility |
| 5153 |
DESKTOP_CATEGORIES_ADDITIONAL= Building Debugger IDE GUIDesigner Profiling \ |
| 5154 |
RevisionControl Translation Calendar ContactManagement Database \ |
| 5155 |
Dictionary Chart Email Finance FlowChart PDA ProjectManagement \ |
| 5156 |
Presentation Spreadsheet WordProcessor 2DGraphics VectorGraphics \ |
| 5157 |
RasterGraphics 3DGraphics Scanning OCR Photography Publishing Viewer \ |
| 5158 |
TextTools DesktopSettings HardwareSettings Printing PackageManager \ |
| 5159 |
Dialup InstantMessaging Chat IRCClient Feed FileTransfer HamRadio News \ |
| 5160 |
P2P RemoteAccess Telephony TelephonyTools VideoConference WebBrowser \ |
| 5161 |
WebDevelopment Midi Mixer Sequencer Tuner TV AudioVideoEditing Player \ |
| 5162 |
Recorder DiscBurning ActionGame AdventureGame ArcadeGame BoardGame \ |
| 5163 |
BlocksGame CardGame KidsGame LogicGame RolePlaying Shooter Simulation \ |
| 5164 |
SportsGame StrategyGame Art Construction Music Languages \ |
| 5165 |
ArtificialIntelligence Astronomy Biology Chemistry ComputerScience \ |
| 5166 |
DataVisualization Economy Electricity Geography Geology Geoscience \ |
| 5167 |
History Humanities ImageProcessing Literature Maps Math \ |
| 5168 |
NumericalAnalysis MedicalSoftware Physics Robotics Spirituality Sports \ |
| 5169 |
ParallelComputing Amusement Archiving Compression Electronics Emulator \ |
| 5170 |
Engineering FileTools FileManager TerminalEmulator Filesystem Monitor \ |
| 5171 |
Security Accessibility Calculator Clock TextEditor Documentation Adult \ |
| 5172 |
Core KDE GNOME MATE XFCE GTK Qt Motif Java ConsoleOnly |
| 5173 |
DESKTOP_CATEGORIES_RESERVED= Screensaver TrayIcon Applet Shell |
| 5174 |
|
| 5175 |
VALID_DESKTOP_CATEGORIES+= ${DESKTOP_CATEGORIES_MAIN} \ |
| 5176 |
${DESKTOP_CATEGORIES_ADDITIONAL} \ |
| 5177 |
${DESKTOP_CATEGORIES_RESERVED} |
| 5178 |
|
5084 |
|
| 5179 |
.if defined(DESKTOP_ENTRIES) |
5085 |
.if defined(DESKTOP_ENTRIES) |
| 5180 |
check-desktop-entries: |
5086 |
check-desktop-entries: |
| 5181 |
@set -- ${DESKTOP_ENTRIES} XXX; \ |
5087 |
@${SETENV} \ |
| 5182 |
if [ `${EXPR} \( $$# - 1 \) % 6` -ne 0 ]; then \ |
5088 |
dp_CURDIR="${.CURDIR}" \ |
| 5183 |
${ECHO_MSG} "${PKGNAME}: Makefile error: the DESKTOP_ENTRIES list must contain one or more groups of 6 elements"; \ |
5089 |
dp_ECHO_CMD=${ECHO_CMD} \ |
| 5184 |
exit 1; \ |
5090 |
dp_ECHO_MSG=${ECHO_MSG} \ |
| 5185 |
fi; \ |
5091 |
dp_EXPR="${EXPR}" \ |
| 5186 |
num=1; \ |
5092 |
dp_GREP="${GREP}" \ |
| 5187 |
while [ $$# -gt 6 ]; do \ |
5093 |
dp_MAKE="${MAKE}" \ |
| 5188 |
entry="#$$num"; \ |
5094 |
dp_PKGNAME="${PKGNAME}" \ |
| 5189 |
if [ -n "$$4" ]; then \ |
5095 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
| 5190 |
entry="$$entry ($$4)"; \ |
5096 |
dp_SED="${SED}" \ |
| 5191 |
elif [ -n "$$1" ]; then \ |
5097 |
dp_VALID_DESKTOP_CATEGORIES="${VALID_DESKTOP_CATEGORIES}" \ |
| 5192 |
entry="$$entry ($$1)"; \ |
5098 |
dp_TR="${TR}" \ |
| 5193 |
fi; \ |
5099 |
${SH} ${SCRIPTSDIR}/check-desktop-entries.sh ${DESKTOP_ENTRIES} |
| 5194 |
if [ -z "$$1" ]; then \ |
|
|
| 5195 |
${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 1 (Name) is empty"; \ |
| 5196 |
exit 1; \ |
| 5197 |
fi; \ |
| 5198 |
if ${ECHO_CMD} "$$3" | ${EGREP} -iq '.(png|svg|xpm)$$'; then \ |
| 5199 |
if ! ${ECHO_CMD} "$$3" | ${GREP} -iq '^/'; then \ |
| 5200 |
${ECHO_MSG} "${PKGNAME}: Makefile warning: in desktop entry $$entry: field 3 (Icon) should be either absolute path or icon name without extension if installed icons follow Icon Theme Specification"; \ |
| 5201 |
fi; \ |
| 5202 |
fi; \ |
| 5203 |
if [ -z "$$4" ]; then \ |
| 5204 |
${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) is empty"; \ |
| 5205 |
exit 1; \ |
| 5206 |
fi; \ |
| 5207 |
if [ -n "$$5" ]; then \ |
| 5208 |
for c in `${ECHO_CMD} "$$5" | ${TR} ';' ' '`; do \ |
| 5209 |
if ! ${ECHO_CMD} ${VALID_DESKTOP_CATEGORIES} | ${GREP} -wq $$c; then \ |
| 5210 |
${ECHO_CMD} "${PKGNAME}: Makefile warning: in desktop entry $$entry: category $$c is not a valid desktop category"; \ |
| 5211 |
fi; \ |
| 5212 |
done; \ |
| 5213 |
if ! ${ECHO_CMD} "$$5" | ${GREP} -q "`${ECHO_CMD} ${DESKTOP_CATEGORIES_MAIN} | ${SED} -E 's,[[:blank:]]+,\\\|,g'`"; then \ |
| 5214 |
${ECHO_CMD} "${PKGNAME}: Makefile warning: in desktop entry $$entry: field 5 (Categories) must contain at least one main desktop category (make -VDESKTOP_CATEGORIES_MAIN)"; \ |
| 5215 |
fi; \ |
| 5216 |
if ! ${ECHO_CMD} "$$5" | ${GREP} -q ';$$'; then \ |
| 5217 |
${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) does not end with a semicolon"; \ |
| 5218 |
exit 1; \ |
| 5219 |
fi; \ |
| 5220 |
else \ |
| 5221 |
if [ -z "`cd ${.CURDIR} && ${MAKE} desktop-categories`" ]; then \ |
| 5222 |
${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) is empty and could not be deduced from the CATEGORIES variable"; \ |
| 5223 |
exit 1; \ |
| 5224 |
fi; \ |
| 5225 |
fi; \ |
| 5226 |
if [ "x$$6" != "xtrue" ] && [ "x$$6" != "xfalse" ] && [ "x$$6" != "x" ]; then \ |
| 5227 |
${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is not \"true\", \"false\" or \"\"(empty)"; \ |
| 5228 |
exit 1; \ |
| 5229 |
fi; \ |
| 5230 |
shift 6; \ |
| 5231 |
num=`${EXPR} $$num + 1`; \ |
| 5232 |
done |
| 5233 |
.endif |
5100 |
.endif |
| 5234 |
|
5101 |
|
| 5235 |
.if !target(install-desktop-entries) |
5102 |
.if !target(install-desktop-entries) |
| 5236 |
.if defined(DESKTOP_ENTRIES) |
5103 |
.if defined(DESKTOP_ENTRIES) |
| 5237 |
install-desktop-entries: |
5104 |
install-desktop-entries: |
| 5238 |
@set -- ${DESKTOP_ENTRIES} XXX; \ |
5105 |
@${SETENV} \ |
| 5239 |
while [ $$# -gt 6 ]; do \ |
5106 |
dp_CURDIR="${.CURDIR}" \ |
| 5240 |
filename="`${ECHO_CMD} "$$4" | ${SED} -e 's,^/,,g;s,[/ ],_,g;s,[^_[:alnum:]],,g'`.desktop"; \ |
5107 |
dp_ECHO_CMD=${ECHO_CMD} \ |
| 5241 |
pathname="${STAGEDIR}${DESKTOPDIR}/$$filename"; \ |
5108 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
| 5242 |
categories="$$5"; \ |
5109 |
dp_STAGEDIR="${STAGEDIR}" \ |
| 5243 |
if [ -z "$$categories" ]; then \ |
5110 |
dp_DESKTOPDIR="${DESKTOPDIR}" \ |
| 5244 |
categories="`cd ${.CURDIR} && ${MAKE} desktop-categories`"; \ |
5111 |
dp_TMPPLIST="${TMPPLIST}" \ |
| 5245 |
fi; \ |
5112 |
dp_MAKE="${MAKE}" \ |
| 5246 |
${ECHO_CMD} "${DESKTOPDIR}/$$filename" >> ${TMPPLIST}; \ |
5113 |
dp_SED="${SED}" \ |
| 5247 |
${ECHO_CMD} "[Desktop Entry]" > $$pathname; \ |
5114 |
${SH} ${SCRIPTSDIR}/install-desktop-entries.sh ${DESKTOP_ENTRIES} |
| 5248 |
${ECHO_CMD} "Type=Application" >> $$pathname; \ |
|
|
| 5249 |
${ECHO_CMD} "Version=1.0" >> $$pathname; \ |
| 5250 |
${ECHO_CMD} "Name=$$1" >> $$pathname; \ |
| 5251 |
comment="$$2"; \ |
| 5252 |
if [ -z "$$2" ]; then \ |
| 5253 |
comment="`cd ${.CURDIR} && ${MAKE} -VCOMMENT`"; \ |
| 5254 |
fi; \ |
| 5255 |
${ECHO_CMD} "GenericName=$$comment" >> $$pathname; \ |
| 5256 |
${ECHO_CMD} "Comment=$$comment" >> $$pathname; \ |
| 5257 |
if [ -n "$$3" ]; then \ |
| 5258 |
${ECHO_CMD} "Icon=$$3" >> $$pathname; \ |
| 5259 |
fi; \ |
| 5260 |
${ECHO_CMD} "Exec=$$4" >> $$pathname; \ |
| 5261 |
${ECHO_CMD} "Categories=$$categories" >> $$pathname; \ |
| 5262 |
if [ -n "$$6" ]; then \ |
| 5263 |
${ECHO_CMD} "StartupNotify=$$6" >> $$pathname; \ |
| 5264 |
fi; \ |
| 5265 |
shift 6; \ |
| 5266 |
done |
| 5267 |
.endif |
5115 |
.endif |
| 5268 |
.endif |
5116 |
.endif |
| 5269 |
|
5117 |
|