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 \
62 rm -rf $(PKG_INSTALL_DIR)
63 mkdir -p $(PKG_INSTALL_DIR)
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DSTROOT="$(PKG_INSTALL_DIR)" \
70 define Package/cups/install
72 install -d -m0755 $(1)/etc/cups
73 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
74 rm -rf $(1)/etc/cups/certs
75 ln -sf /tmp $(1)/etc/cups/certs
76 install -d -m0755 $(1)/usr/bin
77 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
78 rm -f $(1)/usr/bin/cups-config
79 install -d -m0755 $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
82 install -d -m0755 $(1)/usr/share/cups/templates
83 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
84 install -d -m0755 $(1)/usr/share/doc/cups
85 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
86 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
87 install -d -m0755 $(1)/usr/sbin
88 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
89 # overwrite default config with our own
90 $(CP) ./files/etc/cups/* $(1)/etc/cups/
91 # install initscript with priority 60
92 install -d -m0755 $(1)/etc/init.d
93 install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
94 find $(1) -name CVS | xargs rm -rf
96 $(IPKG_BUILD) $(1) $(PACKAGE_DIR)
99 define Build/InstallDev
100 mkdir -p $(STAGING_DIR)/usr/bin
101 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
102 mkdir -p $(STAGING_DIR)/usr/include
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
104 mkdir -p $(STAGING_DIR)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
108 define Build/UninstallDev
110 $(STAGING_DIR)/usr/bin/cups-config \
111 $(STAGING_DIR)/usr/include/cups \
112 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
115 $(eval $(call BuildPackage,cups))