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
15 PKG_SOURCE_URL
:=http
://ftp.funet.fi
/pub
/mirrors
/ftp.easysw.com
/ftp.easysw.com
/pub
/cups
/$(PKG_VERSION
) \
16 http
://ftp.rz.tu-bs.de
/pub
/mirror
/ftp.easysw.com
/ftp
/pub
/cups
/$(PKG_VERSION
) \
17 ftp
://ftp3.easysw.com
/pub
/cups
/$(PKG_VERSION
)
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-source.
tar.bz2
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
26 include $(INCLUDE_DIR
)/package.mk
32 TITLE
:=Common UNIX Printing System
33 DESCRIPTION
:=A printer spooling system for devices with USB or LP support
34 URL
:=http
://www.cups.org
/
37 define Package
/cups
/conffiles
38 /etc
/cups
/classes.conf
41 /etc
/cups
/printers.conf
44 define Build
/Configure
45 $(call Build
/Configure
/Default
, --with-gnu-ld \
46 --with-cups-user
=root \
47 --with-cups-group
=root \
61 rm -rf
$(PKG_INSTALL_DIR
)
62 mkdir
-p
$(PKG_INSTALL_DIR
)
63 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
64 DSTROOT
="$(PKG_INSTALL_DIR)" \
69 define Package
/cups
/install
71 install -d
-m0755
$(1)/etc
/cups
72 $(CP
) $(PKG_INSTALL_DIR
)/etc
/cups
/* $(1)/etc
/cups
/
73 rm -rf
$(1)/etc
/cups
/certs
74 ln
-sf
/tmp
$(1)/etc
/cups
/certs
75 install -d
-m0755
$(1)/usr
/bin
76 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
77 rm -f
$(1)/usr
/bin
/cups-config
78 install -d
-m0755
$(1)/usr
/lib
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups.so.
* $(1)/usr
/lib
/
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/cups
$(1)/usr
/lib
/
81 install -d
-m0755
$(1)/usr
/share
/cups
/templates
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/cups
/templates
/*.tmpl
$(1)/usr
/share
/cups
/templates
/
83 install -d
-m0755
$(1)/usr
/share
/doc
/cups
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/index.html
$(1)/usr
/share
/doc
/cups
/
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/images
$(1)/usr
/share
/doc
/cups
/
86 install -d
-m0755
$(1)/usr
/sbin
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
88 # overwrite default config with our own
89 $(CP
) .
/files
/etc
/cups
/* $(1)/etc
/cups
/
90 # install initscript with priority 60
91 install -d
-m0755
$(1)/etc
/init.d
92 install -m0755 .
/files
/cupsd.init
$(1)/etc
/init.d
/S60cupsd
93 find
$(1) -name CVS | xargs
rm -rf
95 $(IPKG_BUILD
) $(1) $(PACKAGE_DIR
)
98 define Build
/InstallDev
99 mkdir
-p
$(STAGING_DIR
)/usr
/bin
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/cups-config
$(STAGING_DIR
)/usr
/bin
/
101 mkdir
-p
$(STAGING_DIR
)/usr
/include
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/cups
$(STAGING_DIR
)/usr
/include/
103 mkdir
-p
$(STAGING_DIR
)/usr
/lib
104 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
107 define Build
/UninstallDev
109 $(STAGING_DIR
)/usr
/bin
/cups-config \
110 $(STAGING_DIR
)/usr
/include/cups \
111 $(STAGING_DIR
)/usr
/lib
/libcups.
{a
,so
*}
114 $(eval
$(call BuildPackage
,cups
))