openbsd-ports/print/hplip/Makefile

204 lines
5.6 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.136 2016/01/05 13:24:05 ajacoutot Exp $
2015-07-19 10:40:54 -04:00
PORTROACH= skipv:${V}_py2.5
2015-09-16 02:25:39 -04:00
SHARED_ONLY= Yes
COMMENT-main= HP Linux Imaging and Printing
2013-08-21 10:58:36 -04:00
COMMENT-common= HPLIP applications common files
COMMENT-hpaio= HP sane(7) scanner backend
COMMENT-hpcups= HP native CUPS driver
2013-08-21 10:58:36 -04:00
COMMENT-hpijs= HP ghostscript driver (spooler independent)
COMMENT-gui= HPLIP graphical tools
2015-11-17 03:57:45 -05:00
V= 3.15.11
DISTNAME= hplip-${V}
SUBST_VARS= V
PKGNAME-main= ${DISTNAME}
2013-08-21 10:58:36 -04:00
PKGNAME-common= hplip-common-${V}
PKGNAME-hpaio= hpaio-${V}
PKGNAME-hpcups= hpcups-${V}
2013-08-21 10:58:36 -04:00
PKGNAME-hpijs= hpijs-${V}
PKGNAME-gui= hplip-gui-${V}
REVISION-main= 0
2015-11-17 03:57:45 -05:00
SHARED_LIBS += hpdiscovery 0.0 # 0.1
2015-04-17 00:18:13 -04:00
SHARED_LIBS += hpmud 2.0 # 0.6
SHARED_LIBS += hpipp 0.0 # 0.1
SHARED_LIBS += hpip 2.0 # 0.1
CATEGORIES= print
HOMEPAGE= http://hplipopensource.com/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# GPLv2 - MIT (backend) - BSD (hpijs)
PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hplip/}
2013-08-21 10:58:36 -04:00
MULTI_PACKAGES= -main -common -hpaio -hpcups -hpijs -gui
MODULES= devel/gettext \
lang/python
MODPY_RUNDEP= No
cWANTLIB += crypto m pthread
### -main
WANTLIB-main += ${WANTLIB} ${cWANTLIB}
WANTLIB-main += avahi-client avahi-common cups dbus-1 hpmud netsnmp
2015-02-05 12:34:33 -05:00
WANTLIB-main += ffi gmp gnutls hogweed nettle p11-kit tasn1 usb-1.0 z
2015-11-17 03:57:45 -05:00
WANTLIB-main += hpdiscovery hpipp
LIB_DEPENDS-main= ${LIB_DEPENDS} \
print/cups,-libs \
print/hplip,-common
RUN_DEPENDS-main= ${MODPY_RUN_DEPENDS} \
${MODGETTEXT_RUN_DEPENDS} \
devel/py-gobject \
print/py-reportlab \
x11/dbus-python \
graphics/py-Pillow \
print/hplip,-hpcups \
print/hplip,-hpaio
# package is only useful if cups is installed
RUN_DEPENDS-main += print/cups
2013-08-21 10:58:36 -04:00
### -common
WANTLIB-common += ${cWANTLIB} netsnmp usb-1.0
LIB_DEPENDS-common= net/net-snmp \
devel/libusb1
RUN_DEPENDS-common= #empty
### -hpaio
WANTLIB-hpaio += ${WANTLIB} ${cWANTLIB}
WANTLIB-hpaio += avahi-client avahi-common cups dbus-1 ffi gmp gnutls
WANTLIB-hpaio += hogweed hpip hpipp hpmud jpeg netsnmp nettle p11-kit
2015-11-17 03:57:45 -05:00
WANTLIB-hpaio += sane tasn1 tiff usb usb-1.0 z hpdiscovery
LIB_DEPENDS-hpaio= print/hplip,-common \
print/cups,-libs \
graphics/sane-backends
RUN_DEPENDS-hpaio= ${MODGETTEXT_RUN_DEPENDS}
### -hpcups
2015-11-17 03:57:45 -05:00
WANTLIB-hpcups += ${WANTLIB} ${cWANTLIB} z netsnmp hpdiscovery
2012-01-17 04:54:27 -05:00
WANTLIB-hpcups += c jpeg stdc++ hpip cups cupsimage dbus-1
2015-02-05 12:34:33 -05:00
WANTLIB-hpcups += z usb-1.0 avahi-client avahi-common hpmud
WANTLIB-hpcups += ffi gmp gnutls hogweed nettle p11-kit tasn1
LIB_DEPENDS-hpcups= graphics/jpeg \
print/hplip,-common \
print/cups,-libs \
x11/dbus
RUN_DEPENDS-hpcups= ${MODGETTEXT_RUN_DEPENDS}
2013-08-21 10:58:36 -04:00
### -hpijs
2015-11-17 03:57:45 -05:00
WANTLIB-hpijs += ${cWANTLIB} hpip usb-1.0 hpdiscovery
2013-08-21 10:58:36 -04:00
WANTLIB-hpijs += c jpeg netsnmp stdc++ dbus-1 hpmud
2013-08-21 10:58:36 -04:00
LIB_DEPENDS-hpijs= print/hplip,-common \
graphics/jpeg \
x11/dbus
2013-12-12 09:53:43 -05:00
# foomatic-rip(1), foomatic-db(-engine)
RUN_DEPENDS-hpijs += print/cups-filters
### -gui
WANTLIB-gui += #empty
RUN_DEPENDS-gui= x11/py-qt4 \
print/hplip,-main \
devel/xdg-utils \
devel/desktop-file-utils \
sysutils/usbutils \
devel/py-notify
2013-08-22 06:26:26 -04:00
# hp-toolbox, Actions, Scan
RUN_DEPENDS-gui += graphics/xsane
LIB_DEPENDS-gui= #empty
FAKE_FLAGS= hplip_confdir=${PREFIX}/share/examples/hplip/hp \
hplip_statedir=${PREFIX}/share/examples/hplip/db \
mimedir=${PREFIX}/share/examples/hplip/cups \
hplip_systraydir=${PREFIX}/share/examples/hplip/xdg/autostart
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-hpppddir=${PREFIX}/share/foomatic/db/source/PPD/HP \
--with-cupsbackenddir=${PREFIX}/libexec/cups/backend \
--with-cupsfilterdir=${PREFIX}/libexec/cups/filter \
--with-icondir=${PREFIX}/share/applications \
--with-docdir=${PREFIX}/share/doc/hplip \
--enable-hpijs-install \
--enable-foomatic-ppd-install \
--enable-foomatic-drv-install
pre-configure:
find ${WRKSRC} -name \*.py | \
xargs perl -pi -e 's,(/usr/bin/python|/usr/bin/env python),${MODPY_BIN},g'
2015-08-21 10:50:24 -04:00
sed -i 's,/usr/bin/python,${MODPY_BIN},g' \
2010-11-25 06:24:16 -05:00
${WRKSRC}/fax/filters/pstotiff
2015-02-05 12:34:33 -05:00
${SUBST_CMD} \
${WRKSRC}/Makefile.in \
2015-02-05 12:34:33 -05:00
${WRKSRC}/prnt/cups.py \
${WRKSRC}/prnt/filters/hpps \
${WRKSRC}/prnt/hpcups/HPCupsFilter.cpp \
${WRKSRC}/prnt/hpijs/hpcupsfax.cpp \
${WRKSRC}/prnt/hpijs/hpijs.cpp \
${WRKSRC}/prnt/hpijs/globals.cpp \
${WRKSRC}/doc/troubleshooting.html \
${WRKSRC}/check.py \
${WRKSRC}/ui4/devmgr5.py \
${WRKSRC}/fax/backend/hpfax.py \
${WRKSRC}/base/codes.py \
${WRKSRC}/base/g.py \
2014-06-17 04:51:18 -04:00
${WRKSRC}/base/queues.py \
${WRKSRC}/base/services.py \
2014-06-17 04:51:18 -04:00
${WRKSRC}/base/utils.py \
${WRKSRC}/common/utils.c \
${WRKSRC}/prnt/cups.py \
${WRKSRC}/installer/core_install.py \
${WRKSRC}/doc/upgrading.html \
${WRKSRC}/doc/uninstalling.html \
${WRKSRC}/fax/coverpages.py \
${WRKSRC}/fax/filters/pstotiff \
${WRKSRC}/installer/dcheck.py \
${WRKSRC}/installer/pluginhandler.py \
${WRKSRC}/base/magic.py \
${WRKSRC}/base/utils.py \
${WRKSRC}/scan.py \
${WRKSRC}/setup.py \
${WRKSRC}/ui4/nodevicesdialog.py \
${WRKSRC}/ui/devmgr4.py \
2014-06-17 04:51:18 -04:00
${WRKSRC}/ui/nodevicesform.py \
${WRKSRC}/logcapture.py
post-install:
${SUBST_DATA} ${FILESDIR}/hplip.state \
${PREFIX}/share/examples/hplip/db/hplip.state
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
${PREFIX}/share/hplip
2014-10-08 05:03:00 -04:00
rm -r ${WRKINST}/usr/{lib,share}
2013-09-22 15:00:42 -04:00
rm -r ${WRKINST}/etc/udev
2014-10-08 05:03:00 -04:00
rm -r ${WRKINST}/etc/sane.d
2013-10-15 10:20:58 -04:00
mv ${PREFIX}/share/doc/hplip-${V} ${PREFIX}/share/doc/hplip/html
rm ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/*.{a,la}
rm ${PREFIX}/lib/sane/*.{a,la}
.include <bsd.port.mk>