diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2004-11-15 19:57:11 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2004-11-15 19:57:11 +0000 |
commit | b4c03f6f7025a9f8f3cd6b87682cc6ec98f34bbb (patch) | |
tree | cc62ad4b39aad12fbfb7188d5c02f1b820d80f86 /x11-themes | |
parent | 67f4c1309bc50e32414df546282b83c6bf1a5e56 (diff) | |
download | ports-b4c03f6f7025a9f8f3cd6b87682cc6ec98f34bbb.tar.gz ports-b4c03f6f7025a9f8f3cd6b87682cc6ec98f34bbb.zip |
Notes
Diffstat (limited to 'x11-themes')
-rw-r--r-- | x11-themes/kde-icons-noia/Makefile.icons | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/x11-themes/kde-icons-noia/Makefile.icons b/x11-themes/kde-icons-noia/Makefile.icons index 600c03cf04c6..6dd8afca7e0b 100644 --- a/x11-themes/kde-icons-noia/Makefile.icons +++ b/x11-themes/kde-icons-noia/Makefile.icons @@ -29,6 +29,10 @@ NO_PACKAGE?= ${RESTRICTED} 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} @@ -40,15 +44,54 @@ post-patch: fi .endfor -do-install: - @${MKDIR} ${PREFIX}/share/icons/${PORT_SHAREDIR} -# create dirs +# annotate what should be installed +annotate-install: +# annotate dirs @cd ${WRKSRC} ; ${FIND} . -type d ! -empty \ - -exec ${MKDIR} -m 0755 \ - ${PREFIX}/share/icons/${PORT_SHAREDIR}/"{}" \; -# copy files - @cd ${WRKSRC} ; ${FIND} . -type f \ - -exec ${INSTALL_DATA} ${WRKSRC}/"{}" \ - ${PREFIX}/share/icons/${PORT_SHAREDIR}/"{}" \; + | ${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> |