Update tinyproxy to 1.6.4 (#4007)
[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.1.23
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:=4ce09b1dce09b6b9398af0daae9adf63
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
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 )
63 endef
64
65 define Build/Compile
66 rm -rf $(PKG_INSTALL_DIR)
67 mkdir -p $(PKG_INSTALL_DIR)
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 $(TARGET_CONFIGURE_OPTS) \
70 DSTROOT="$(PKG_INSTALL_DIR)" \
71 STRIP="/bin/true" \
72 all install
73 endef
74
75 define Package/cups/install
76 rm -rf $(1)/etc/cups
77 $(INSTALL_DIR) $(1)/etc/cups
78 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
79 rm -rf $(1)/etc/cups/certs
80 ln -sf /tmp $(1)/etc/cups/certs
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
83 rm -f $(1)/usr/bin/cups-config
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
87 $(INSTALL_DIR) $(1)/usr/share/cups/templates
88 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
89 $(INSTALL_DIR) $(1)/usr/share/doc/cups
90 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
91 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
94 # overwrite default config with our own
95 $(CP) ./files/etc/cups/* $(1)/etc/cups/
96 # install initscript with priority 60
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
99 endef
100
101 define Build/InstallDev
102 $(INSTALL_DIR) $(2)/bin
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
104 $(INSTALL_DIR) $(1)/usr/include
105 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
106 $(INSTALL_DIR) $(1)/usr/lib
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(1)/usr/lib/
108 endef
109
110 $(eval $(call BuildPackage,cups))