You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. # Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=cups
  10. PKG_VERSION:=2.2.11
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
  13. PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
  14. PKG_HASH:=f58010813fd6903f690cdb0c0b91e4d1bc9e5b9570c28734229ba3ed2908b76c
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_LICENSE_FILES:=LICENSE.txt
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libcups/Default
  20. URL:=http://www.cups.org/
  21. SUBMENU:=Printing
  22. endef
  23. define Package/libcups
  24. $(call Package/cups/Default)
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. DEPENDS:=+zlib +libpthread +libpng +libjpeg +libusb-1.0
  28. TITLE:=Common UNIX Printing System - Core library
  29. endef
  30. define Package/libcups/description
  31. Common UNIX Printing System - Core library
  32. endef
  33. TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
  34. CONFIGURE_ARGS+=--with-cups-user="nobody" \
  35. --with-cups-group="nogroup" \
  36. --with-components="core" \
  37. --with-pdftops="none" \
  38. --without-perl \
  39. --without-python \
  40. --without-php \
  41. --enable-shared \
  42. --enable-image \
  43. --enable-libusb \
  44. --disable-acl \
  45. --disable-dbus \
  46. --disable-dnssd \
  47. --disable-launchd \
  48. --disable-ldap \
  49. --disable-pam \
  50. --disable-slp \
  51. --disable-gnutls \
  52. --disable-openssl \
  53. --disable-cdsassl \
  54. --disable-ssl \
  55. --disable-gssapi \
  56. --disable-tiff \
  57. UNAME="Linux" \
  58. LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg"
  59. define Build/Compile
  60. $(MAKE) -C $(PKG_BUILD_DIR)/cups \
  61. $(TARGET_CONFIGURE_OPTS) \
  62. DSTROOT="$(PKG_INSTALL_DIR)" \
  63. STRIP="/bin/true" \
  64. libcups.so.2 install-libs install-headers
  65. $(MAKE) -C $(PKG_BUILD_DIR)/filter \
  66. $(TARGET_CONFIGURE_OPTS) \
  67. DSTROOT="$(PKG_INSTALL_DIR)" \
  68. STRIP="/bin/true" \
  69. libcupsimage.so.2 install-libs install-headers
  70. $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
  71. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin
  72. endef
  73. define Build/InstallDev
  74. $(INSTALL_DIR) $(2)/usr/bin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/usr/bin/
  76. $(INSTALL_DIR) $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/
  80. endef
  81. $(eval $(call BuildPackage,libcups))