forked from Pisilinux/contrib
Proje Gitea'ya taşındı (Temiz başlangıç)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 2.
|
||||
# See the file http://www.gnu.org/copyleft/gpl.txt.
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
|
||||
def setup():
|
||||
shelltools.system("rpm2targz -v %s/hl1210wlpr-3.0.1-1.i386.rpm" %get.workDIR())
|
||||
shelltools.system("rpm2targz -v %s/hl1210wcupswrapper-3.0.1-1.i386.rpm" %get.workDIR())
|
||||
shelltools.system("tar xfvz %s/hl1210wlpr-3.0.1-1.i386.tar.gz" %get.workDIR())
|
||||
shelltools.system("tar xfvz %s/hl1210wcupswrapper-3.0.1-1.i386.tar.gz" %get.workDIR())
|
||||
|
||||
def install():
|
||||
pisitools.dodir("/usr/share/cups/model")
|
||||
pisitools.dodir("/usr/lib/cups/filter")
|
||||
pisitools.dodir("/opt")
|
||||
pisitools.insinto("/usr/share/cups/model","%s/opt/brother/Printers/HL1210W/cupswrapper/brother-HL1210W-cups-en.ppd" % get.workDIR())
|
||||
pisitools.insinto("/usr/lib/cups/filter","%s/opt/brother/Printers/HL1210W/cupswrapper/brother_lpdwrapper_HL1210W" % get.workDIR())
|
||||
pisitools.insinto("/opt", "opt/*")
|
||||
@@ -0,0 +1,172 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# CUPS filter for HL1210W
|
||||
# Copyright Brother Industries,Ltd 2006-2014
|
||||
#
|
||||
# Ver1.05
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
LOGFILE="/dev/null"
|
||||
LOGCLEVEL="7"
|
||||
DEBUG=0
|
||||
LOG_LATESTONLY=1
|
||||
|
||||
PRINTER=HL1210W
|
||||
BASEDIR=/usr/share/cups/model/$PRINTER/
|
||||
|
||||
LATESTINFO=/tmp/HL1210W_latest_print_info
|
||||
rm -f $LATESTINFO
|
||||
touch $LATESTINFO
|
||||
|
||||
options="$5"
|
||||
|
||||
if [ "$(echo $options | grep 'force-debug=1')" != '' ];then
|
||||
DEBUG=1
|
||||
elif [ "$(echo $options | grep 'force-debug=2')" != '' ];then
|
||||
DEBUG=2
|
||||
elif [ "$(echo $options | grep 'force-debug=3')" != '' ];then
|
||||
DEBUG=3
|
||||
elif [ "$(echo $options | grep 'force-debug=4')" != '' ];then
|
||||
DEBUG=4
|
||||
fi
|
||||
|
||||
errorcode=0
|
||||
|
||||
set +o noclobber
|
||||
if [ $DEBUG != 0 ]; then
|
||||
LOGFILE=/tmp/br_cupsfilter_debug_log
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "$PPD" = "" ]; then
|
||||
PPD="/usr/share/cups/model/$PRINTER.ppd"
|
||||
fi
|
||||
|
||||
|
||||
if [ $LOGFILE != "/dev/null" ]; then
|
||||
if [ $LOG_LATESTONLY = "1" ]; then
|
||||
rm -f $LOGFILE
|
||||
date >$LOGFILE
|
||||
else
|
||||
if [ -e $LOGFILE ]; then
|
||||
date >>$LOGFILE
|
||||
else
|
||||
date >$LOGFILE
|
||||
fi
|
||||
fi
|
||||
echo "arg0 = $0" >>$LOGFILE
|
||||
echo "arg1 = $1" >>$LOGFILE
|
||||
echo "arg2 = $2" >>$LOGFILE
|
||||
echo "arg3 = $3" >>$LOGFILE
|
||||
echo "arg4 = $4" >>$LOGFILE
|
||||
echo "arg5 = $5" >>$LOGFILE
|
||||
echo "arg6 = $6" >>$LOGFILE
|
||||
echo "PPD = $PPD" >>$LOGFILE
|
||||
fi
|
||||
|
||||
|
||||
TMP_RC=/tmp/brHL1210Wrc_$$
|
||||
|
||||
cp /opt/brother/Printers/$PRINTER//inf/brHL1210Wrc $TMP_RC
|
||||
export BRPRINTERRCFILE=$TMP_RC
|
||||
if [ $DEBUG != 0 ]; then
|
||||
echo BRPRINTERRCFILE=$BRPRINTERRCFILE >>$LOGFILE
|
||||
fi
|
||||
|
||||
if [ -e "/$BASEDIR/lpd/filter_"${PRINTER}"" ]; then
|
||||
:
|
||||
else
|
||||
echo "ERROR: /$BASEDIR/lpd/filter_"$PRINTER" does not exist" >>$LOGFILE
|
||||
echo "ERROR: /$BASEDIR/lpd/filter_"$PRINTER" does not exist" >> $LATESTINFO
|
||||
errorcode=2
|
||||
rm $TMP_RC
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4" ]; then
|
||||
if [ $DEBUG = 0 ]; then
|
||||
/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4 $PRINTER $PPD 0 "$options" >> /dev/null
|
||||
else
|
||||
/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4 $PRINTER $PPD $LOGCLEVEL "$options" >>$LOGFILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $DEBUG = 0 ]; then
|
||||
if [ $# -ge 7 ]; then
|
||||
cat $6 | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
else
|
||||
cat | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
fi
|
||||
|
||||
echo brHL1210Wrc_$$ >> $LATESTINFO
|
||||
cat $TMP_RC >> $LATESTINFO
|
||||
|
||||
rm $TMP_RC
|
||||
exit $errorcode
|
||||
else
|
||||
## ---------------- for debug
|
||||
echo --------------------------- >>$LOGFILE
|
||||
cat $BRPRINTERRCFILE >>$LOGFILE
|
||||
echo --------------------------- >>$LOGFILE
|
||||
|
||||
|
||||
INPUT_TEMP_PS=`mktemp /tmp/br_input_ps.XXXXXX`
|
||||
if [ $# -ge 7 ]; then
|
||||
cat $6 > $INPUT_TEMP_PS
|
||||
else
|
||||
cat > $INPUT_TEMP_PS
|
||||
fi
|
||||
|
||||
case $DEBUG in
|
||||
1)
|
||||
export LPD_DEBUG=1
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
;;
|
||||
2)
|
||||
export LPD_DEBUG=2
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
;;
|
||||
3)
|
||||
export LPD_DEBUG=3
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
;;
|
||||
4)
|
||||
export LPD_DEBUG=4
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
echo " ------Print Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER" | hexdump -C >>$LOGFILE
|
||||
;;
|
||||
esac
|
||||
rm
|
||||
|
||||
echo brHL1210Wrc_$$ >> $LATESTINFO
|
||||
cat $TMP_RC >> $LATESTINFO
|
||||
|
||||
rm $TMP_RC
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# CUPS filter for HL1210W
|
||||
# Copyright Brother Industries,Ltd 2006-2014
|
||||
#
|
||||
# Ver1.05
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
LOGFILE="/dev/null"
|
||||
LOGCLEVEL="7"
|
||||
DEBUG=0
|
||||
LOG_LATESTONLY=1
|
||||
|
||||
PRINTER=HL1210W
|
||||
BASEDIR=/opt/brother/Printers/$PRINTER/
|
||||
|
||||
LATESTINFO=/tmp/HL1210W_latest_print_info
|
||||
rm -f $LATESTINFO
|
||||
touch $LATESTINFO
|
||||
|
||||
options="$5"
|
||||
|
||||
if [ "$(echo $options | grep 'force-debug=1')" != '' ];then
|
||||
DEBUG=1
|
||||
elif [ "$(echo $options | grep 'force-debug=2')" != '' ];then
|
||||
DEBUG=2
|
||||
elif [ "$(echo $options | grep 'force-debug=3')" != '' ];then
|
||||
DEBUG=3
|
||||
elif [ "$(echo $options | grep 'force-debug=4')" != '' ];then
|
||||
DEBUG=4
|
||||
fi
|
||||
|
||||
errorcode=0
|
||||
|
||||
set +o noclobber
|
||||
if [ $DEBUG != 0 ]; then
|
||||
LOGFILE=/tmp/br_cupsfilter_debug_log
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "$PPD" = "" ]; then
|
||||
PPD="/usr/share/cups/model/$PRINTER.ppd"
|
||||
fi
|
||||
|
||||
|
||||
if [ $LOGFILE != "/dev/null" ]; then
|
||||
if [ $LOG_LATESTONLY = "1" ]; then
|
||||
rm -f $LOGFILE
|
||||
date >$LOGFILE
|
||||
else
|
||||
if [ -e $LOGFILE ]; then
|
||||
date >>$LOGFILE
|
||||
else
|
||||
date >$LOGFILE
|
||||
fi
|
||||
fi
|
||||
echo "arg0 = $0" >>$LOGFILE
|
||||
echo "arg1 = $1" >>$LOGFILE
|
||||
echo "arg2 = $2" >>$LOGFILE
|
||||
echo "arg3 = $3" >>$LOGFILE
|
||||
echo "arg4 = $4" >>$LOGFILE
|
||||
echo "arg5 = $5" >>$LOGFILE
|
||||
echo "arg6 = $6" >>$LOGFILE
|
||||
echo "PPD = $PPD" >>$LOGFILE
|
||||
fi
|
||||
|
||||
|
||||
TMP_RC=/tmp/brHL1210Wrc_$$
|
||||
|
||||
cp /opt/brother/Printers/$PRINTER//inf/brHL1210Wrc $TMP_RC
|
||||
export BRPRINTERRCFILE=$TMP_RC
|
||||
if [ $DEBUG != 0 ]; then
|
||||
echo BRPRINTERRCFILE=$BRPRINTERRCFILE >>$LOGFILE
|
||||
fi
|
||||
|
||||
if [ -e "/$BASEDIR/lpd/filter_"${PRINTER}"" ]; then
|
||||
:
|
||||
else
|
||||
echo "ERROR: /$BASEDIR/lpd/filter_"$PRINTER" does not exist" >>$LOGFILE
|
||||
echo "ERROR: /$BASEDIR/lpd/filter_"$PRINTER" does not exist" >> $LATESTINFO
|
||||
errorcode=2
|
||||
rm $TMP_RC
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4" ]; then
|
||||
if [ $DEBUG = 0 ]; then
|
||||
/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4 $PRINTER $PPD 0 "$options" >> /dev/null
|
||||
else
|
||||
/opt/brother/Printers/$PRINTER//cupswrapper/brcupsconfig4 $PRINTER $PPD $LOGCLEVEL "$options" >>$LOGFILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $DEBUG = 0 ]; then
|
||||
if [ $# -ge 7 ]; then
|
||||
cat $6 | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
else
|
||||
cat | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
fi
|
||||
|
||||
echo brHL1210Wrc_$$ >> $LATESTINFO
|
||||
cat $TMP_RC >> $LATESTINFO
|
||||
|
||||
rm $TMP_RC
|
||||
exit $errorcode
|
||||
else
|
||||
## ---------------- for debug
|
||||
echo --------------------------- >>$LOGFILE
|
||||
cat $BRPRINTERRCFILE >>$LOGFILE
|
||||
echo --------------------------- >>$LOGFILE
|
||||
|
||||
|
||||
INPUT_TEMP_PS=`mktemp /tmp/br_input_ps.XXXXXX`
|
||||
if [ $# -ge 7 ]; then
|
||||
cat $6 > $INPUT_TEMP_PS
|
||||
else
|
||||
cat > $INPUT_TEMP_PS
|
||||
fi
|
||||
|
||||
case $DEBUG in
|
||||
1)
|
||||
export LPD_DEBUG=1
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
;;
|
||||
2)
|
||||
export LPD_DEBUG=2
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER"
|
||||
;;
|
||||
3)
|
||||
export LPD_DEBUG=3
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
;;
|
||||
4)
|
||||
export LPD_DEBUG=4
|
||||
echo "" >>$LOGFILE
|
||||
echo " ------PostScript Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS >>$LOGFILE
|
||||
echo " ------Print Data-------" >>$LOGFILE
|
||||
cat $INPUT_TEMP_PS | /$BASEDIR/lpd/filter_"$PRINTER" | hexdump -C >>$LOGFILE
|
||||
;;
|
||||
esac
|
||||
rm
|
||||
|
||||
echo brHL1210Wrc_$$ >> $LATESTINFO
|
||||
cat $TMP_RC >> $LATESTINFO
|
||||
|
||||
rm $TMP_RC
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org.tr/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>brother-1210w</Name>
|
||||
<Homepage></Homepage>
|
||||
<Packager>
|
||||
<Name>Ayhan Yalçınsoy</Name>
|
||||
<Email>ayhanyalcinsoy@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2</License>
|
||||
<Icon>brother-1210w</Icon>
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>Brother HL-1210W CUPS driver. After installing this, install printer from CUPS web interface</Summary>
|
||||
<Description>Brother HL-1210W CUPS driver. After installing this, install printer from CUPS web interface</Description>
|
||||
<Archive sha1sum="74a6e2ad6bd1373ddb04a231c0ab61fae4b67347" type="binary">http://download.brother.com/welcome/dlf101549/hl1210wlpr-3.0.1-1.i386.rpm</Archive>
|
||||
<Archive sha1sum="279ed55b210f57943e92c7ccb72a90830bbdbeb6" type="binary">http://download.brother.com/welcome/dlf101548/hl1210wcupswrapper-3.0.1-1.i386.rpm</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>rpm2targz</Dependency>
|
||||
</BuildDependencies>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>brother-1210w</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>cups</Dependency>
|
||||
<Dependency>ghostscript</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library">/opt</Path>
|
||||
<Path fileType="library">/usr/lib/cups</Path>
|
||||
<Path fileType="data">/usr/share/cups</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2020-04-06</Date>
|
||||
<Version>3.0.1</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Ayhan Yalçınsoy</Name>
|
||||
<Email>ayhanyalcinsoy@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user