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.

98 lines
2.6 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.12
  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:=0f61ab449e4748a24c6ab355b481ff7691247a140d327b2b7526fce34b7f9aa8
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_LICENSE_FILES:=LICENSE.txt
  18. PKG_CPE_ID:=cpe:/a:apple:cups
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libcups/Default
  21. URL:=http://www.cups.org/
  22. SUBMENU:=Printing
  23. endef
  24. define Package/libcups
  25. $(call Package/cups/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. DEPENDS:=+zlib +libpthread +libpng +libjpeg +libusb-1.0
  29. TITLE:=Common UNIX Printing System - Core library
  30. BUILDONLY:=1
  31. endef
  32. define Package/libcups/description
  33. Common UNIX Printing System - Core library
  34. endef
  35. TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
  36. CONFIGURE_ARGS+=--with-cups-user="nobody" \
  37. --with-cups-group="nogroup" \
  38. --with-components="core" \
  39. --with-pdftops="none" \
  40. --without-perl \
  41. --without-python \
  42. --without-php \
  43. --enable-shared \
  44. --enable-image \
  45. --enable-libusb \
  46. --disable-acl \
  47. --disable-dbus \
  48. --disable-dnssd \
  49. --disable-launchd \
  50. --disable-ldap \
  51. --disable-pam \
  52. --disable-slp \
  53. --disable-gnutls \
  54. --disable-openssl \
  55. --disable-cdsassl \
  56. --disable-ssl \
  57. --disable-gssapi \
  58. --disable-tiff \
  59. UNAME="Linux" \
  60. LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg"
  61. define Build/Compile
  62. $(MAKE) -C $(PKG_BUILD_DIR)/cups \
  63. $(TARGET_CONFIGURE_OPTS) \
  64. DSTROOT="$(PKG_INSTALL_DIR)" \
  65. STRIP="/bin/true" \
  66. libcups.so.2 install-libs install-headers
  67. $(MAKE) -C $(PKG_BUILD_DIR)/filter \
  68. $(TARGET_CONFIGURE_OPTS) \
  69. DSTROOT="$(PKG_INSTALL_DIR)" \
  70. STRIP="/bin/true" \
  71. libcupsimage.so.2 install-libs install-headers
  72. $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
  73. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin
  74. endef
  75. define Build/InstallDev
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(1)/usr/bin/
  78. $(INSTALL_DIR) $(2)/bin
  79. $(LN) $(STAGING_DIR)/usr/bin/cups-config $(2)/bin
  80. $(INSTALL_DIR) $(1)/usr/include
  81. $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/
  84. endef
  85. $(eval $(call BuildPackage,libcups))