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 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
17 ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
18 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
28 include $(INCLUDE_DIR)/package.mk
34 TITLE:=Common UNIX Printing System
35 DESCRIPTION:=A printer spooling system for devices with USB or LP support
36 URL:=http://www.cups.org/
39 define Package/cups/conffiles
40 /etc/cups/classes.conf
43 /etc/cups/printers.conf
46 define Build/Configure
47 $(call Build/Configure/Default, --with-gnu-ld \
48 --with-cups-user=root \
49 --with-cups-group=root \
65 rm -rf $(PKG_INSTALL_DIR)
66 mkdir -p $(PKG_INSTALL_DIR)
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 DSTROOT="$(PKG_INSTALL_DIR)" \
71 if [ -d $(PKG_INSTALL_DIR)/usr/libexec ]; then \
72 rm -rf $(PKG_INSTALL_DIR)/usr/lib; \
73 mv $(PKG_INSTALL_DIR)/usr/libexec $(PKG_INSTALL_DIR)/usr/lib; \
77 define Package/cups/install
79 install -d -m0755 $(1)/etc/cups
80 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
81 rm -rf $(1)/etc/cups/certs
82 ln -sf /tmp $(1)/etc/cups/certs
83 install -d -m0755 $(1)/usr/bin
84 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
85 rm -f $(1)/usr/bin/cups-config
86 install -d -m0755 $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
89 install -d -m0755 $(1)/usr/share/cups/templates
90 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
91 install -d -m0755 $(1)/usr/share/doc/cups
92 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
93 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
94 install -d -m0755 $(1)/usr/sbin
95 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
96 # overwrite default config with our own
97 $(CP) ./files/etc/cups/* $(1)/etc/cups/
98 # install initscript with priority 60
99 install -d -m0755 $(1)/etc/init.d
100 install -m0755 ./files/cupsd.init $(1)/etc/init.d/cupsd
103 define Build/InstallDev
104 mkdir -p $(STAGING_DIR)/usr/bin
105 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
106 mkdir -p $(STAGING_DIR)/usr/include
107 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
108 mkdir -p $(STAGING_DIR)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
112 define Build/UninstallDev
114 $(STAGING_DIR)/usr/bin/cups-config \
115 $(STAGING_DIR)/usr/include/cups \
116 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
119 $(eval $(call BuildPackage,cups))