pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/gkrellm-weather Add destdir support and make this...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d7ae0a52179e
branches:  trunk
changeset: 565978:d7ae0a52179e
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sun Oct 11 15:32:10 2009 +0000

description:
Add destdir support and make this use REPLACE_PERL instead of custom
replacement.

diffstat:

 misc/gkrellm-weather/Makefile |  30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diffs (49 lines):

diff -r 7b6984047285 -r d7ae0a52179e misc/gkrellm-weather/Makefile
--- a/misc/gkrellm-weather/Makefile     Sun Oct 11 13:34:43 2009 +0000
+++ b/misc/gkrellm-weather/Makefile     Sun Oct 11 15:32:10 2009 +0000
@@ -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 @@
 
 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
+MAKE_ENV+=     LOCALEDIR=${PREFIX}/${PKGLOCALEDIR}/locale
+MAKE_ENV+=     enable_nls=1
+MAKE_ENV+=     PREFIX=${PREFIX:Q}
+
+INSTALLATION_DIRS=     bin lib
 
-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
+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"



Home | Main Index | Thread Index | Old Index