Fix pmacct build when no nfacctd | pmacctd options are selected
[openwrt.git] / package / cups / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=cups
6 PKG_VERSION:=1.1.23
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63
9
10 PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/ftp.easysw.com/pub/cups/$(PKG_VERSION) \
11 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
12 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
14 PKG_CAT:=bzcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,CUPS,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured:
24 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --program-prefix="" \
34 --program-suffix="" \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --datadir=/usr/share \
39 --includedir=/usr/include \
40 --infodir=/usr/share/info \
41 --libdir=/usr/lib \
42 --libexecdir=/usr/lib \
43 --localstatedir=/var \
44 --mandir=/usr/share/man \
45 --sbindir=/usr/sbin \
46 --sysconfdir=/etc \
47 $(DISABLE_NLS) \
48 $(DISABLE_LARGEFILE) \
49 --with-gnu-ld \
50 --with-cups-user=root \
51 --with-cups-group=root \
52 --without-perl \
53 --without-python \
54 --without-php \
55 --disable-slp \
56 --disable-gnutls \
57 --disable-openssl \
58 --disable-cdsassl \
59 --disable-ssl \
60 --disable-slp \
61 );
62 touch $@
63
64 $(PKG_BUILD_DIR)/.built:
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 touch $@
72
73 $(IPKG_CUPS):
74 install -d -m0755 $(IDIR_CUPS)/etc/cups
75 cp -fpR $(PKG_INSTALL_DIR)/etc/cups/* $(IDIR_CUPS)/etc/cups/
76 install -d -m0755 $(IDIR_CUPS)/usr/bin
77 cp -fp $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_CUPS)/usr/bin/
78 rm -f $(IDIR_CUPS)/usr/bin/cups-config
79 install -d -m0755 $(IDIR_CUPS)/usr/lib
80 cp -fp $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(IDIR_CUPS)/usr/lib/
81 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/cups $(IDIR_CUPS)/usr/lib/
82 install -d -m0755 $(IDIR_CUPS)/usr/share/cups/templates
83 cp -fp $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(IDIR_CUPS)/usr/share/cups/templates/
84 install -d -m0755 $(IDIR_CUPS)/usr/share/doc/cups
85 cp -fp $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(IDIR_CUPS)/usr/share/doc/cups/
86 cp -fpR $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(IDIR_CUPS)/usr/share/doc/cups/
87 install -d -m0755 $(IDIR_CUPS)/usr/sbin
88 cp -fp $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_CUPS)/usr/sbin/
89 # overwrite default config with our own
90 cp -fpR ./files/etc/cups/* $(IDIR_CUPS)/etc/cups/
91 # install initscript with priority 60
92 install -d -m0755 $(IDIR_CUPS)/etc/init.d
93 install -m0755 ./files/cupsd.init $(IDIR_CUPS)/etc/init.d/S60cupsd
94 find $(IDIR_CUPS) -name CVS | xargs rm -rf
95 $(RSTRIP) $(IDIR_CUPS)
96 $(IPKG_BUILD) $(IDIR_CUPS) $(PACKAGE_DIR)
97
98 $(STAGING_DIR)/usr/lib/libcups.so: $(PKG_BUILD_DIR)/.built
99 mkdir -p $(STAGING_DIR)/usr/bin
100 cp -fp $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
101 mkdir -p $(STAGING_DIR)/usr/include
102 cp -fpR $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
103 mkdir -p $(STAGING_DIR)/usr/lib
104 cp -fp $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
105
106 install-dev: $(STAGING_DIR)/usr/lib/libcups.so
107
108 uninstall-dev:
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
114 compile: install-dev
115 clean: uninstall-dev
116
This page took 0.043503 seconds and 5 git commands to generate.