Salut !
Il y a du progrès. Le makepkg va plus loin. Il plante avec une erreur de compilation. Je sais que c'est une question de référence à un dossier, mais je ne sais trop comment corriger le tout. Cela doit avoir un rapport avec la syntaxe ../ de la ligne 27 du PKGBUILD. Les .. doivent indiquer à l'utilitaire de remonter de deux niveaux.
Le message d'erreur :
PKGBUILD: line 27: patch: command not found
PKGBUILD: line 30: /home/fonguy21/pkgbuild/brothermfc240c/src/usr/local/Brother/cupswrapper/mfc240ccupswrapper-1.0.1-1: Aucun fichier ou répertoire de ce type
cp: ne peut évaluer `/home/fonguy21/pkgbuild/brothermfc240c/src/usr/lib': Aucun fichier ou répertoire de ce type
rm: ne peut enlever `/home/fonguy21/pkgbuild/brothermfc240c/pkg/usr/share/brother/cupswrapper/mfc240ccupswrapper-1.0.1-1': Aucun fichier ou répertoire de ce type
rm: ne peut enlever `/home/fonguy21/pkgbuild/brothermfc240c/pkg/usr/share/brother/inf/setupPrintcapij': Aucun fichier ou répertoire de ce type
install: ne peut évaluer `ppd_file': Aucun fichier ou répertoire de ce type
install: ne peut évaluer `wrapper': Aucun fichier ou répertoire de ce type
==> ERREUR: La compilation a échoué.
Abandon...
En tous les cas, voici la structure hiérarchique :
- Les fichiers PKGBUILD, install et patch sont dans le dossier brothermfc240c
- Ce dossier est dans /home/fonguy21/pkgbuild
Voici les sources :
PKGBUILD
Code : Tout sélectionner
# based on the brother-MFC210C package by Neil Drummond
pkgname="brother-mfc240c"
pkgver="1.0.1.1"
pkgrel="1"
pkgdesc="Brother CUPS driver: MFC-240C"
url="http://www.brother.com/"
license=('custom:Brother Industries')
depends=('tcsh' 'a2ps')
makedepends=('rpmextract')
install="brother-mfc240c.install"
arch=('i686')
source=(
brother-mfc240c.patch \
http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/mfc240ccupswrapper-1.0.1-1.i386.rpm \
http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others/mfc240clpr-1.0.1-1.i386.rpm
)
build()
{
cd "$startdir/src" || return 1
for n in *.rpm; do
rpmextract.sh "$n" || return 1
done
cd "$startdir/src/usr/" || return 1
patch -p1 < ../brother-mfc240c.patch
cd "$startdir/src" || return 1
"$startdir/src/usr/local/Brother/cupswrapper/mfc240ccupswrapper-1.0.1-1"
mkdir -p "$startdir/pkg/usr/share"
cp -R "$startdir/src/usr/bin" "$startdir/pkg/usr"
cp -R "$startdir/src/usr/lib" "$startdir/pkg/usr"
cp -R "$startdir/src/usr/local/Brother" "$startdir/pkg/usr/share/brother"
rm "$startdir/pkg/usr/share/brother/cupswrapper/mfc240ccupswrapper-1.0.1-1"
rm "$startdir/pkg/usr/share/brother/inf/setupPrintcapij"
install -m 644 -D ppd_file "$startdir/pkg/usr/share/cups/model/brmfc240c_cups.ppd"
install -m 755 -D wrapper "$startdir/pkg/usr/lib/cups/filter/brlpdwrappermfc240c"
#return 1
}
md5sums=('309dc2a43705c9404fae083629af0f2e'
'207cf1eb6bbab8d2ecafd8a2b5bc8f4b'
'e2564327cb7fc6501ca9657080855322')
brothermfc20c.install
Code : Tout sélectionner
post_install() {
__port2=`lpinfo -v | grep -i 'usb://Brother/MFC-240C' | head -1`
if [ "$__port2" = '' ];then
__port2=`lpinfo -v | grep 'usb://' | head -1`
fi
__port=`echo $__port2| sed s/direct//g`
if [ "$__port" = '' ];then
__port="usb:/dev/usb/lp0"
fi
lpadmin -p MFC240C -E -v $__port -P /usr/share/cups/model/MFC240C.ppd
echo "If CUPS is not running now, start it after installation"
echo "and type command:"
echo " lpadmin -p MFC210C -E -v URL -P /usr/share/cups/model/MFC240C.ppd"
echo "where URL can be found using command:"
echo " lpinfo -v | grep -i 'Brother'"
echo "You can also register new printer using web interface at:"
echo " http://localhost:631/"
}
post_upgrade() {
/bin/true
}
pre_remove() {
lpadmin -x MFC240C
}
op=$1
shift
$op "$@"
brothermfc240c.patch
Code : Tout sélectionner
diff -ur old_usr/local/Brother/cupswrapper/cupswrapperMFC210C-1.0.0 usr/local/Brother/cupswrapper/mfc240ccupswrapper-1.0.1-1
--- old_usr/local/Brother/cupswrapper/mfc240ccupswrapper-1.0.1-1 2007-12-27 14:26:22.000000000 +0100
+++ usr/local/Brother/cupswrapper/mfc240ccupswrapper-1.0.1-1 2007-12-27 16:09:28.000000000 +0100
@@ -1,4 +1,4 @@
-#! /bin/csh
+#! /usr/bin/csh
#
# Brother Print filter
# Copyright (C) 2004 Brother. Industries, Ltd.
@@ -18,19 +18,20 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
#
-if("$1" == '-e')then
+if(false == true) then
+if("$1" == '-e') then
lpadmin -x MFC240C
rm -f /usr/share/cups/model/brmfc240c_cups.ppd
rm -f /usr/lib/cups/filter/brlpdwrappermfc240C
/etc/init.d/cups restart
exit(0)
endif
-if("$1" == "-r")then
+if("$1" == "-r") then
lpadmin -x MFC240C
/etc/init.d/cups restart
exit(0)
endif
-if($1 == "help" || $1 == "-h")then
+if($1 == "help" || $1 == "-h") then
echo 'option -h : help'
echo ' -i : install'
echo ' -e : uninstall'
@@ -40,11 +41,12 @@
mkdir -p /usr/local/Brother/filter
mkdir -p /usr/lib/cups/filter
-if(!(-e "/usr/local/Brother/lpd/filterMFC240C"))then
+if(!(-e "/usr/local/Brother/lpd/filterMFC240C")) then
echo "ERROR : Brother LPD filter is not installed."
endif
rm -f /usr/share/cups/model/brmfc240c_cups.ppd
-set ppd_file_name=/usr/share/cups/model/brmfc240c_cups.ppd
+endif
+set ppd_file_name=ppd_file
echo '*PPD-Adobe: "4.3"' >>$ppd_file_name
echo '' >>$ppd_file_name
@@ -609,10 +611,12 @@
echo '*Font Germany: Standard "(001.005)" Standard ROM' >>$ppd_file_name
echo '*Font SanDiego: Standard "(001.005)" Standard ROM' >>$ppd_file_name
echo '*Font US-Roman: Standard "(001.005)" Standard ROM' >>$ppd_file_name
-set brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrappermfc240C
+set brotherlpdwrapper=wrapper
+if(false == true) then
rm -f $brotherlpdwrapper
echo 'rm -f /usr/lib/cups/filter/brlpdwrappermfc240C'
-echo '#! /bin/csh' >> $brotherlpdwrapper
+endif
+echo '#! /usr/bin/csh' >> $brotherlpdwrapper
echo '#' >> $brotherlpdwrapper
echo '# Brother Print filter ' >> $brotherlpdwrapper
echo '# Copyright (C) 2004 Brother. Industries, Ltd.' >> $brotherlpdwrapper
@@ -1035,8 +1039,8 @@
echo ' echo "PPD = $PPD" >>$LOGFILE' >> $brotherlpdwrapper
echo 'endif' >> $brotherlpdwrapper
echo '' >> $brotherlpdwrapper
-echo 'if(!(-e /usr/local/Brother/lpd/filterMFC240C)) then' >> $brotherlpdwrapper
-echo ' echo "ERROR: /usr/local/Brother/lpd/filterMFC240C does not exist" >>$LOGFILE' >> $brotherlpdwrapper
+echo 'if(!(-e /usr/share/brother/lpd/filterMFC240C)) then' >> $brotherlpdwrapper
+echo ' echo "ERROR: /usr/share/brother/lpd/filterMFC240C does not exist" >>$LOGFILE' >> $brotherlpdwrapper
echo ' set errorcode=30' >> $brotherlpdwrapper
echo ' exit $errorcode' >> $brotherlpdwrapper
echo 'endif' >> $brotherlpdwrapper
@@ -1177,7 +1181,7 @@
echo '' >> $brotherlpdwrapper
echo '' >> $brotherlpdwrapper
echo 'if($DEBUG < 10) then' >> $brotherlpdwrapper
-echo ' cat $INPUT_TEMP_PS | /usr/local/Brother/lpd/filterMFC240C' >> $brotherlpdwrapper
+echo ' cat $INPUT_TEMP_PS | /usr/share/brother/lpd/filterMFC240C' >> $brotherlpdwrapper
echo '' >> $brotherlpdwrapper
echo ' if($LOGLEVEL > 2) then' >> $brotherlpdwrapper
echo ' if($LOGFILE != "/dev/null") then' >> $brotherlpdwrapper
@@ -1194,6 +1198,7 @@
echo '' >> $brotherlpdwrapper
echo '' >> $brotherlpdwrapper
echo '' >> $brotherlpdwrapper
+if(false == true) then
chmod a+x $brotherlpdwrapper
chmod a+w /usr/local/Brother/inf/brMFC240Crc
chmod a+w /usr/local/Brother/inf
@@ -1206,4 +1211,5 @@
/etc/init.d/cups restart
sleep 2s
lpadmin -p MFC240C -E -v usb:/dev/usb/lp0 -m brmfc240c_cups.ppd
+endif
exit(0)
Only in usr/local/Brother/lpd: .filterMFC240C.swp
diff -ur old_usr/local/Brother/lpd/filterMFC240C usr/local/Brother/lpd/filterMFC240C
--- old_usr/local/Brother/lpd/filterMFC240C 2007-12-27 14:26:22.000000000 +0100
+++ usr/local/Brother/lpd/filterMFC240C 2007-12-27 16:30:31.000000000 +0100
@@ -21,7 +21,7 @@
PRINTER="MFC240C"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
-BR_PRT_PATH=/usr/local/Brother/
+BR_PRT_PATH=/usr/share/brother
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
PAPER_INF=$BR_PRT_PATH/inf/paperinfij2
PSCONV=$BR_PRT_PATH/lpd/psconvertij2