+ if ! echo "${Icon}" | ${dp_GREP} -qe '^/' ; then
+ ${dp_ECHO_MSG} "${dp_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"
+ fi
+ fi
+
+ if [ -z "${Exec}" ]; then
+ ${dp_ECHO_MSG} "${dp_PKGNAME}: Makefile error: in desktop entry ${entry}: field 4 (Exec) is empty"
+ exit 1
+ fi
+
+ if [ -n "${Categories}" ]; then
+ for c in $(${dp_ECHO_CMD} "${Categories}" | ${dp_TR} ';' ' '); do
+ if ! ${dp_ECHO_CMD} "${VALID_DESKTOP_CATEGORIES}" | ${dp_GREP} -wq "${c}"; then
+ ${dp_ECHO_CMD} "${dp_PKGNAME}: Makefile warning: in desktop entry ${entry}: category ${c} is not a valid desktop category"
+ fi
+ done
+
+ if ! ${dp_ECHO_CMD} "${Categories}" | ${dp_GREP} -Eq "$(${dp_ECHO_CMD} "${DESKTOP_CATEGORIES_MAIN}" | ${dp_SED} -E 's,[[:blank:]]+,\|,g')"; then
+ ${dp_ECHO_CMD} "${dp_PKGNAME}: Makefile warning: in desktop entry ${entry}: field 5 (Categories) must contain at least one main desktop category (make -VDESKTOP_CATEGORIES_MAIN)"
+ fi
+
+ if ! ${dp_EXPR} "${Categories}" : '.*;$' > /dev/null; then
+ ${dp_ECHO_MSG} "${dp_PKGNAME}: Makefile error: in desktop entry ${entry}: field 5 (Categories) does not end with a semicolon"
+ exit 1
+ fi
+ else
+ if [ -z "$(cd "${dp_CURDIR}" && ${dp_MAKE} desktop-categories)" ]; then
+ ${dp_ECHO_MSG} "${dp_PKGNAME}: Makefile error: in desktop entry ${entry}: field 5 (Categories) is empty and could not be deduced from the CATEGORIES variable"
+ exit 1
+ fi
+ fi
+
+ if [ "${StartupNotify}" != "true" ] && [ "${StartupNotify}" != "false" ] && [ -n "${StartupNotify}" ]; then
+ ${dp_ECHO_MSG} "${dp_PKGNAME}: Makefile error: in desktop entry ${entry}: field 6 (StartupNotify) is not \"true\", \"false\" or \"\"(empty)"
- if [ `${EXPR} \( $$# - 1 \) % 6` -ne 0 ]; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: the DESKTOP_ENTRIES list must contain one or more groups of 6 elements"; \
- exit 1; \
- fi; \
- num=1; \
- while [ $$# -gt 6 ]; do \
- entry="#$$num"; \
- if [ -n "$$4" ]; then \
- entry="$$entry ($$4)"; \
- elif [ -n "$$1" ]; then \
- entry="$$entry ($$1)"; \
- fi; \
- if [ -z "$$1" ]; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 1 (Name) is empty"; \
- exit 1; \
- fi; \
- if ${ECHO_CMD} "$$3" | ${EGREP} -iq '.(png|svg|xpm)$$'; then \
- if ! ${ECHO_CMD} "$$3" | ${GREP} -iq '^/'; then \
- ${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"; \
- fi; \
- fi; \
- if [ -z "$$4" ]; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) is empty"; \
- exit 1; \
- fi; \
- if [ -n "$$5" ]; then \
- for c in `${ECHO_CMD} "$$5" | ${TR} ';' ' '`; do \
- if ! ${ECHO_CMD} ${VALID_DESKTOP_CATEGORIES} | ${GREP} -wq $$c; then \
- ${ECHO_CMD} "${PKGNAME}: Makefile warning: in desktop entry $$entry: category $$c is not a valid desktop category"; \
- fi; \
- done; \
- if ! ${ECHO_CMD} "$$5" | ${GREP} -q "`${ECHO_CMD} ${DESKTOP_CATEGORIES_MAIN} | ${SED} -E 's,[[:blank:]]+,\\\|,g'`"; then \
- ${ECHO_CMD} "${PKGNAME}: Makefile warning: in desktop entry $$entry: field 5 (Categories) must contain at least one main desktop category (make -VDESKTOP_CATEGORIES_MAIN)"; \
- fi; \
- if ! ${ECHO_CMD} "$$5" | ${GREP} -q ';$$'; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) does not end with a semicolon"; \
- exit 1; \
- fi; \
- else \
- if [ -z "`cd ${.CURDIR} && ${MAKE} desktop-categories`" ]; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) is empty and could not be deduced from the CATEGORIES variable"; \
- exit 1; \
- fi; \
- fi; \
- if [ "x$$6" != "xtrue" ] && [ "x$$6" != "xfalse" ] && [ "x$$6" != "x" ]; then \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is not \"true\", \"false\" or \"\"(empty)"; \