2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-source.
tar.bz2
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
)
19 PKG_MD5SUM
:=d95e2d588e3d36e563027a963b117b1b
21 PKG_BUILD_DEPENDS
:=zlib
23 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
25 include $(INCLUDE_DIR
)/package.mk
30 DEPENDS
:=+zlib
+libpthread
+libpng
+libjpeg
+libstdcpp
31 TITLE
:=Common UNIX Printing System
32 URL
:=http
://www.cups.org
/
36 define Package
/cups
/description
37 A printer spooling system for devices with USB or LP support.
40 define Package
/cups
/conffiles
41 /etc
/cups
/classes.conf
44 /etc
/cups
/printers.conf
47 define Build
/Configure
48 $(call Build
/Configure
/Default
, \
49 --with-cups-user
="nobody" \
50 --with-cups-group
="nogroup" \
69 LIBS
="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 $(TARGET_CONFIGURE_OPTS
) \
76 DSTROOT
="$(PKG_INSTALL_DIR)" \
81 define Package
/cups
/install
83 $(INSTALL_DIR
) $(1)/etc
/cups
84 $(CP
) $(PKG_INSTALL_DIR
)/etc
/cups
/* $(1)/etc
/cups
/
85 rm -rf
$(1)/etc
/cups
/certs
86 ln
-sf
/tmp
$(1)/etc
/cups
/certs
87 $(INSTALL_DIR
) $(1)/usr
/bin
88 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
89 rm -f
$(1)/usr
/bin
/cups-config
90 $(INSTALL_DIR
) $(1)/usr
/lib
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups
*.so
* $(1)/usr
/lib
/
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/cups
$(1)/usr
/lib
/
93 $(INSTALL_DIR
) $(1)/usr
/share
/cups
/templates
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/cups
/templates
/*.tmpl
$(1)/usr
/share
/cups
/templates
/
95 $(INSTALL_DIR
) $(1)/usr
/share
/cups
/mime
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/cups
/mime
/* $(1)/usr
/share
/cups
/mime
/
97 $(INSTALL_DIR
) $(1)/usr
/share
/doc
/cups
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/index.html
$(1)/usr
/share
/doc
/cups
/
99 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/*.css
$(1)/usr
/share
/doc
/cups
/
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/doc
/cups
/images
$(1)/usr
/share
/doc
/cups
/
101 $(INSTALL_DIR
) $(1)/usr
/sbin
103 $(PKG_INSTALL_DIR
)/usr
/sbin
/{accept
,cupsaddsmb
,cupsctl
,cupsd
,cupsfilter
,lpadmin
,lpc
,lpinfo
,lpmove
} \
105 (cd
$(1)/usr
/sbin
; ln
-sf accept reject
; ln
-sf accept cupsenable
; ln
-sf accept cupsdisable
;)
106 # overwrite default config with our own
107 $(CP
) .
/files
/etc
/cups
/* $(1)/etc
/cups
/
108 # install initscript with priority 60
109 $(INSTALL_DIR
) $(1)/etc
/init.d
110 $(INSTALL_BIN
) .
/files
/cupsd.init
$(1)/etc
/init.d
/cupsd
113 define Build
/InstallDev
114 $(INSTALL_DIR
) $(2)/bin
115 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/cups-config
$(2)/bin
/
116 $(INSTALL_DIR
) $(1)/usr
/include
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/cups
$(1)/usr
/include/
118 $(INSTALL_DIR
) $(1)/usr
/lib
119 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcups
*.so
* $(1)/usr
/lib
/
122 $(eval
$(call BuildPackage
,cups
))