3e51a83226f5486c4910fbe288f1fe4ac9bdf961
[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 --enable-shared \
53 --disable-slp \
54 --disable-gnutls \
55 --disable-openssl \
56 --disable-cdsassl \
57 --disable-ssl \
58 --disable-slp, \
59 UNAME="Linux" \
60 )
61 endef
62
63 define Build/Compile
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DSTROOT="$(PKG_INSTALL_DIR)" \
68 STRIP="/bin/true" \
69 all install
70 if [ -d $(PKG_INSTALL_DIR)/usr/libexec ]; then \
71 rm -rf $(PKG_INSTALL_DIR)/usr/lib; \
72 mv $(PKG_INSTALL_DIR)/usr/libexec $(PKG_INSTALL_DIR)/usr/lib; \
73 fi
74 endef
75
76 define Package/cups/install
77 rm -rf $(1)/etc/cups
78 install -d -m0755 $(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 -d -m0755 $(1)/usr/bin
83 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
84 rm -f $(1)/usr/bin/cups-config
85 install -d -m0755 $(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 -d -m0755 $(1)/usr/share/cups/templates
89 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
90 install -d -m0755 $(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 -d -m0755 $(1)/usr/sbin
94 $(CP) $(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 -d -m0755 $(1)/etc/init.d
99 install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
100 endef
101
102 define Build/InstallDev
103 mkdir -p $(STAGING_DIR)/usr/bin
104 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
105 mkdir -p $(STAGING_DIR)/usr/include
106 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
107 mkdir -p $(STAGING_DIR)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
109 endef
110
111 define Build/UninstallDev
112 rm -rf \
113 $(STAGING_DIR)/usr/bin/cups-config \
114 $(STAGING_DIR)/usr/include/cups \
115 $(STAGING_DIR)/usr/lib/libcups.{a,so*}
116 endef
117
118 $(eval $(call BuildPackage,cups))