Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # $OpenBSD: Makefile,v 1.219 2017/04/10 11:46:32 sthen Exp $
  2. COMMENT-main= Common Unix Printing System
  3. COMMENT-libs= CUPS libraries and headers
  4. VERSION= 2.2.3
  5. GH_ACCOUNT= apple
  6. GH_PROJECT= cups
  7. GH_TAGNAME= v${VERSION}
  8. PKGNAME-main= cups-${VERSION}
  9. PKGNAME-libs= cups-libs-${VERSION}
  10. CATEGORIES= print sysutils
  11. # config-scripts/cups-sharedlibs.m4
  12. SHARED_LIBS+= cupsimage 5.1 # so.2
  13. SHARED_LIBS+= cups 6.4 # so.2
  14. SHARED_LIBS+= cupscgi 1.1 # so.1
  15. SHARED_LIBS+= cupsmime 1.2 # so.1
  16. SHARED_LIBS+= cupsppdc 1.2 # so.1
  17. HOMEPAGE= http://www.cups.org/
  18. MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
  19. # GPLv2 - LGPLv2
  20. PERMIT_PACKAGE_CDROM= Yes
  21. WANTLIB += avahi-client avahi-common gnutls iconv m pthread ${LIBCXX} z
  22. WANTLIB-main += ${WANTLIB}
  23. WANTLIB-main += c cups cupscgi cupsimage cupsmime cupsppdc dbus-1 usb-1.0
  24. MULTI_PACKAGES= -main -libs
  25. BUILD_DEPENDS= ${MODGNU_AUTOMAKE_DEPENDS} \
  26. ${MODGNU_AUTOCONF_DEPENDS}
  27. # bootstrap prevents a cyclic dep: gtk+{2,3}->cups->avahi->gtk+{2,3}
  28. LIB_DEPENDS-libs= net/avahi,no_gui,no_mono,bootstrap \
  29. security/gnutls
  30. LIB_DEPENDS-main= ${BASE_PKGPATH},-libs=${VERSION} \
  31. devel/libusb1
  32. RUN_DEPENDS-main= print/cups-filters
  33. # optional for now
  34. #RUN_DEPENDS-main += graphics/colord
  35. # we don't install the desktop file
  36. #BUILD_DEPENDS += devel/xdg-utils
  37. #RUN_DEPENDS-main += devel/xdg-utils
  38. LIBS_ENV= LIBcups_VERSION=${LIBcups_VERSION} \
  39. LIBcupscgi_VERSION=${LIBcupscgi_VERSION} \
  40. LIBcupsimage_VERSION=${LIBcupsimage_VERSION} \
  41. LIBcupsmime_VERSION=${LIBcupsmime_VERSION} \
  42. LIBcupsppdc_VERSION=${LIBcupsppdc_VERSION} \
  43. FAKE_FLAGS= BUILDROOT=${WRKINST} \
  44. DBUSDIR=${PREFIX}/share/examples/cups/dbus-1 \
  45. ICONDIR=${PREFIX}/share/icons \
  46. MENUDIR=${PREFIX}/share/applications \
  47. SERVERROOT=${WRKINST}${PREFIX}/share/examples/cups
  48. AUTOCONF_VERSION= 2.69
  49. AUTOMAKE_VERSION= 1.15
  50. USE_GMAKE= Yes
  51. MAKE_ENV= ${LIBS_ENV}
  52. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  53. LDFLAGS="-L${LOCALBASE}/lib" \
  54. ${LIBS_ENV}
  55. CONFIGURE_STYLE= gnu
  56. CONFIGURE_ARGS= --enable-static \
  57. --disable-libtool_unsupported \
  58. --with-cups-group=_cups \
  59. --with-cups-user=_cups \
  60. --with-system-groups=wheel \
  61. --with-dbusdir=${SYSCONFDIR}/dbus-1 \
  62. --with-printcap=${SYSCONFDIR}/cups/printcap \
  63. --with-smbconfigfile="samba://${SYSCONFDIR}/samba/smb.conf" \
  64. --disable-cdsassl \
  65. --disable-pam \
  66. --disable-systemd \
  67. --without-java \
  68. --without-php \
  69. --without-python
  70. pre-configure:
  71. cd ${WRKSRC} && \
  72. AUTOMAKE_VERSION=${AUTOMAKE_VERSION} AUTOCONF_VERSION=${AUTOCONF_VERSION} aclocal -I config-scripts
  73. cd ${WRKSRC} && \
  74. AUTOMAKE_VERSION=${AUTOMAKE_VERSION} AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf -I config-scripts
  75. ${SUBST_CMD} ${WRKSRC}/{Makedefs.in,cups/Makefile}
  76. post-configure:
  77. cd ${WRKBUILD} && sed -i 's|\$${DESTDIR}||g' \
  78. config.h cups-config man/*.man
  79. post-install:
  80. ln -sf ${LOCALBASE}/bin/smbspool \
  81. ${PREFIX}/libexec/cups/backend/smb
  82. # used to register as @sample: classes.conf, client.conf, lpoptions,
  83. # printers.conf and subscriptions.conf in the PLIST
  84. touch ${PREFIX}/share/examples/cups/empty.conf
  85. # Remove files now part of cups-filters
  86. rm -f ${PREFIX}/share/cups/banners/*
  87. rm -f ${PREFIX}/share/cups/data/testprint
  88. # Remove desktop file and icons; we don't really need them (it's just a
  89. # launcher for http://localhost:631 and we may actually want to
  90. # configure a remote server); this is needed to prevent a dependency
  91. # loop: cups->gtk+3,-guic->cups
  92. rm -rf ${PREFIX}/share/icons
  93. rm -rf ${PREFIX}/share/applications
  94. # Remove systemV files
  95. rm -rf ${WRKINST}/etc/rc.d/rc*.d
  96. .include <bsd.port.mk>