mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-18 08:02:48 +00:00
b4c03f6f70
(myself) and x11-themes/gnome-icons/bsd.gnome-icons.mk (Tom McLaughlin <tmclaugh@sdf.lonestar.org>) with many changes
98 lines
2.5 KiB
Makefile
98 lines
2.5 KiB
Makefile
# New ports collection makefile for: support skeleton Makefile
|
|
# Date created: Thu Feb 19 23:17:56 UTC 2004
|
|
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
CATEGORIES?= x11-themes kde
|
|
PKGNAMEPREFIX= kde-icons-
|
|
DIST_SUBDIR= KDE
|
|
|
|
MAINTAINER?= lioux@FreeBSD.org
|
|
COMMENT?= KDE iconset theme
|
|
|
|
USE_REINPLACE= yes
|
|
NO_BUILD= yes
|
|
PLIST_SUB+= DIRNAME="${PORT_SHAREDIR}"
|
|
|
|
# default installation directory
|
|
PORT_SHAREDIR?= ${DISTNAME}
|
|
|
|
.ifndef(WITHOUT_RESTRICTIONS)
|
|
RESTRICTED?= It may contain iconic, visual, graphical or other\
|
|
elements that may not be distributed without the\
|
|
consent of either the trademark or the patent holder
|
|
|
|
NO_PACKAGE?= ${RESTRICTED}
|
|
.endif
|
|
|
|
INDEX_FILES= index.desktop index.theme
|
|
|
|
# do not install some files
|
|
PLIST_FILE_PATTERN= -i -v "(Thumbs\.db|(\.(bak|txt)|/(copying|readme))\$$)"
|
|
PLIST_FILE_PATTERN_EXTRA?= .
|
|
|
|
post-patch:
|
|
# correctly inherits crystal per default
|
|
.for file in ${INDEX_FILES}
|
|
@if [ -f "${WRKSRC}/${file}" ]; then \
|
|
${REINPLACE_CMD} -E \
|
|
-e 's|
|
|
||' \
|
|
-e 's|^Inherits.*$$|Inherits=crystalsvg|' \
|
|
"${WRKSRC}/${file}" ; \
|
|
fi
|
|
.endfor
|
|
|
|
# annotate what should be installed
|
|
annotate-install:
|
|
# annotate dirs
|
|
@cd ${WRKSRC} ; ${FIND} . -type d ! -empty \
|
|
| ${SORT} -r \
|
|
> ${WRKDIR}/dirs.list
|
|
# annotate files
|
|
@cd ${WRKSRC} ; ${FIND} . -type f ! -empty \
|
|
| ${GREP} -E ${PLIST_FILE_PATTERN} \
|
|
| ${GREP} -E ${PLIST_FILE_PATTERN_EXTRA} \
|
|
| ${SORT} \
|
|
> ${WRKDIR}/files.list
|
|
|
|
# prepare scripts for installation based on aforementioned annotations
|
|
generate-install-scripts:
|
|
# annotate dirs
|
|
@${CAT} ${WRKDIR}/dirs.list \
|
|
| ${SED} -E \
|
|
-e 's|^\.|${MKDIR} -m 755 ${PREFIX}/share/icons/${PORT_SHAREDIR:S/"//g}|' \
|
|
> ${WRKDIR}/dirs.sh
|
|
# annotate files
|
|
@${CAT} ${WRKDIR}/files.list \
|
|
| ${SED} -E \
|
|
-e 's|^\./(.+)$$|${INSTALL_DATA} ${WRKSRC}/\1 ${PREFIX}/share/icons/${PORT_SHAREDIR:S/"//g}/\1|' \
|
|
> ${WRKDIR}/files.sh
|
|
|
|
# generate on the fly packaging lists based on aforementioned annotations
|
|
generate-tmpplist:
|
|
# annotate files
|
|
@${CAT} ${WRKDIR}/files.list \
|
|
| ${SED} -E \
|
|
-e 's|^\.|share/icons/${PORT_SHAREDIR:S/"//g}|' \
|
|
> ${TMPPLIST}
|
|
# annotate dirs
|
|
@${CAT} ${WRKDIR}/dirs.list \
|
|
| ${SED} -E \
|
|
-e 's|^\.|@dirrm share/icons/${PORT_SHAREDIR:S/"//g}|' \
|
|
>> ${TMPPLIST}
|
|
@${ECHO_CMD} \
|
|
'@unexec rmdir %D/share/icons 2>/dev/null || true' \
|
|
>> ${TMPPLIST}
|
|
|
|
# use generated installation scripts
|
|
install-run-scripts:
|
|
.for script in dirs files
|
|
@${SH} ${WRKDIR}/${script}.sh
|
|
.endfor
|
|
|
|
do-install: annotate-install generate-install-scripts generate-tmpplist install-run-scripts
|
|
|
|
.include <bsd.port.mk>
|