summaryrefslogtreecommitdiff
path: root/src/cups/Makefile.am
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-04-16 08:13:23 +0200
committerDidier Raboud <odyx@debian.org>2014-04-16 08:13:23 +0200
commitd7d42f6c969dc54157d85b7b6b611581bbfa7595 (patch)
treedfa630457b374b77f1f128cbc9104ea2d6963575 /src/cups/Makefile.am
parentccd50c2bd4db57503722816aa23a5092cbe69f40 (diff)
Imported Upstream version 5.2.10~pre1
Diffstat (limited to 'src/cups/Makefile.am')
-rw-r--r--src/cups/Makefile.am107
1 files changed, 72 insertions, 35 deletions
diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am
index 1e27ae0..75691af 100644
--- a/src/cups/Makefile.am
+++ b/src/cups/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.122 2012/03/25 17:54:32 rlk Exp $
+## $Id: Makefile.am,v 1.145 2014/02/12 13:42:27 rlk Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,7 @@ include $(top_srcdir)/scripts/global.mk
empty=
PACKAGE = cups
-BASE_VERSION = \"@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@.@GUTENPRINT_MICRO_VERSION@\"
+BASE_VERSION = \"@GUTENPRINT_BASE_VERSION@\"
bindir = @cups_bindir@
sbindir = @cups_sbindir@
@@ -38,11 +38,17 @@ pkgsysconfdir = $(cups_conf_serverroot)
cupsexec_driverdir = $(pkglibdir)/driver
cupsexec_filterdir = $(pkglibdir)/filter
+
+if BUILD_LIBUSB_BACKENDS
+cupsexec_backenddir = $(pkglibdir)/backend
+cupsdata_blacklistdir = $(pkgdatadir)/usb/
+endif
+
if CUPS_PPDS_AT_TOP_LEVEL
cups_modeldir = $(pkgdatadir)/model/
DONT_UNINSTALL_PPDS=true
else
-cups_modeldir = $(pkgdatadir)/model/gutenprint/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/
+cups_modeldir = $(pkgdatadir)/model/gutenprint/@GUTENPRINT_RELEASE_VERSION@/
endif
LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) $(CUPS_CFLAGS) -DBASE_VERSION=$(BASE_VERSION)
@@ -52,7 +58,6 @@ STP_NONLS_ENV= STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/sr
STP_ENV= $(STP_NONLS_ENV) STP_LOCALEDIR=$(top_srcdir)/src/cups/catalog
## Programs
-
if BUILD_TRANSLATED_CUPS_PPDS
if BUILD_GLOBALIZED_CUPS_PPDS
PPD = ppd-global
@@ -70,14 +75,27 @@ BUILD_SIMPLE_PPDS=-DGENERATE_SIMPLIFIED_PPDS
endif
if BUILD_CUPS_1_2
-cupsexec_driver_PROGRAMS = gutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+cupsexec_driver_PROGRAMS = gutenprint.@GUTENPRINT_RELEASE_VERSION@
endif
if BUILD_CUPS
bin_PROGRAMS = cups-calibrate
-sbin_PROGRAMS = cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+sbin_PROGRAMS = cups-genppd.@GUTENPRINT_RELEASE_VERSION@
sbin_SCRIPTS = cups-genppdupdate
-cupsexec_filter_PROGRAMS = rastertogutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ commandtoepson commandtocanon
+cupsexec_filter_PROGRAMS = rastertogutenprint.@GUTENPRINT_RELEASE_VERSION@ commandtoepson commandtocanon
+
+if BUILD_LIBUSB_BACKENDS
+cupsexec_backend_PROGRAMS = backend_gutenprint
+endif
+
+## CUPS backends require no world-execute permissions if they are to be
+## executed as root, and the backend must be run as root.
+## See http://www.cups.org/documentation.php/doc-1.6/man-backend.html
+if BUILD_LIBUSB_BACKENDS
+install-exec-hook:
+ mv $(DESTDIR)$(pkglibdir)/backend/backend_gutenprint "$(DESTDIR)$(pkglibdir)/backend/gutenprint$(GUTENPRINT_MAJOR_VERSION)$(GUTENPRINT_MINOR_VERSION)+usb"
+ chmod 700 "$(DESTDIR)$(pkglibdir)/backend/gutenprint$(GUTENPRINT_MAJOR_VERSION)$(GUTENPRINT_MINOR_VERSION)+usb"
+endif
TESTS= test-ppds test-rastertogutenprint
noinst_SCRIPTS=test-rastertogutenprint
@@ -96,19 +114,27 @@ commandtocanon_LDADD = $(CUPS_LIBS)
commandtoepson_SOURCES = commandtoepson.c
commandtoepson_LDADD = $(CUPS_LIBS)
-cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c i18n.c i18n.h
-cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DALL_LINGUAS='"$(ALL_LINGUAS)"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
-cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GENPPD_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
-cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+if BUILD_LIBUSB_BACKENDS
+backend_gutenprint_SOURCES = selphy_print.c kodak1400_print.c kodak6800_print.c kodak605_print.c shinko_s2145_print.c sony_updr150_print.c dnpds40_print.c mitsu70x_print.c backend_common.c backend_common.h
+
+backend_gutenprint_LDADD = $(LIBUSB_LIBS)
+backend_gutenprint_CPPFLAGS = $(LIBUSB_CFLAGS) -DURI_PREFIX=\"gutenprint$(GUTENPRINT_MAJOR_VERSION)$(GUTENPRINT_MINOR_VERSION)+usb\"
+endif
+
+cups_genppd_@GUTENPRINT_RELEASE_VERSION@_SOURCES = genppd.c i18n.c i18n.h
+cups_genppd_@GUTENPRINT_RELEASE_VERSION@_CFLAGS = -DALL_LINGUAS='"$(ALL_LINGUAS)"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
+cups_genppd_@GUTENPRINT_RELEASE_VERSION@_LDADD = $(CUPS_LIBS) $(GENPPD_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
+cups_genppd_@GUTENPRINT_RELEASE_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+
+gutenprint_@GUTENPRINT_RELEASE_VERSION@_SOURCES = genppd.c i18n.c i18n.h
+gutenprint_@GUTENPRINT_RELEASE_VERSION@_CFLAGS = -DCUPS_DRIVER_INTERFACE -DALL_LINGUAS='"$(ALL_LINGUAS)"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
+gutenprint_@GUTENPRINT_RELEASE_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
+gutenprint_@GUTENPRINT_RELEASE_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
-gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c i18n.c i18n.h
-gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DCUPS_DRIVER_INTERFACE -DALL_LINGUAS='"$(ALL_LINGUAS)"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
-gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
-gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+rastertogutenprint_@GUTENPRINT_RELEASE_VERSION@_SOURCES = rastertoprinter.c i18n.c i18n.h
+rastertogutenprint_@GUTENPRINT_RELEASE_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
+rastertogutenprint_@GUTENPRINT_RELEASE_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
-rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = rastertoprinter.c i18n.c i18n.h
-rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS) @LIBICONV@
-rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
## Data
@@ -130,8 +156,14 @@ if USE_NLS
PPD_NLS_1 = ppd-nls
endif
+if BUILD_LIBUSB_BACKENDS
+INSTALL_BLACKLIST=install-blacklist
+install-blacklist:
+ $(mkdir_p) $(DESTDIR)$(cupsdata_blacklistdir)
+ $(INSTALL_DATA) blacklist $(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks
+endif
-install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
+install-data-local: $(INSTALL_DATA_LOCAL_DEPS) $(INSTALL_BLACKLIST)
if test -n "$(CUPS_PKG)" -a -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
$(mkdir_p) $(DESTDIR)$(cups_modeldir); \
cd ppd ; \
@@ -152,7 +184,7 @@ install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
$(INSTALL_DATA) $$file "$(DESTDIR)$(localedir)/$$lang/gutenprint_$$lang.po"; \
done
-uninstall-local: $(INSTALL_DATA_LOCAL_DEPS)
+uninstall-local: $(INSTALL_DATA_LOCAL_DEPS) $(INSTALL_BLACKLIST)
# Remove PPDs installed in new PPD location
if test -z "DONT_UNINSTALL_PPDS" ; then \
if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
@@ -163,6 +195,8 @@ uninstall-local: $(INSTALL_DATA_LOCAL_DEPS)
lang=`basename $$file .po`; \
$(RM) "$(DESTDIR)$(localedir)/$$lang/gutenprint_$$lang.po"; \
done
+ $(RM) -f "$(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks"
+ $(RM) -f "$(DESTDIR)$(pkglibdir)/backend/gutenprint$(GUTENPRINT_MAJOR_VERSION)$(GUTENPRINT_MINOR_VERSION)+usb"
install-data-hook:
# Remove unused directories in install tree
@@ -172,6 +206,8 @@ install-data-hook:
-rmdir $(DESTDIR)$(pkgdatadir)
-rmdir $(DESTDIR)$(cupsexec_driverdir)
-rmdir $(DESTDIR)$(cupsexec_filterdir)
+ -rmdir $(DESTDIR)$(cupsexec_backenddir)
+ -rmdir $(DESTDIR)$(cupsdata_blacklistdir)
-rmdir $(DESTDIR)$(bindir)
-rmdir $(DESTDIR)$(pkglibdir)
-rmdir $(DESTDIR)$(pkgsysconfdir)
@@ -179,13 +215,13 @@ install-data-hook:
-rmdir `dirname $(DESTDIR)$(pkglibdir)`
-rmdir `dirname $(DESTDIR)$(pkgsysconfdir)`
-.PHONY: ppd ppd-stamp-pre ppd-stamp-nonls ppd-stamp-nls ppd-stamp-phony ppd-catalog-clean ppd-clean
+.PHONY: ppd ppd-stamp-pre ppd-stamp-nonls ppd-stamp-nls ppd-stamp-phony ppd-catalog-clean ppd-clean $(INSTALL_BLACKLIST)
all-local: $(INSTALL_DATA_LOCAL_DEPS)
ppd: ppd-stamp
-ppd-stamp: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(top_srcdir)/src/xml/xml-stamp
+ppd-stamp: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(top_srcdir)/src/xml/xml-stamp
$(MAKE) ppd-stamp-pre
$(MAKE) ppd-stamp-phony
touch ppd-stamp
@@ -193,10 +229,10 @@ ppd-stamp: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(t
ppd-stamp-phony: $(PPD)
ppd-catalog-clean:
- -$(RM) -r catalog
+ $(RM) -rf catalog
ppd-clean:
- -$(RM) -r ppd
+ $(RM) -rf ppd
ppd-stamp-pre: ppd-catalog-clean ppd-clean
@@ -208,32 +244,32 @@ ppd-catalog: ppd-catalog-clean
$(INSTALL_DATA) $$file "catalog/$$lang/gutenprint_$$lang.po"; \
done
-ppd-nonls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+ppd-nonls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
$(mkdir_p) ppd/C
$(MAKE) ppd-catalog-clean
- LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C
+ LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C
-ppd-global: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+ppd-global: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs:"
$(mkdir_p) ppd/Global
$(MAKE) ppd-catalog
- LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global
$(MAKE) ppd-catalog-clean
-ppd-global-ln: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+ppd-global-ln: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs (localized numbers for testing):"
$(mkdir_p) ppd/Global
$(MAKE) ppd-catalog
- LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N
$(MAKE) ppd-catalog-clean
-ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ppd-nonls
+ppd-nls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
$(mkdir_p) ppd
$(MAKE) ppd-catalog
- for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -L` ; do \
- mkdir ppd/$$language ; \
- echo "$$language:" ; \
- LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -l $$language -p ppd/$$language; \
+ for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ -L` ; do \
+ $(mkdir_p) ppd/$$language ; \
+ echo -n "$$language: " ; \
+ LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -l $$language -p ppd/$$language; \
done
$(MAKE) ppd-catalog-clean
@@ -261,6 +297,7 @@ MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = \
COPYING \
README \
+ blacklist \
calibrate.ppm \
command.txt \
command.types \