summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2009-10-11 15:32:10 +0000
committerjmmv <jmmv@pkgsrc.org>2009-10-11 15:32:10 +0000
commitcb5db471b0d23ed57cdf47907f2799c032c6a225 (patch)
tree45975b790f7e597d97592101597d5db4d36355c6 /misc
parent2a5fad37afab68edda69f50229f119538995b7bb (diff)
downloadpkgsrc-cb5db471b0d23ed57cdf47907f2799c032c6a225.tar.gz
Add destdir support and make this use REPLACE_PERL instead of custom
replacement.
Diffstat (limited to 'misc')
-rw-r--r--misc/gkrellm-weather/Makefile32
1 files changed, 21 insertions, 11 deletions
diff --git a/misc/gkrellm-weather/Makefile b/misc/gkrellm-weather/Makefile
index d762e7c75c5..58ee376a8cd 100644
--- a/misc/gkrellm-weather/Makefile
+++ b/misc/gkrellm-weather/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2009/08/26 19:58:01 sno Exp $
+# $NetBSD: Makefile,v 1.30 2009/10/11 15:32:10 jmmv Exp $
DISTNAME= gkrellweather-2.0.7
PKGNAME= gkrellm-weather-2.0.7
@@ -13,20 +13,30 @@ COMMENT= Gkrellm2 weather plugin
DEPENDS+= wget>=1.8:../../net/wget
+PKG_DESTDIR_SUPPORT= user-destdir
+
USE_TOOLS+= gmake msgfmt perl:run pkg-config
USE_PKGLOCALEDIR= YES
+REPLACE_PERL= GrabWeather
BUILD_TARGET= gkrellweather.so
-MAKE_ENV+= LOCALEDIR=${PREFIX}/${PKGLOCALEDIR}/locale \
- enable_nls=1
-
-pre-build:
- ${MV} ${WRKSRC}/GrabWeather ${WRKSRC}/GrabWeather.orig
- ${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.orig
- ${SED} -e "s|/usr/local|${PREFIX}|" \
- ${WRKSRC}/Makefile.orig > ${WRKSRC}/Makefile
- ${SED} -e "s|/usr/bin/perl|${PERL5}|" \
- ${WRKSRC}/GrabWeather.orig > ${WRKSRC}/GrabWeather
+MAKE_ENV+= LOCALEDIR=${PREFIX}/${PKGLOCALEDIR}/locale
+MAKE_ENV+= enable_nls=1
+MAKE_ENV+= PREFIX=${PREFIX:Q}
+
+INSTALLATION_DIRS= bin lib
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/GrabWeather ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib/gkrellm2/plugins
+ ${INSTALL_LIB} ${WRKSRC}/gkrellweather.so \
+ ${DESTDIR}${PREFIX}/lib/gkrellm2/plugins
+ cd ${WRKSRC}/po && for f in *.mo; do \
+ localedir=${DESTDIR}${PREFIX}/${PKGLOCALEDIR}/locale; \
+ modir=$${localedir}/$$(basename $$f .mo)/LC_MESSAGES; \
+ ${INSTALL_DATA_DIR} $${modir}; \
+ ${INSTALL_DATA} $$f $${modir}/gkrellweather.mo; \
+ done
.include "../../sysutils/gkrellm/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"