move easysw cups servers to the end of the download list - too slow
[openwrt/svn-archive/archive.git] / net / cups / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cups
11 PKG_VERSION:=1.1.23
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63
14
15 PKG_SOURCE_URL:= \
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
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
21 PKG_CAT:=bzcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25
26 PKG_BUILDDEP:=zlib
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/cups
31 SECTION:=net
32 CATEGORY:=Network
33 DEPENDS:=+zlib
34 TITLE:=Common UNIX Printing System
35 DESCRIPTION:=A printer spooling system for devices with USB or LP support
36 URL:=http://www.cups.org/
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, --with-gnu-ld \
48 --with-cups-user=root \
49 --with-cups-group=root \
50 --without-perl \
51 --without-python \
52 --without-php \
53 --enable-shared \
54 --disable-slp \
55 --disable-gnutls \
56 --disable-openssl \
57 --disable-cdsassl \
58 --disable-ssl \
59 --disable-slp, \
60 UNAME="Linux" \
61 )
62 endef
63
64 define Build/Compile
65 rm -rf $(PKG_INSTALL_DIR)
66 mkdir -p $(PKG_INSTALL_DIR)
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 DSTROOT="$(PKG_INSTALL_DIR)" \
69 STRIP="/bin/true" \
70 all install
71 if [ -d $(PKG_INSTALL_DIR)/usr/libexec ]; then \
72 rm -rf $(PKG_INSTALL_DIR)/usr/lib; \
73 mv $(PKG_INSTALL_DIR)/usr/libexec $(PKG_INSTALL_DIR)/usr/lib; \
74 fi
75 endef
76
77 define Package/cups/install
78 rm -rf $(1)/etc/cups
79 install -d -m0755 $(1)/etc/cups
80 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
81 rm -rf $(1)/etc/cups/certs
82 ln -sf /tmp $(1)/etc/cups/certs
83 install -d -m0755 $(1)/usr/bin
84 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
85 rm -f $(1)/usr/bin/cups-config
86 install -d -m0755 $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
89 install -d -m0755 $(1)/usr/share/cups/templates
90 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
91 install -d -m0755 $(1)/usr/share/doc/cups
92 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
93 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
94 install -d -m0755 $(1)/usr/sbin
95 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
96 # overwrite default config with our own
97 $(CP) ./files/etc/cups/* $(1)/etc/cups/
98 # install initscript with priority 60
99 install -d -m0755 $(1)/etc/init.d
100 install -m0755 ./files/cupsd.init $(1)/etc/init.d/cupsd
101 endef
102
103 define Build/InstallDev
104 mkdir -p $(STAGING_DIR)/usr/bin
105 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
106 mkdir -p $(STAGING_DIR)/usr/include
107 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
108 mkdir -p $(STAGING_DIR)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
110 endef
111
112 define Build/UninstallDev
113 rm -rf \
114 $(STAGING_DIR)/usr/bin/cups-config \
115 $(STAGING_DIR)/usr/include/cups \
116 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
117 endef
118
119 $(eval $(call BuildPackage,cups))