1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63
16 ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
17 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION) \
18 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
27 include $(INCLUDE_DIR)/package.mk
33 TITLE:=Common UNIX Printing System
34 DESCRIPTION:=A printer spooling system for devices with USB or LP support
35 URL:=http://www.cups.org/
38 define Package/cups/conffiles
39 /etc/cups/classes.conf
42 /etc/cups/printers.conf
45 define Build/Configure
46 $(call Build/Configure/Default, --with-gnu-ld \
47 --with-cups-user=root \
48 --with-cups-group=root \
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DSTROOT="$(PKG_INSTALL_DIR)" \
70 if [ -d $(PKG_INSTALL_DIR)/usr/libexec ]; then \
71 rm -rf $(PKG_INSTALL_DIR)/usr/lib; \
72 mv $(PKG_INSTALL_DIR)/usr/libexec $(PKG_INSTALL_DIR)/usr/lib; \
76 define Package/cups/install
78 install -d -m0755 $(1)/etc/cups
79 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
80 rm -rf $(1)/etc/cups/certs
81 ln -sf /tmp $(1)/etc/cups/certs
82 install -d -m0755 $(1)/usr/bin
83 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
84 rm -f $(1)/usr/bin/cups-config
85 install -d -m0755 $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
88 install -d -m0755 $(1)/usr/share/cups/templates
89 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
90 install -d -m0755 $(1)/usr/share/doc/cups
91 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
92 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
93 install -d -m0755 $(1)/usr/sbin
94 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
95 # overwrite default config with our own
96 $(CP) ./files/etc/cups/* $(1)/etc/cups/
97 # install initscript with priority 60
98 install -d -m0755 $(1)/etc/init.d
99 install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
102 define Build/InstallDev
103 mkdir -p $(STAGING_DIR)/usr/bin
104 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
105 mkdir -p $(STAGING_DIR)/usr/include
106 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
107 mkdir -p $(STAGING_DIR)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
111 define Build/UninstallDev
113 $(STAGING_DIR)/usr/bin/cups-config \
114 $(STAGING_DIR)/usr/include/cups \
115 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
118 $(eval $(call BuildPackage,cups))