From 5b2fd799959cf45414868b6aa075c7ac74adb55e Mon Sep 17 00:00:00 2001 From: obache Date: Tue, 8 Mar 2011 12:00:15 +0000 Subject: user-destdir installation support. --- misc/openoffice2-bin/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'misc') diff --git a/misc/openoffice2-bin/Makefile b/misc/openoffice2-bin/Makefile index d7597497e18..5ad2adb17be 100644 --- a/misc/openoffice2-bin/Makefile +++ b/misc/openoffice2-bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2009/12/06 10:11:14 bad Exp $ +# $NetBSD: Makefile,v 1.43 2011/03/08 12:10:01 obache Exp $ DISTNAME= openoffice2-bin # overridden below PKGNAME= openoffice2-bin-${OO_RELEASE} @@ -17,6 +17,8 @@ CONFLICTS+= openoffice2-[0-9]* CONFLICTS+= openoffice3-[0-9]* CONFLICTS+= openoffice-linux-[0-9]* +PKG_DESTDIR_SUPPORT= user-destdir + OO_VER= 2.4 OO_RELEASE= 2.4.3 PLIST_SUBST+= VER=${OO_VER:Q} @@ -37,7 +39,7 @@ EMUL_REQD= suse>=10.0 EMUL_PKG_FMT= rpm RPMFILES= ${WRKSRC}/RPMS/*.rpm -RPM2PKG_PREFIX= ${PREFIX} +RPM2PKG_PREFIX= ${DESTDIR}${PREFIX} RPM2PKG_SUBPREFIX= # empty RPM2PKG_STAGE= do-install RUN_LDCONFIG= no @@ -55,21 +57,23 @@ DISTNAME= OOo_${OO_RELEASE}_SolarisSparc_install_en-US WRKSRC= ${WRKDIR}/OOH680_m21_native_packed-1_en-US.9421/packages .endif +INSTALLATION_DIRS= bin + .include "options.mk" do-install: uniq ${RPM2PKG_PLIST} > ${WRKDIR}/PLIST .if defined(PKG_JVM) && !empty(PKG_JVM) - ${RM} -f ${PREFIX}/bin/soffice + ${RM} -f ${DESTDIR}${PREFIX}/bin/soffice ${SED} -e "s|@@PREFIX@@|${PREFIX}|g" -e "s|@@OO_VER@@|${OO_VER}|g" \ -e "s|@@JAVA_HOME@@|${PKG_JAVA_HOME}|g" \ - < ${FILESDIR}/soffice > ${PREFIX}/bin/soffice - ${CHMOD} +x ${PREFIX}/bin/soffice + < ${FILESDIR}/soffice > ${DESTDIR}${PREFIX}/bin/soffice + ${CHMOD} +x ${DESTDIR}${PREFIX}/bin/soffice .else - ${LN} -sf ../openoffice.org${OO_VER}/program/soffice ${PREFIX}/bin/soffice + ${LN} -sf ../openoffice.org${OO_VER}/program/soffice ${DESTDIR}${PREFIX}/bin/soffice .endif .for i in scalc sdraw simpress smath spadmin swriter - ${LN} -sf ../openoffice.org${OO_VER}/program/${i} ${PREFIX}/bin/${i} + ${LN} -sf ../openoffice.org${OO_VER}/program/${i} ${DESTDIR}${PREFIX}/bin/${i} .endfor .include "../../mk/bsd.pkg.mk" -- cgit v1.2.3