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