Upgrade cups to 1.3.7
[openwrt/svn-archive/archive.git] / net / cups / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=cups
12 PKG_VERSION:=1.3.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
16 PKG_SOURCE_URL:= \
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
21
22 PKG_BUILD_DEPENDS:=zlib
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/cups
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+zlib +libpthread +libpng +libjpeg
30 TITLE:=Common UNIX Printing System
31 URL:=http://www.cups.org/
32 SUBMENU:=printing
33 endef
34
35 define Package/cups/description
36 A printer spooling system for devices with USB or LP support.
37 endef
38
39 define Package/cups/conffiles
40 /etc/cups/classes.conf
41 /etc/cups/client.conf
42 /etc/cups/cupsd.conf
43 /etc/cups/printers.conf
44 endef
45
46 define Build/Configure
47 $(call Build/Configure/Default, \
48 --with-cups-user=root \
49 --with-cups-group=root \
50 --without-perl \
51 --without-python \
52 --without-php \
53 --enable-shared \
54 --disable-pam \
55 --disable-slp \
56 --disable-gnutls \
57 --disable-openssl \
58 --disable-cdsassl \
59 --disable-ssl \
60 --disable-slp, \
61 UNAME="Linux" \
62 LIBS="-L$(STAGING_DIR)/usr/lib -lz -lpng -ljpeg" \
63 )
64 endef
65
66 define Build/Compile
67 rm -rf $(PKG_INSTALL_DIR)
68 mkdir -p $(PKG_INSTALL_DIR)
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 $(TARGET_CONFIGURE_OPTS) \
71 DSTROOT="$(PKG_INSTALL_DIR)" \
72 STRIP="/bin/true" \
73 all install
74 endef
75
76 define Package/cups/install
77 rm -rf $(1)/etc/cups
78 $(INSTALL_DIR) $(1)/etc/cups
79 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
80 rm -rf $(1)/etc/cups/certs
81 ln -sf /tmp $(1)/etc/cups/certs
82 $(INSTALL_DIR) $(1)/usr/bin
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
84 rm -f $(1)/usr/bin/cups-config
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so* $(1)/usr/lib/
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
88 $(INSTALL_DIR) $(1)/usr/share/cups/templates
89 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
90 $(INSTALL_DIR) $(1)/usr/share/doc/cups
91 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
92 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
93 $(INSTALL_DIR) $(1)/usr/sbin
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
95 # overwrite default config with our own
96 $(CP) ./files/etc/cups/* $(1)/etc/cups/
97 # install initscript with priority 60
98 $(INSTALL_DIR) $(1)/etc/init.d
99 $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
100 endef
101
102 define Build/InstallDev
103 $(INSTALL_DIR) $(2)/bin
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
105 $(INSTALL_DIR) $(1)/usr/include
106 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
107 $(INSTALL_DIR) $(1)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so* $(1)/usr/lib/
109 endef
110
111 $(eval $(call BuildPackage,cups))