1 # $NetBSD: Makefile,v 1.7 2005/04/14 21:06:44 mrauch Exp $
3 PKGNAME= openoffice2-bin-2.0.0rc2
5 MASTER_SITES= ${MASTER_SITE_OPENOFFICE:=contrib/rc/2.0.0rc2/}
6 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
8 MAINTAINER= mrauch@NetBSD.org
9 HOMEPAGE= http://www.openoffice.org/
10 COMMENT= Integrated office productivity suite (binary pkg)
12 BUILD_DEPENDS+= rpm2pkg>=2.1:../../pkgtools/rpm2pkg
14 RPM2PKG= ${PREFIX}/sbin/rpm2pkg
15 RPM2PKGARGS= -d ${PREFIX} -f ${WRKDIR}/PLIST.nouniq -s 1
18 PLIST_SUBST+= VER=${OO_VER}
19 MESSAGE_SUBST+= VER=${OO_VER}
20 FILES_SUBST+= VER=${OO_VER}
25 CONFLICTS+= staroffice-[0-9]*
26 CONFLICTS+= openoffice-[0-9]*
27 CONFLICTS+= openoffice-bin-[0-9]*
28 CONFLICTS+= openoffice-linux-[0-9]*
30 ONLY_FOR_PLATFORM= NetBSD-1.6*-i386 NetBSD-[2-9]*-i386
31 ONLY_FOR_PLATFORM+= Linux-*-i[3-6]86
36 PLIST_SRC= ${PKGDIR}/PLIST.proglinks
37 PLIST_SRC+= ${WRKDIR}/PLIST
39 .include "../../mk/bsd.prefs.mk"
41 # group together i386, i486, i586 and i686 (for Linux)
43 ARCH= ${MACHINE_ARCH:C/i[3-6]86/i386/g}
46 INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL
47 DEINSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL
49 .if ${OPSYS} == "NetBSD"
50 . if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
51 . if !exists(/emul/svr4/usr/lib/ld.so)
52 PKG_FAIL_REASON= '${PKGNAME} requires Solaris libraries - see compat_svr4(8)'
54 DISTNAME= OOo_2.0.0rc2_051005_SolarisSparc_install
56 . elif ${MACHINE_ARCH} == "i386"
57 DISTNAME= OOo_2.0.0rc2_051005_LinuxIntel_install
58 WRKSRC= ${WRKDIR}/OOO680_m2_native_packed-1_en-US.8964/RPMS
62 .if ${OPSYS} == "Linux"
64 DISTNAME= OOo_2.0.0rc2_051005_LinuxIntel_install
65 WRKSRC= ${WRKDIR}/OOO680_m2_native_packed-1_en-US.8964/RPMS
69 .if ${OPSYS} == "SunOS"
70 .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
71 DISTNAME= OOo_2.0.0rc2_051005_SolarisSparc_install
73 .elif ${MACHINE_ARCH} == "i386"
74 DISTNAME= OOo_2.0.0rc2_051005_SolarisIntel_install
79 # everything specific to your OS/Arch goes into its own Makefile
81 .if exists(Makefile.${OPSYS}.${ARCH})
82 . include "Makefile.${OPSYS}.${ARCH}"
85 .if !defined(DISTNAME)
86 DISTNAME= # Dummy to prevent error from missing DISTNAME
90 ${RM} -f ${WRKDIR}/PLIST.nouniq
91 ${RPM2PKG} ${RPM2PKGARGS} ${WRKSRC}/*.rpm
92 uniq ${WRKDIR}/PLIST.nouniq >${WRKDIR}/PLIST
93 ${RM} -f ${PREFIX}/bin/soffice
94 ${SED} -e "s|@@PREFIX@@|${PREFIX}|g" -e "s|@@OO_VER@@|${OO_VER}|g" \
95 < ${FILESDIR}/soffice > ${PREFIX}/bin/soffice
96 ${CHMOD} +x ${PREFIX}/bin/soffice
97 .for i in scalc sdraw simpress swriter
98 ${LN} -sf ../openoffice.org${OO_VER}/program/${i} ${PREFIX}/bin/${i}
101 .include "../../misc/rpm/buildlink3.mk"
102 .include "../../mk/bsd.pkg.mk"