fix cups mirrors
[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 ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
17 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION) \
18 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
20 PKG_CAT:=bzcat
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 PKG_BUILDDEP:=zlib
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/cups
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS:=+zlib
33 TITLE:=Common UNIX Printing System
34 DESCRIPTION:=A printer spooling system for devices with USB or LP support
35 URL:=http://www.cups.org/
36 endef
37
38 define Package/cups/conffiles
39 /etc/cups/classes.conf
40 /etc/cups/client.conf
41 /etc/cups/cupsd.conf
42 /etc/cups/printers.conf
43 endef
44
45 define Build/Configure
46 $(call Build/Configure/Default, --with-gnu-ld \
47 --with-cups-user=root \
48 --with-cups-group=root \
49 --without-perl \
50 --without-python \
51 --without-php \
52 --disable-slp \
53 --disable-gnutls \
54 --disable-openssl \
55 --disable-cdsassl \
56 --disable-ssl \
57 --disable-slp \
58 )
59 endef
60
61 define Build/Compile
62 rm -rf $(PKG_INSTALL_DIR)
63 mkdir -p $(PKG_INSTALL_DIR)
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DSTROOT="$(PKG_INSTALL_DIR)" \
66 STRIP="/bin/true" \
67 all install
68 endef
69
70 define Package/cups/install
71 rm -rf $(1)/etc/cups
72 install -d -m0755 $(1)/etc/cups
73 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
74 rm -rf $(1)/etc/cups/certs
75 ln -sf /tmp $(1)/etc/cups/certs
76 install -d -m0755 $(1)/usr/bin
77 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
78 rm -f $(1)/usr/bin/cups-config
79 install -d -m0755 $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
82 install -d -m0755 $(1)/usr/share/cups/templates
83 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
84 install -d -m0755 $(1)/usr/share/doc/cups
85 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
86 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
87 install -d -m0755 $(1)/usr/sbin
88 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
89 # overwrite default config with our own
90 $(CP) ./files/etc/cups/* $(1)/etc/cups/
91 # install initscript with priority 60
92 install -d -m0755 $(1)/etc/init.d
93 install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
94 find $(1) -name CVS | xargs rm -rf
95 $(RSTRIP) $(1)
96 $(IPKG_BUILD) $(1) $(PACKAGE_DIR)
97 endef
98
99 define Build/InstallDev
100 mkdir -p $(STAGING_DIR)/usr/bin
101 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
102 mkdir -p $(STAGING_DIR)/usr/include
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
104 mkdir -p $(STAGING_DIR)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
106 endef
107
108 define Build/UninstallDev
109 rm -rf \
110 $(STAGING_DIR)/usr/bin/cups-config \
111 $(STAGING_DIR)/usr/include/cups \
112 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
113 endef
114
115 $(eval $(call BuildPackage,cups))