diff --git a/hardware/printer/foomatic-db-engine/actions.py b/hardware/printer/foomatic-db-engine/actions.py new file mode 100644 index 0000000000..47a88046a2 --- /dev/null +++ b/hardware/printer/foomatic-db-engine/actions.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import get +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import perlmodules + +def setup(): + # The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z], it borks + shelltools.export("LC_ALL", "C") + shelltools.export("LANG", "C") + + autotools.autoconf() + autotools.configure() + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + shelltools.cd("lib") + perlmodules.configure() + perlmodules.make() + perlmodules.install() + shelltools.cd("..") + + pisitools.dodoc("ChangeLog", "COPYING", "README", "TODO", "USAGE") diff --git a/hardware/printer/foomatic-db-engine/comar/foomatic-db-engine.postinst b/hardware/printer/foomatic-db-engine/comar/foomatic-db-engine.postinst new file mode 100644 index 0000000000..28fbe9d1ba --- /dev/null +++ b/hardware/printer/foomatic-db-engine/comar/foomatic-db-engine.postinst @@ -0,0 +1,56 @@ +case "$1" in + configure) + # Do the following only if CUPS is running and the needed CUPS tools + # are available + if which lpstat > /dev/null 2>&1 && \ + which lpinfo > /dev/null 2>&1 && \ + which lpadmin > /dev/null 2>&1 && \ + lpstat -r > /dev/null 2>&1; then + # Update the PPD files of all already installed print queues + driverregexp='^foomatic:' + gennicknameregexp='' + [ ! -z "$gennicknameregexp" ] && \ + gennicknameregexp="; $gennicknameregexp" + gennicknameregexp='s/\s*\(recommended\)//'"$gennicknameregexp" + tempfiles= + trap 'rm -f $tempfiles; exit 0' 0 1 2 13 15 + tmpfile1=`mktemp -t updateppds.XXXXXX` + tempfiles="$tempfiles $tmpfile1" + lpinfo -m | grep -E $driverregexp > $tmpfile1 + cd /etc/cups/ppd + for ppd in `ls -1 *.ppd 2>/dev/null`; do + queue=${ppd%.ppd} + nickname=`grep '\*NickName:' $ppd | cut -d '"' -f 2 | perl -p -e 's/\n$//' | perl -p -e "$gennicknameregexp" | perl -p -e 's/(\W)/\\\\$1/g'` + lang=`grep '\*LanguageVersion:' $ppd | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'` + ppdfound="0" + englishppduri="" + tmpfile2=`mktemp -t updateppds.XXXXXX` + tempfiles="$tempfiles $tmpfile2" + cat $tmpfile1 | perl -p -e "$gennicknameregexp" | grep -E '^\S+\s+.*'"$nickname"'$' | cut -d ' ' -f 1 > $tmpfile2 + while read newppduri; do + [ "$ppdfound" = "0" ] && lpadmin -p $queue -m $newppduri + newlang=`grep '\*LanguageVersion:' $ppd | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'` + [ "$newlang" = "$lang" ] && ppdfound="1" + [ "$newlang" = "english" ] && englishppduri="$newppduri" + done < $tmpfile2 + [ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin -p $queue -m $englishppduri && ppdfound="1" + [ "$ppdfound" = "1" ] && echo PPD for printer $queue updated >&2 + done + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/hardware/printer/foomatic-db-engine/files/4.0.7-perl-module.patch b/hardware/printer/foomatic-db-engine/files/4.0.7-perl-module.patch new file mode 100644 index 0000000000..dbb53feb2a --- /dev/null +++ b/hardware/printer/foomatic-db-engine/files/4.0.7-perl-module.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index 3014185..81e090d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -42,7 +42,7 @@ LOCAL_LIBDIR=@LOCAL_LIBDIR@ + FOOMATIC_RIP=@FOOMATIC_RIP@ + + # foomatic-rip path for a "make inplace" installation +-LOCAL_FOOMATIC_RIP=@LOCAL_FOOMATIC_RIP@ ++LOCAL_FOOMATIC_RIP=@FOOMATIC_RIP@ + + # Locations for installing the components of this package + BINDIR=$(bindir) diff --git a/hardware/printer/foomatic-db-engine/files/4.0.7-respect-ldflag.patch b/hardware/printer/foomatic-db-engine/files/4.0.7-respect-ldflag.patch new file mode 100644 index 0000000000..9e6071276a --- /dev/null +++ b/hardware/printer/foomatic-db-engine/files/4.0.7-respect-ldflag.patch @@ -0,0 +1,15 @@ +--- foomatic-db-engine-4.0.2/Makefile.in.orig 2009-07-23 11:45:28.487999828 +0200 ++++ foomatic-db-engine-4.0.2/Makefile.in 2009-07-23 11:45:53.939525006 +0200 +@@ -231,10 +231,10 @@ + ( cd lib && $(PERL) Makefile.PL verbose INSTALLDIRS=$(PERL_INSTALLDIRS) ) + + foomatic-combo-xml: foomatic-combo-xml.c +- $(CC) $(CFLAGS) -o foomatic-combo-xml foomatic-combo-xml.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o foomatic-combo-xml foomatic-combo-xml.c + + foomatic-perl-data: foomatic-perl-data.c +- $(CC) $(CFLAGS) $(XML_CFLAGS) -o foomatic-perl-data foomatic-perl-data.c $(XML_LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o foomatic-perl-data foomatic-perl-data.c $(XML_CFLAGS) $(XML_LIBS) + + man: lib/Foomatic/Defaults.pm + chmod a+rx ./makeMan diff --git a/hardware/printer/foomatic-db-engine/files/foomatic-db-engine-4.0.8-fix-sandbox.patch b/hardware/printer/foomatic-db-engine/files/foomatic-db-engine-4.0.8-fix-sandbox.patch new file mode 100644 index 0000000000..940474ea73 --- /dev/null +++ b/hardware/printer/foomatic-db-engine/files/foomatic-db-engine-4.0.8-fix-sandbox.patch @@ -0,0 +1,30 @@ +--- configure.ac.OSmanOS 2011-07-25 12:51:20.000000000 +0300 ++++ configure.ac 2012-11-20 13:21:36.921307899 +0200 +@@ -163,27 +163,6 @@ + fi + + +-AC_MSG_CHECKING(how to redirect Ghostscript output to fd 3) +-if test "$DEVFD3" = "" ; then +- v=`( if test -d /dev/fd ; then echo 3 >/dev/fd/3; fi) 3>&1 1>&2` +- if test "$v" != "" ; then +- DEVFD3=/dev/fd/3 +- DEVFD0=/dev/fd/0 +- else +- DEVFD3="|$CAT >&3" +- DEVFD0=- +- fi +- if test "$GS" != "GHOSTSCRIPT_NOT_FOUND" -a "$GSCHECK" != "no" ; then +- rm -f gs_out +- gs -q -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -sDEVICE=laserjet "-sOutputFile=$DEVFD3" ${srcdir}/gsPrint 3>gs_out +- if test "!" -s gs_out ; then +- AC_MSG_ERROR("ERROR - gs cannot handle -sOutputFile=$OUT" ) +- fi +- fi +-fi +-AC_MSG_RESULT(using $DEVFD3) +-AC_SUBST(DEVFD3) +-AC_SUBST(DEVFD0) + + # Check for Perl + AC_PATH_PROGS(PERL,perl,/usr/bin/perl,$BINSEARCHPATH) diff --git a/hardware/printer/foomatic-db-engine/files/perl-module-3.0.1.diff b/hardware/printer/foomatic-db-engine/files/perl-module-3.0.1.diff new file mode 100644 index 0000000000..89bfd97155 --- /dev/null +++ b/hardware/printer/foomatic-db-engine/files/perl-module-3.0.1.diff @@ -0,0 +1,27 @@ +diff -Nur foomatic-db-engine-3.0-20061031-old/Makefile.in foomatic-db-engine-3.0-20061031/Makefile.in +--- foomatic-db-engine-3.0-20061031-old/Makefile.in 2006-11-08 10:33:59.000000000 +0200 ++++ foomatic-db-engine-3.0-20061031/Makefile.in 2006-11-08 10:38:44.000000000 +0200 +@@ -42,7 +42,7 @@ + FOOMATIC_RIP=@FOOMATIC_RIP@ + + # foomatic-rip path for a "make inplace" installation +-LOCAL_FOOMATIC_RIP=@LOCAL_FOOMATIC_RIP@ ++LOCAL_FOOMATIC_RIP=@FOOMATIC_RIP@ + + # Locations for installing the components of this package + BINDIR=$(bindir) +@@ -186,10 +186,10 @@ + install-bin: check-config lib/Makefile + # This is the only way to get the Perl-generated Makefile using + # $(DESTDIR) properly +- ( cd lib && \ +- $(MAKE) PREFIX=$(PERLPREFIX) && \ +- $(MAKE) PREFIX=$(DESTDIR)$(PERLPREFIX) pure_install \ +- ) ++# ( cd lib && \ ++# $(MAKE) PREFIX=$(PERLPREFIX) && \ ++# $(MAKE) PREFIX=$(DESTDIR)$(PERLPREFIX) pure_install \ ++# ) + ${SRC}/mkinstalldirs $(DESTDIR)$(BINDIR) + ${SRC}/mkinstalldirs $(DESTDIR)$(SBINDIR) + ${SRC}/mkinstalldirs $(DESTDIR)$(ETCDIR) diff --git a/hardware/printer/foomatic-db-engine/pspec.xml b/hardware/printer/foomatic-db-engine/pspec.xml new file mode 100644 index 0000000000..803615f3c6 --- /dev/null +++ b/hardware/printer/foomatic-db-engine/pspec.xml @@ -0,0 +1,87 @@ + + + + + foomatic-db-engine + http://www.linuxprinting.org/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + app:console + Foomatic printer database engine + foomatic-db-engine is the layer that provides the database engine to Foomatic. + http://www.openprinting.org/download/foomatic/foomatic-db-engine-4.0.12.tar.gz + + libxml2-devel + cups-devel + + + foomatic-db-engine-4.0.8-fix-sandbox.patch + 4.0.7-perl-module.patch + 4.0.7-respect-ldflag.patch + + + + + foomatic-db-engine + + libxml2 + + + /usr/bin + /usr/sbin + /usr/lib + /etc/foomatic + /usr/share/foomatic/templates + /usr/share/man + /usr/share/doc + + + + + + 2015-10-28 + 4.0.12 + v.bump + Ayhan Yalçınsoy + ayhanyalcinsoy@pisilinux.org + + + 2014-09-13 + 4.0.11 + Rebuild for new perl. + Serdar Soytetir + kaptan@pisilinux.org + + + 2014-06-15 + 4.0.11 + Version bump. + Marcin Bojara + marcin@pisilinux.org + + + 2014-02-05 + 4.0.8 + Depend on cups-filters. + PisiLinux Community + admins@pisilinux.org + + + 2013-12-01 + 4.0.8 + Rebuild for new perl. + PisiLinux Community + admins@pisilinux.org + + + 2012-11-19 + 4.0.8 + First release + PisiLinux Community + admins@pisilinux.org + + + diff --git a/hardware/printer/foomatic-db-engine/translations.xml b/hardware/printer/foomatic-db-engine/translations.xml new file mode 100644 index 0000000000..74d55e1ef8 --- /dev/null +++ b/hardware/printer/foomatic-db-engine/translations.xml @@ -0,0 +1,8 @@ + + + + foomatic-db-engine + Foomatic yazıcı veritabanı motoru + foomatic-db-engine, Foomatic veritabanı motorunu oluşturan katmandır. + +