2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
17 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
18 ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
19 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
20 PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
26 PKG_BUILD_DEPENDS:=zlib
28 include $(INCLUDE_DIR)/package.mk
34 TITLE:=Common UNIX Printing System
35 URL:=http://www.cups.org/
39 define Package/cups/description
40 A printer spooling system for devices with USB or LP support.
43 define Package/cups/conffiles
44 /etc/cups/classes.conf
47 /etc/cups/printers.conf
50 define Build/Configure
51 $(call Build/Configure/Default, \
52 --with-cups-user=root \
53 --with-cups-group=root \
70 rm -rf $(PKG_INSTALL_DIR)
71 mkdir -p $(PKG_INSTALL_DIR)
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 $(TARGET_CONFIGURE_OPTS) \
74 DSTROOT="$(PKG_INSTALL_DIR)" \
79 define Package/cups/install
81 $(INSTALL_DIR) $(1)/etc/cups
82 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
83 rm -rf $(1)/etc/cups/certs
84 ln -sf /tmp $(1)/etc/cups/certs
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
87 rm -f $(1)/usr/bin/cups-config
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
91 $(INSTALL_DIR) $(1)/usr/share/cups/templates
92 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
93 $(INSTALL_DIR) $(1)/usr/share/doc/cups
94 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
95 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
96 $(INSTALL_DIR) $(1)/usr/sbin
97 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
98 # overwrite default config with our own
99 $(CP) ./files/etc/cups/* $(1)/etc/cups/
100 # install initscript with priority 60
101 $(INSTALL_DIR) $(1)/etc/init.d
102 $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
105 define Build/InstallDev
106 mkdir -p $(1)/usr/bin
107 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(1)/usr/bin/
108 mkdir -p $(1)/usr/include
109 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
110 mkdir -p $(1)/usr/lib
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(1)/usr/lib/
114 define Build/UninstallDev
116 $(STAGING_DIR)/usr/bin/cups-config \
117 $(STAGING_DIR)/usr/include/cups \
118 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
121 $(eval $(call BuildPackage,cups))