212 lines
7.5 KiB
Diff
212 lines
7.5 KiB
Diff
|
diff -up splix/INSTALL.drv-only splix/INSTALL
|
||
|
--- splix/INSTALL.drv-only 2008-06-15 00:22:11.000000000 +0200
|
||
|
+++ splix/INSTALL 2011-11-30 19:27:25.112732948 +0100
|
||
|
@@ -114,6 +114,9 @@ options are:
|
||
|
memory will use an average of 9Mo of RAM. Other pages
|
||
|
are swapped into the disk. A little CACHESIZE value will
|
||
|
increase disk access and increase the job rendering time.
|
||
|
+ * DRV_ONLY=1 [0 by default]:
|
||
|
+ Don't install PPD files at all, only DRV
|
||
|
+ (driver information file) files.
|
||
|
|
||
|
Example:
|
||
|
|
||
|
diff -up splix/module.mk.drv-only splix/module.mk
|
||
|
--- splix/module.mk.drv-only 2011-11-30 19:27:25.110732973 +0100
|
||
|
+++ splix/module.mk 2011-11-30 19:27:25.113732935 +0100
|
||
|
@@ -9,6 +9,7 @@
|
||
|
# Compilation option:
|
||
|
# V=1 Verbose mode
|
||
|
# DESTDIR=xxx Change the destination directory prefix
|
||
|
+# DRV_ONLY Don't install PPD files at all, only DRV files.
|
||
|
|
||
|
MODE := optimized
|
||
|
|
||
|
@@ -23,6 +24,7 @@ CACHESIZE ?= 30
|
||
|
DISABLE_JBIG ?= 0
|
||
|
DISABLE_THREADS ?= 0
|
||
|
DISABLE_BLACKOPTIM ?= 0
|
||
|
+DRV_ONLY ?= 0
|
||
|
|
||
|
|
||
|
# Flags
|
||
|
@@ -56,6 +58,7 @@ endif
|
||
|
# Get some information
|
||
|
CUPSFILTER := `cups-config --serverbin`/filter
|
||
|
CUPSPPD ?= `cups-config --datadir`/model
|
||
|
+CUPSDRV ?= `cups-config --datadir`/drv
|
||
|
ifeq ($(ARCHI),Darwin)
|
||
|
PSTORASTER := pstocupsraster
|
||
|
else
|
||
|
@@ -63,7 +66,7 @@ PSTORASTER := pstoraster
|
||
|
endif
|
||
|
GSTORASTER := gstoraster
|
||
|
CUPSPROFILE := `cups-config --datadir`/profiles
|
||
|
-export CUPSFILTER CUPSPPD
|
||
|
+export CUPSFILTER CUPSPPD CUPSDRV
|
||
|
|
||
|
|
||
|
# Specific information needed by pstoqpdl
|
||
|
diff -up splix/ppd/compile.sh.drv-only splix/ppd/compile.sh
|
||
|
--- splix/ppd/compile.sh.drv-only 2010-07-31 19:11:24.000000000 +0200
|
||
|
+++ splix/ppd/compile.sh 2011-11-30 19:27:25.113732935 +0100
|
||
|
@@ -28,13 +28,13 @@ parseFile() {
|
||
|
#
|
||
|
# Main script
|
||
|
#
|
||
|
-if [ "$2" = "debug" ]; then
|
||
|
- TMPFILE="output.drv"
|
||
|
+if [ "$2" = "drv" ]; then
|
||
|
DRIVER=$1
|
||
|
+ OUTFILE=${DRIVER%.in}
|
||
|
shift 1
|
||
|
|
||
|
- echo "" > $TMPFILE
|
||
|
- parseFile $DRIVER $TMPFILE
|
||
|
+ echo "" > $OUTFILE
|
||
|
+ parseFile $DRIVER $OUTFILE
|
||
|
|
||
|
|
||
|
elif [ "$2" = "lang" ]; then
|
||
|
diff -up splix/ppd/Makefile.drv-only splix/ppd/Makefile
|
||
|
--- splix/ppd/Makefile.drv-only 2011-07-21 17:22:26.000000000 +0200
|
||
|
+++ splix/ppd/Makefile 2011-11-30 19:28:36.440841223 +0100
|
||
|
@@ -5,7 +5,8 @@
|
||
|
#
|
||
|
#
|
||
|
|
||
|
-SOURCE := samsung.drv dell.drv xerox.drv lexmark.drv toshiba.drv
|
||
|
+SOURCE := samsung.drv.in dell.drv.in xerox.drv.in lexmark.drv.in toshiba.drv.in
|
||
|
+DRVS := samsung.drv dell.drv xerox.drv lexmark.drv toshiba.drv
|
||
|
DELL := 1100 1110
|
||
|
SAMSUNG := clp500 clp550 clp510 clp610 clp610nd ml1510 ml1520 ml1610 \
|
||
|
ml1630 ml1640 ml1660 ml1710 ml1740 ml1750 ml1910 ml1915 \
|
||
|
@@ -42,39 +43,47 @@ printCmd = $(if $(filter $(V),1),
|
||
|
|
||
|
all:
|
||
|
|
||
|
+.PHONY: drv
|
||
|
+drv: $(SOURCE)
|
||
|
+ ./compile.sh samsung.drv.in drv
|
||
|
+ ./compile.sh dell.drv.in drv
|
||
|
+ ./compile.sh xerox.drv.in drv
|
||
|
+ ./compile.sh lexmark.drv.in drv
|
||
|
+ ./compile.sh toshiba.drv.in drv
|
||
|
+
|
||
|
.PHONY: ppd
|
||
|
ppd: $(DRIVER) $(LANGDRIVERSEXT)
|
||
|
|
||
|
$(DRIVER): $(SOURCE)
|
||
|
- ./compile.sh samsung.drv -I . -d ./
|
||
|
- ./compile.sh dell.drv -I . -d ./
|
||
|
- ./compile.sh xerox.drv -I . -d ./
|
||
|
- ./compile.sh lexmark.drv -I . -d ./
|
||
|
- ./compile.sh toshiba.drv -I . -d ./
|
||
|
+ ./compile.sh samsung.drv.in -I . -d ./
|
||
|
+ ./compile.sh dell.drv.in -I . -d ./
|
||
|
+ ./compile.sh xerox.drv.in -I . -d ./
|
||
|
+ ./compile.sh lexmark.drv.in -I . -d ./
|
||
|
+ ./compile.sh toshiba.drv.in -I . -d ./
|
||
|
|
||
|
$(LANGDRIVERSEXT): $(SOURCE) $(patsubst %, $(PODIR)/%.$(POEXT), $(LANGUAGES))
|
||
|
lang=$(patsubst $(MASTERDRIVER)%.$(DRIVERSEXT),%, $@); \
|
||
|
- ./compile.sh samsung.drv -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
+ ./compile.sh samsung.drv.in -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
for filename in ${SAMSUNG}; do \
|
||
|
recode utf8..latin1 ${PODIR}/$$lang/$$filename.${DRIVERSEXT}; \
|
||
|
mv ${PODIR}/$$lang/$$filename.${DRIVERSEXT} $$filename$$lang.${DRIVERSEXT}; \
|
||
|
done; \
|
||
|
- ./compile.sh xerox.drv -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
+ ./compile.sh xerox.drv.in -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
for filename in ${XEROX}; do \
|
||
|
recode utf8..latin1 ${PODIR}/$$lang/$$filename.${DRIVERSEXT}; \
|
||
|
mv ${PODIR}/$$lang/$$filename.${DRIVERSEXT} $$filename$$lang.${DRIVERSEXT}; \
|
||
|
done; \
|
||
|
- ./compile.sh dell.drv -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
+ ./compile.sh dell.drv.in -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
for filename in ${DELL}; do \
|
||
|
recode utf8..latin1 ${PODIR}/$$lang/$$filename.${DRIVERSEXT}; \
|
||
|
mv ${PODIR}/$$lang/$$filename.${DRIVERSEXT} $$filename$$lang.${DRIVERSEXT}; \
|
||
|
done; \
|
||
|
- ./compile.sh lexmark.drv -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
+ ./compile.sh lexmark.drv.in -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
for filename in ${LEXMARK}; do \
|
||
|
recode utf8..latin1 ${PODIR}/$$lang/$$filename.${DRIVERSEXT}; \
|
||
|
mv ${PODIR}/$$lang/$$filename.${DRIVERSEXT} $$filename$$lang.${DRIVERSEXT}; \
|
||
|
done; \
|
||
|
- ./compile.sh toshiba.drv -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
+ ./compile.sh toshiba.drv.in -l $$lang -c ${PODIR}/$$lang.${POEXT} -d ${PODIR}/$$lang; \
|
||
|
for filename in ${TOSHIBA}; do \
|
||
|
recode utf8..latin1 ${PODIR}/$$lang/$$filename.${DRIVERSEXT}; \
|
||
|
mv ${PODIR}/$$lang/$$filename.${DRIVERSEXT} $$filename$$lang.${DRIVERSEXT}; \
|
||
|
@@ -83,19 +92,21 @@ $(LANGDRIVERSEXT): $(SOURCE) $(patsubst
|
||
|
.PHONY: update
|
||
|
update: $(patsubst %, $(PODIR)/%.$(POEXT), $(LANGUAGES))
|
||
|
%.po: $(SOURCE)
|
||
|
- ./compile.sh samsung.drv lang $@
|
||
|
- ./compile.sh dell.drv lang $@
|
||
|
- ./compile.sh xerox.drv lang $@
|
||
|
- ./compile.sh lexmark.drv lang $@
|
||
|
- ./compile.sh toshiba.drv lang $@
|
||
|
+ ./compile.sh samsung.drv.in lang $@
|
||
|
+ ./compile.sh dell.drv.in lang $@
|
||
|
+ ./compile.sh xerox.drv.in lang $@
|
||
|
+ ./compile.sh lexmark.drv.in lang $@
|
||
|
+ ./compile.sh toshiba.drv.in lang $@
|
||
|
|
||
|
cmd_install_samsung = INSTALL Samsung PPD files
|
||
|
cmd_install_xerox = INSTALL Xerox PPD files
|
||
|
cmd_install_dell = INSTALL Dell PPD files
|
||
|
cmd_install_lexmark = INSTALL Lexmark PPD files
|
||
|
cmd_install_toshiba = INSTALL Toshiba PPD files
|
||
|
+cmd_install_drv = INSTALL DRV files
|
||
|
.PHONY: install
|
||
|
install:
|
||
|
+ifneq ($(DRV_ONLY),1)
|
||
|
$(call printCmd, $(cmd_install_samsung))
|
||
|
$(Q)install -d -m 755 ${DESTDIR}${CUPSPPD}/samsung
|
||
|
$(Q)for filename in ${SAMSUNG}; do \
|
||
|
@@ -136,8 +147,16 @@ install:
|
||
|
install -m 644 $$filename$$lang.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/toshiba;\
|
||
|
done; \
|
||
|
done;
|
||
|
+else
|
||
|
+ $(call printCmd, $(cmd_install_drv))
|
||
|
+ $(Q)install -d -m 755 ${DESTDIR}${CUPSDRV}
|
||
|
+ $(Q)for filename in ${DRVS}; do \
|
||
|
+ install -m 644 $$filename ${DESTDIR}${CUPSDRV};\
|
||
|
+ done;
|
||
|
+endif
|
||
|
|
||
|
.PHONY: clean distclean
|
||
|
clean:
|
||
|
distclean:
|
||
|
$(RM) *.${DRIVERSEXT}
|
||
|
+ $(RM) *.drv
|
||
|
diff -up splix/rules.mk.drv-only splix/rules.mk
|
||
|
--- splix/rules.mk.drv-only 2011-11-30 19:27:25.104733048 +0100
|
||
|
+++ splix/rules.mk 2011-11-30 19:27:25.114732922 +0100
|
||
|
@@ -75,6 +75,11 @@ BLACKOPTIMSTATE := disabled
|
||
|
else
|
||
|
BLACKOPTIMSTATE := enabled
|
||
|
endif
|
||
|
+ifeq ($(DRV_ONLY),0)
|
||
|
+DRVSTATE := disabled
|
||
|
+else
|
||
|
+DRVSTATE := enabled
|
||
|
+endif
|
||
|
|
||
|
|
||
|
MSG := +---------------------------------------------+\n
|
||
|
@@ -85,8 +90,9 @@ MSG += | THREADS Nr = %8i
|
||
|
MSG += | CACHESIZE = %8i |\n
|
||
|
MSG += | JBIG = %8s |\n
|
||
|
MSG += | BLACK OPTIM = %8s |\n
|
||
|
+MSG += | DRV ONLY = %8s |\n
|
||
|
MSG += +---------------------------------------------+\n
|
||
|
MSG += (Do a \"make clean\" before updating these values)\n\n
|
||
|
optionList:
|
||
|
@printf " $(MSG)" $(THREADSSTATE) $(THREADS) $(CACHESIZE) $(JBIGSTATE) \
|
||
|
- $(BLACKOPTIMSTATE)
|
||
|
+ $(BLACKOPTIMSTATE) $(DRVSTATE)
|