2008-03-06 19:06:01 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# cups
|
|
|
|
#
|
|
|
|
################################################################################
|
2009-01-25 21:53:43 +01:00
|
|
|
CUPS_VERSION = 1.3.9
|
2008-04-25 18:45:27 +02:00
|
|
|
CUPS_NAME = cups-$(CUPS_VERSION)
|
|
|
|
CUPS_DIR = $(BUILD_DIR)/$(CUPS_NAME)
|
2009-01-25 21:53:43 +01:00
|
|
|
CUPS_SITE = http://ftp.easysw.com/pub/cups/$(CUPS_VERSION)
|
2008-04-25 18:45:27 +02:00
|
|
|
CUPS_SOURCE:=$(CUPS_NAME)-source.tar.bz2
|
2010-12-09 10:55:08 +01:00
|
|
|
CUPS_DESTDIR = $(STAGING_DIR)/usr/lib
|
2008-04-25 18:45:27 +02:00
|
|
|
CUPS_CAT:=$(BZCAT)
|
2008-03-06 19:06:01 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
2009-01-25 21:53:43 +01:00
|
|
|
CUPS_CONF_OPT += --enable-dbus
|
|
|
|
CUPS_DEPENDENCIES += dbus
|
2008-03-06 19:06:01 +01:00
|
|
|
else
|
2009-01-25 21:53:43 +01:00
|
|
|
CUPS_CONF_OPT += --disable-dbus
|
2008-03-06 19:06:01 +01:00
|
|
|
endif
|
|
|
|
|
2009-07-17 15:42:40 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
2009-01-25 21:53:43 +01:00
|
|
|
CUPS_DEPENDENCIES += xlib_libX11
|
|
|
|
endif
|
|
|
|
|
|
|
|
CUPS_CONF_OPT += --disable-perl
|
|
|
|
CUPS_CONF_OPT += --disable-java
|
|
|
|
CUPS_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PERL),disabled) # We do not provide perl (yet)
|
|
|
|
CUPS_CONF_ENV += ac_cv_path_perl=$(STAGING_DIR)/usr/bin/perl
|
|
|
|
CUPS_CONF_OPT += --with-perl
|
|
|
|
CUPS_DEPENDENCIES += microperl
|
|
|
|
else
|
|
|
|
CUPS_CONF_OPT += --disable-perl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP),y)
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/main
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/regex
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/TSRM
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/Zend
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/ext
|
|
|
|
CUPS_CONF_ENV += ac_cv_path_php=$(STAGING_DIR)/usr/bin/php
|
|
|
|
CUPS_CONF_OPT += --with-php
|
|
|
|
CUPS_DEPENDENCIES += php
|
|
|
|
else
|
|
|
|
CUPS_CONF_OPT += --disable-php
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
|
|
|
CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
|
|
|
|
CUPS_CONF_ENV += ac_cv_path_python=$(STAGING_DIR)/usr/bin/python
|
|
|
|
CUPS_CONF_OPT += --with-python
|
|
|
|
CUPS_DEPENDENCIES += python
|
|
|
|
else
|
|
|
|
CUPS_CONF_OPT += --disable-python
|
2008-03-06 19:06:01 +01:00
|
|
|
endif
|
|
|
|
|
2009-05-14 17:03:23 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CUPS_PDFTOPS),y)
|
|
|
|
CUPS_CONF_OPT += --enable-pdftops
|
|
|
|
else
|
|
|
|
CUPS_CONF_OPT += --disable-pdftops
|
|
|
|
endif
|
|
|
|
|
2008-04-25 18:45:27 +02:00
|
|
|
$(DL_DIR)/$(CUPS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(CUPS_SITE),$(CUPS_SOURCE))
|
2008-04-25 18:45:27 +02:00
|
|
|
|
|
|
|
$(CUPS_DIR)/.unpacked: $(DL_DIR)/$(CUPS_SOURCE)
|
|
|
|
$(CUPS_CAT) $(DL_DIR)/$(CUPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(CUPS_DIR) package/cups/ \*.patch
|
|
|
|
$(CONFIG_UPDATE) $(CUPS_DIR)
|
|
|
|
touch $@
|
2008-03-06 19:06:01 +01:00
|
|
|
|
2008-04-25 18:45:27 +02:00
|
|
|
$(CUPS_DIR)/.configured: $(CUPS_DIR)/.unpacked
|
2009-05-14 17:04:41 +02:00
|
|
|
cd $(CUPS_DIR) && $(AUTOCONF)
|
2008-04-25 18:45:27 +02:00
|
|
|
(cd $(CUPS_DIR) && \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-01-25 21:53:43 +01:00
|
|
|
$(CUPS_CONF_ENV) \
|
|
|
|
CFLAGS="$(CUPS_CFLAGS)" \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2009-01-25 21:53:43 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
2009-01-26 00:16:11 +01:00
|
|
|
--exec-prefix=/usr \
|
2009-01-25 21:53:43 +01:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2009-01-26 00:16:11 +01:00
|
|
|
--with-config-file-path=/etc \
|
2009-01-25 21:53:43 +01:00
|
|
|
--disable-gnutls \
|
|
|
|
--disable-gssapi \
|
|
|
|
$(CUPS_CONF_OPT) \
|
|
|
|
)
|
2008-04-25 18:45:27 +02:00
|
|
|
touch $@
|
2008-03-06 19:06:01 +01:00
|
|
|
|
2008-04-25 18:45:27 +02:00
|
|
|
$(CUPS_DIR)/.compiled: $(CUPS_DIR)/.configured
|
2009-01-25 21:53:43 +01:00
|
|
|
$(MAKE) CFLAGS="$(CUPS_CFLAGS)" -C $(CUPS_DIR) cups backend berkeley cgi-bin filter \
|
2008-04-25 18:45:27 +02:00
|
|
|
locale monitor notifier pdftops scheduler systemv scripting/php \
|
|
|
|
conf data doc fonts ppd templates
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(CUPS_DIR)/.installed: $(CUPS_DIR)/.compiled
|
|
|
|
$(MAKE) -C $(CUPS_DIR) DESTDIR=$(STAGING_DIR) DSTROOT=$(STAGING_DIR) install
|
|
|
|
$(MAKE) -C $(CUPS_DIR) DESTDIR=$(TARGET_DIR) DSTROOT=$(TARGET_DIR) install
|
|
|
|
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/cups-config
|
|
|
|
$(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/cups-config
|
|
|
|
$(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" $(STAGING_DIR)/usr/bin/cups-config
|
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/bin/cups-config
|
|
|
|
touch $@
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
cups: host-autoconf $(CUPS_DEPENDENCIES) $(CUPS_DIR)/.installed
|
2008-04-25 18:45:27 +02:00
|
|
|
|
2009-04-18 16:13:49 +02:00
|
|
|
cups-source: $(DL_DIR)/$(CUPS_SOURCE)
|
|
|
|
|
2008-04-25 18:45:27 +02:00
|
|
|
cups-clean:
|
|
|
|
-$(MAKE) -C $(CUPS_DIR) clean
|
|
|
|
|
2009-01-25 21:53:43 +01:00
|
|
|
cups-dirclean:
|
|
|
|
rm -fr $(CUPS_DIR)
|
|
|
|
|
2008-04-25 18:45:27 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_CUPS),y)
|
2008-04-25 18:45:27 +02:00
|
|
|
TARGETS+=cups
|
2009-01-25 21:53:43 +01:00
|
|
|
endif
|
|
|
|
|