Merge pull request #148146 from yochai/fix-mfcj470dwlpr

mfcj470dw-cupswrapper: fixed issue #147793
This commit is contained in:
Bobby Rong 2021-12-17 16:04:37 +08:00 committed by GitHub
commit 933b1b73de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,8 +21,7 @@ stdenv.mkDerivation rec {
--replace /etc "$out/etc" --replace /etc "$out/etc"
substituteInPlace $WRAPPER \ substituteInPlace $WRAPPER \
--replace "\`cp " "\`cp -p " \ --replace "cp " "cp -p "
--replace "\`mv " "\`cp -p "
''; '';
buildPhase = '' buildPhase = ''
@ -33,11 +32,18 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
TARGETFOLDER=$out/opt/brother/Printers/mfcj470dw/cupswrapper/ TARGETFOLDER=$out/opt/brother/Printers/mfcj470dw/cupswrapper/
mkdir -p $out/opt/brother/Printers/mfcj470dw/cupswrapper/ PPDFOLDER=$out/share/cups/model/
FILTERFOLDER=$out/lib/cups/filter/
mkdir -p $TARGETFOLDER
mkdir -p $PPDFOLDER
mkdir -p $FILTERFOLDER
cp brcupsconfpt1/brcupsconfpt1 $TARGETFOLDER cp brcupsconfpt1/brcupsconfpt1 $TARGETFOLDER
cp cupswrapper/cupswrappermfcj470dw $TARGETFOLDER/ cp cupswrapper/cupswrappermfcj470dw $TARGETFOLDER
cp PPD/brother_mfcj470dw_printer_en.ppd $TARGETFOLDER/ cp PPD/brother_mfcj470dw_printer_en.ppd $PPDFOLDER
ln -s ${mfcj470dwlpr}/lib/cups/filter/brother_lpdwrapper_mfcj470dw $FILTERFOLDER/
''; '';
cleanPhase = '' cleanPhase = ''