source: packages/net/cups/Makefile @ 26106

Last change on this file since 26106 was 26106, checked in by cshore, 6 years ago

[net] printing: Removed printing submenu as it had only two entries.

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=cups
11PKG_VERSION:=1.4.4
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
15PKG_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)
19PKG_MD5SUM:=8776403ad60fea9e85eab9c04d88560d
20
21TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
22
23include $(INCLUDE_DIR)/package.mk
24
25define Package/cups
26  SECTION:=net
27  CATEGORY:=Network
28  DEPENDS:=+zlib +libpthread +libpng +libjpeg +libstdcpp
29  TITLE:=Common UNIX Printing System
30  URL:=http://www.cups.org/
31endef
32
33define Package/cups/description
34        A printer spooling system for devices with USB or LP support.
35endef
36
37define Package/cups/conffiles
38/etc/cups/classes.conf
39/etc/cups/client.conf
40/etc/cups/cupsd.conf
41/etc/cups/printers.conf
42endef
43
44define Build/Configure
45        $(call Build/Configure/Default, \
46                --with-cups-user="nobody" \
47                --with-cups-group="nogroup" \
48                --without-perl \
49                --without-python \
50                --without-php \
51                --enable-shared \
52                --enable-image \
53                --disable-dbus \
54                --disable-dnssd \
55                --disable-launchd \
56                --disable-ldap \
57                --disable-pam \
58                --disable-slp \
59                --disable-gnutls \
60                --disable-openssl \
61                --disable-cdsassl \
62                --disable-ssl \
63                --disable-gssapi \
64                --disable-tiff, \
65                UNAME="Linux" \
66                LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \
67        )
68endef
69
70define Build/Compile
71        $(MAKE) -C $(PKG_BUILD_DIR) \
72                $(TARGET_CONFIGURE_OPTS) \
73                DSTROOT="$(PKG_INSTALL_DIR)" \
74                STRIP="/bin/true" \
75                all install
76endef
77
78define Package/cups/install
79        rm -rf $(1)/etc/cups
80        $(INSTALL_DIR) $(1)/etc/cups
81        $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
82        rm -rf $(1)/etc/cups/certs
83        ln -sf /tmp $(1)/etc/cups/certs
84        $(INSTALL_DIR) $(1)/usr/bin
85        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
86        rm -f $(1)/usr/bin/cups-config
87        $(INSTALL_DIR) $(1)/usr/lib
88        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
89        $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
90        $(INSTALL_DIR) $(1)/usr/share/cups/templates
91        $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
92        $(INSTALL_DIR) $(1)/usr/share/cups/mime
93        $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/mime/* $(1)/usr/share/cups/mime/
94        $(INSTALL_DIR) $(1)/usr/share/doc/cups
95        $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
96        $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/*.css $(1)/usr/share/doc/cups/
97        $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
98        $(INSTALL_DIR) $(1)/usr/sbin
99        $(INSTALL_BIN) \
100                $(PKG_INSTALL_DIR)/usr/sbin/{accept,cupsaddsmb,cupsctl,cupsd,cupsfilter,lpadmin,lpc,lpinfo,lpmove} \
101                $(1)/usr/sbin/
102        (cd $(1)/usr/sbin; ln -sf accept reject; ln -sf accept cupsenable; ln -sf accept cupsdisable;)
103        # overwrite default config with our own
104        $(CP) ./files/etc/cups/* $(1)/etc/cups/
105        # install initscript with priority 60
106        $(INSTALL_DIR) $(1)/etc/init.d
107        $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
108endef
109
110define Build/InstallDev
111        $(INSTALL_DIR) $(2)/bin
112        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
113        $(INSTALL_DIR) $(1)/usr/include
114        $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
115        $(INSTALL_DIR) $(1)/usr/lib
116        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
117endef
118
119$(eval $(call BuildPackage,cups))
Note: See TracBrowser for help on using the repository browser.