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
:=db4a45a17104f10f3ee599d88267c9e5
22 PKG_BUILD_DEPENDS
:=zlib
24 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
26 include $(INCLUDE_DIR
)/package.mk
31 DEPENDS
:=+zlib
+libpthread
+libpng
+libjpeg
32 TITLE
:=Common UNIX Printing System
33 URL
:=http
://www.cups.org
/
37 define Package
/cups
/description
38 A printer spooling system for devices with USB or LP support.
41 define Package
/cups
/conffiles
42 /etc
/cups
/classes.conf
45 /etc
/cups
/printers.conf
48 define Build
/Configure
49 $(call Build
/Configure
/Default
, \
50 --with-cups-user
=root \
51 --with-cups-group
=root \
66 LIBS
="-L$(STAGING_DIR)/usr/lib -lz -lpng -ljpeg" \
71 rm -rf
$(PKG_INSTALL_DIR
)
72 mkdir
-p
$(PKG_INSTALL_DIR
)
73 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
74 $(TARGET_CONFIGURE_OPTS
) \
75 DSTROOT
="$(PKG_INSTALL_DIR)" \
80 define Package
/cups
/install
82 $(INSTALL_DIR
) $(1)/etc
/cups
83 $(CP
) $(PKG_INSTALL_DIR
)/etc
/cups
/* $(1)/etc
/cups
/
84 rm -rf
$(1)/etc
/cups
/certs
85 ln
-sf
/tmp
$(1)/etc
/cups
/certs
86 $(INSTALL_DIR
) $(1)/usr
/bin
87 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
88 rm -f
$(1)/usr
/bin
/cups-config
89 $(INSTALL_DIR
) $(1)/usr
/lib
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups.so
* $(1)/usr
/lib
/
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/cups
$(1)/usr
/lib
/
92 $(INSTALL_DIR
) $(1)/usr
/share
/cups
/templates
93 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/cups
/templates
/*.tmpl
$(1)/usr
/share
/cups
/templates
/
94 $(INSTALL_DIR
) $(1)/usr
/share
/doc
/cups
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/index.html
$(1)/usr
/share
/doc
/cups
/
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/*.css
$(1)/usr
/share
/doc
/cups
/
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/images
$(1)/usr
/share
/doc
/cups
/
98 $(INSTALL_DIR
) $(1)/usr
/sbin
100 $(PKG_INSTALL_DIR
)/usr
/sbin
/{accept
,cupsaddsmb
,cupsctl
,cupsd
,cupsfilter
,lpadmin
,lpc
,lpinfo
,lpmove
} \
102 (cd
$(1)/usr
/sbin
; ln
-s accept reject
; ln
-s accept cupsenable
; ln
-s accept cupsdisable
;)
103 # overwrite default config with our own
104 $(CP
) .
/files
/etc
/cups
/* $(1)/etc
/cups
/
105 # install initscript with priority 60
106 $(INSTALL_DIR
) $(1)/etc
/init.d
107 $(INSTALL_BIN
) .
/files
/cupsd.init
$(1)/etc
/init.d
/cupsd
110 define Build
/InstallDev
111 $(INSTALL_DIR
) $(2)/bin
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cups-config
$(2)/bin
/
113 $(INSTALL_DIR
) $(1)/usr
/include
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/cups
$(1)/usr
/include/
115 $(INSTALL_DIR
) $(1)/usr
/lib
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups.so
* $(1)/usr
/lib
/
119 $(eval
$(call BuildPackage
,cups
))