openbsd-ports/print/cups/Makefile

139 lines
3.8 KiB
Makefile
Raw Normal View History

2012-05-17 06:11:23 -04:00
# $OpenBSD: Makefile,v 1.127 2012/05/17 10:11:23 ajacoutot Exp $
COMMENT= Common Unix Printing System
2012-05-17 06:11:23 -04:00
VERSION= 1.5.3
DISTNAME= cups-${VERSION}-source
PKGNAME= cups-${VERSION}
CATEGORIES= print sysutils
# XXX ghostscript needs to dlopen() libcupsimage.so.5 for the cups device.
SHARED_LIBS+= cupsimage 5.0
SHARED_LIBS+= cups 6.0
SHARED_LIBS+= cupscgi 1.0
SHARED_LIBS+= cupsdriver 1.0
SHARED_LIBS+= cupsmime 1.0
SHARED_LIBS+= cupsppdc 1.0
HOMEPAGE= http://www.cups.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# GPLv2 - LGPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += asn1 c crypto dbus-1 gssapi jpeg krb5 m png pthread
2012-05-17 06:11:23 -04:00
WANTLIB += ssl stdc++ tiff usb-1.0 z
MASTER_SITES= http://ftp.easysw.com/pub/cups/${VERSION}/ \
http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/${VERSION}/ \
ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/${VERSION}/ \
ftp://ftp.easysw.com/pub/cups/${VERSION}/ \
ftp://ftp2.easysw.com/pub/cups/${VERSION}/ \
ftp://ftp3.easysw.com/pub/cups/${VERSION}/
EXTRACT_SUFX= .tar.bz2
WRKDIST= ${WRKDIR}/${DISTNAME:S/-source//}
2010-11-20 04:48:38 -05:00
BUILD_DEPENDS= devel/xdg-utils \
${MODGNU_AUTOMAKE_DEPENDS} \
${MODGNU_AUTOCONF_DEPENDS}
2010-11-20 04:48:38 -05:00
LIB_DEPENDS= graphics/png \
graphics/tiff \
2012-05-17 06:11:23 -04:00
devel/libusb1 \
2010-11-20 04:48:38 -05:00
x11/dbus
LIBS_ENV= LIBcups_VERSION=${LIBcups_VERSION} \
LIBcupscgi_VERSION=${LIBcupscgi_VERSION} \
LIBcupsdriver_VERSION=${LIBcupsdriver_VERSION} \
LIBcupsimage_VERSION=${LIBcupsimage_VERSION} \
LIBcupsmime_VERSION=${LIBcupsmime_VERSION} \
LIBcupsppdc_VERSION=${LIBcupsppdc_VERSION} \
FAKE_FLAGS= BINMODE=${BINMODE} \
SHAREMODE=${SHAREMODE} \
DBUSDIR=${DESTDIR}${PREFIX}/share/examples/cups/dbus-1/system.d \
ICONDIR=${DESTDIR}${PREFIX}/share/icons \
MENUDIR=${DESTDIR}${PREFIX}/share/applications \
SERVERROOT=${DESTDIR}${PREFIX}/share/examples/cups
2012-05-17 06:11:23 -04:00
AUTOCONF_VERSION= 2.68
AUTOMAKE_VERSION= 1.10
USE_GMAKE= Yes
USE_GROFF= Yes
MAKE_ENV= ${LIBS_ENV}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libpng" \
LDFLAGS="-L${LOCALBASE}/lib -pthread" \
${LIBS_ENV}
CONFIGURE_STYLE= gnu dest
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--enable-static \
--with-cups-group=_cups \
--with-cups-user=_cups \
--with-system-groups=wheel \
--with-optim="${CFLAGS}" \
--with-dbusdir=${SYSCONFDIR}/dbus-1 \
--with-pdftops=${LOCALBASE}/bin/gs \
--with-perl="/usr/bin/perl" \
--with-printcap=${SYSCONFDIR}/cups/printcap \
--with-smbconfigfile="samba:///${SYSCONFDIR}/samba/smb.conf" \
--enable-dbus \
--enable-raw-printing \
--enable-libusb \
--disable-cdsassl \
--disable-default-shared \
--disable-dnssd \
--disable-gnutls \
--disable-launchd \
--disable-pam \
--disable-pap \
--disable-slp \
--disable-tcp-wrappers
FLAVORS= ldap
FLAVOR?=
.if ${FLAVOR:L:Mldap}
CONFIGURE_ARGS+= --enable-ldap
2010-11-20 04:48:38 -05:00
WANTLIB += ldap
LIB_DEPENDS+= databases/openldap
.else
CONFIGURE_ARGS+=--disable-ldap
.endif
post-extract:
${INSTALL} -m 555 ${FILESDIR}/krb5-config ${WRKDIR}/bin
pre-configure:
cd ${WRKSRC} && AUTOMAKE_VERSION=${AUTOMAKE_VERSION} AUTOCONF_VERSION=${AUTOCONF_VERSION} aclocal -I config-scripts
cd ${WRKSRC} && AUTOMAKE_VERSION=${AUTOMAKE_VERSION} AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf -I config-scripts
${SUBST_CMD} ${WRKSRC}/Makedefs.in
post-configure:
cd ${WRKBUILD} && perl -pi -e 's|\$${DESTDIR}||g' \
config.h cups-config man/*.man
post-install:
ln -sf ${LOCALBASE}/bin/smbspool \
${PREFIX}/libexec/cups/backend/smb
# Remove desktop file and icons; we don't really need them (it's just a
# launcher for http://localhost:631 and we may actually want to
# configure a remote server); this is needed to prevent a dependency
# loop: cups->gtk+2,-guic->cups
rm -rf ${PREFIX}/share/icons
rm -rf ${PREFIX}/share/applications
.include <bsd.port.mk>