diff options
Diffstat (limited to 'print/hplip-plugin/Makefile')
-rw-r--r-- | print/hplip-plugin/Makefile | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/print/hplip-plugin/Makefile b/print/hplip-plugin/Makefile index 53245057243b..e73097a936fc 100644 --- a/print/hplip-plugin/Makefile +++ b/print/hplip-plugin/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= hplip-plugin -PORTVERSION= 3.14.1 +PORTVERSION= 3.14.4 CATEGORIES= print MASTER_SITES= http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/ DISTNAME= hplip-${DISTVERSION}-plugin @@ -19,16 +19,32 @@ RESTRICTED= User must accept the license terms NO_PACKAGE= ${RESTRICTED} IS_INTERACTIVE= yes WRKSRC= ${WRKDIR}/plugin_tmp +HPLIP_FAKEDIR= ${WRKDIR}/hplip_fakedir +MAKE_ENV= HOME=/dev/null ONLY_FOR_ARCHS= amd64 i386 -NO_STAGE= yes +PLUGIN_LINKS= fax/plugins/fax_marvell \ + prnt/plugins/hbpl1 \ + prnt/plugins/lj \ + scan/plugins/bb_marvell \ + scan/plugins/bb_soap \ + scan/plugins/bb_soapht + +PLUGIN_DIRS= data/firmware \ + data/plugins \ + fax/plugins \ + prnt/plugins \ + scan/plugins + +PLIST_SUB+= LINARCH="${LINARCH}" + .include <bsd.port.pre.mk> .if ${ARCH} == "i386" -PLIST_SUB+= LINARCH="x86_32" +LINARCH= x86_32 .elif ${ARCH} == "amd64" -PLIST_SUB+= LINARCH="x86_64" +LINARCH= x86_64 .endif do-extract: @@ -39,10 +55,25 @@ post-patch: # ${REINPLACE_CMD} -e 's|ok, ans = tui.enter_yes_no.*|ok, ans = 1, 1|' \ # ${WRKSRC}/plugin_install.py ${REINPLACE_CMD} -e 's|rules,||;s|rules_alt,||' ${WRKSRC}/plugin.spec - ${REINPLACE_CMD} -e 's|/etc/hp|${PREFIX}&|g' \ + ${REINPLACE_CMD} -e 's|/etc/hp|${HPLIP_FAKEDIR}|g' \ ${WRKSRC}/plugin_install.py do-install: - cd ${WRKSRC} && ${PYTHON_CMD} -B plugin_install.py +# fake hplip installation + ${MKDIR} ${HPLIP_FAKEDIR} + ${SED} -e 's,${LOCALBASE}/share/hplip,${HPLIP_FAKEDIR},' \ + ${LOCALBASE}/etc/hp/hplip.conf > ${HPLIP_FAKEDIR}/hplip.conf + ${MKDIR} ${HPLIP_FAKEDIR} + ${LN} -sf ${LOCALBASE}/share/hplip/base ${HPLIP_FAKEDIR} + ${LN} -sf ${LOCALBASE}/share/hplip/prnt ${HPLIP_FAKEDIR} + ${CP} -R ${LOCALBASE}/share/hplip/installer ${HPLIP_FAKEDIR} + ${REINPLACE_CMD} -e 's,HOMEDIR = .*,HOMEDIR = "${STAGEDIR}${PREFIX}/share/hplip",' \ + ${HPLIP_FAKEDIR}/installer/pluginhandler.py +# install hplip-plugin + ${MKDIR} ${PLUGIN_DIRS:S,^,${STAGEDIR}${PREFIX}/share/hplip/,} + (cd ${WRKSRC} && ${PYTHON_CMD} -B plugin_install.py) +.for i in ${PLUGIN_LINKS} + ${LN} -sf ${i:T}-${LINARCH}.so ${STAGEDIR}${PREFIX}/share/hplip/${i}.so +.endfor .include <bsd.port.post.mk> |