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