Brother printer: how to build driver with no instructions at all?

HP Laptop 15s-eq1xxx
Kernel: 6.1.39-3-lts
Desktop: KDE Plasma
EndeavourOS

Hi,
I have a printer Brother MFC-JW97DW which works well in Ubuntu/Debian. For EndeavourOS I found this:
git clone https://aur.archlinux.org/brother-mfc-j491dw.git.
cloned, opened the new directory in my HOME, brother-mfc-j491dw But there are only two files in it:
brother-mfc-j491dw.install and PKGBUILD. No File README. Would anybody give me instructions instructions how to build the driver, please?
Thanks, endocub
P.S. I had found this git-address somewhere here: https://forum.endeavouros.com/t/brother-printer-issues/14401/7
Edit: Sorry, can’t re-find the citation in the above link. However, this https://aur.archlinux.org/packages/brother-mfc-j491dw definitely led me to the git-link.

The PKGBUILD contains instructions for building a package.

You might want to have a look at the following link for how to use makepkg for building and installing a package using a PKGBUILD: https://wiki.archlinux.org/title/Makepkg#Usage

1 Like

Thank you @pebcak, according to your tips, building and installing was easy! However, “lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.” saddened me. Yet presently I can print :grinning:. However, I cannot find the scanner driver for my multifunctional printer/scanner :cry: let alone how to install it
P.S. My printer is listed under menu > printers as MFCJ491DW; that is 6 versions below my …97.

I succeded installing brscan3 driver, but…

$ brsaneconfig3  -a  name=SCANNER  model=MFC-J491DW  ip=<valid ipp>
gives me
**Invalid model name**

…whatever I choose for model name, lowercase, capital letters no “MFC”, hyphen, no hyphen… always “Invalid model name”.
Maybe somebody has a suggestion?
Thanks, endocub
P.S. It took me a few hours to figure it out!
P.P.S Will I need the brscan4 key, too?

SOLUTION: I installed brscan4, did

$ sudo brsaneconfig4  -a  name=SCANNER  model=MFC-J491DW  ip=<printer's id>
$ brsaneconfig4 -q | grep SCANNER
* MFC-J491DW   [  192.168.2.221]  SCANNER

and now my Brother scans like a firie!

1 Like

Did you not try the AUR package?

https://aur.archlinux.org/packages/brother-mfc-j497dw

@ ricklinux: Thank you very much! This did escape me so far, I had found only the 491 AUR site. I will change the driver/scanner from the j491 stuff (also from AUR) to the 497 when I will have recovered :wink: from my hours-long desperate searching.

@ricklinux, sorry, but how can I safely remove my old stuff built from https://aur.archlinux.org/brother-mfc-j491dw.git
before I build the new https://aur.archlinux.org/brother-mfc-j497dw.git

I’m not sure how you installed it or how it should be removed. I don’t typically go outside of pacman or AUR helpers to install packages.

Just use sudo pacman -R X replacing X with the name of the package.

@ ricklinux; I did it exactly as in the link you just showed. It inevitably will lead to clone the Git repository of brother-mfc-j497dw, run git clone https://aur.archlinux.org/brother-mfc-j497dw.git. and then to make etc. etc. etc.

@pebcak: Thank you!

That link is not the same link. This package is in the AUR.

https://aur.archlinux.org/packages/brother-mfc-j497dw

yay -S brother-mfc-j497dw

Thank you @ricklinux and forgive a newbie, I have been taking those first lines too much word for word, e.g.
`Git Clone URL: https://aur.archlinux.org/brscan4.git (read-only, click to copy)

@pebcak:

endocub

1h

Just use sudo pacman -R X replacing X with the name of the package.

Explain please, @[pebcak], how the package can be still there though I deleted it:
pebcak

endocub

1h

Just use sudo pacman -R X replacing X with the name of the package.

Explain please:

$ sudo pacman -R brother-mfc-j491dw
...
Package (1)         Old Version  Net Change
brother-mfc-j491dw  1.0.5-1       -6,96 MiB
Total Removed Size:  6,96 MiB
....
$ ls -la
...
brother-mfc-j491dw
...
$ sudo pacman -R brother-mfc-j491dw
[sudo] password for <user>: 
error: target not found: brother-mfc-j491dw
$

pacman says it is not there, but ls says it is there, and even with Dolphin I can into the still existing folders and see all files!
How can I remove - or better unbuild or unmake- this and similar from-git-built-package?
Thanks, endocub
P.S. Sorry for mistakes in formatting in this forum, sometimes weird things happen that I never encountered in different forums,

The build file is still present in your Home directory because you initially used git-clone instead of using Yay. Pacman (or by extension Yay) will not delete anything from your Home directory.

Just delete the brother-mfc-j491dw build directory from your Home. The application itself has already been uninstalled.

1 Like

OK, I installed the driver and brcsan4 frum AUR. The problem: when I did it with git, the new printer appeared automatically in menu > printers. Now, I have to create it manjually. And I do not know where the hell the drivers to find I installed?

You use cups to do that. Is this printer on usb or WiFi or Ethernet?

localhost:631

Edit: https://discovery.endeavouros.com/printers/printers/2021/03/

Thanks, and sorry for being spoiled by years of Ubuntu/Debian comfort :wink:
I was successful with WiFi doing eveything with Endeavorous Menu > Printers, just putting into printer configure > connection: ‘socket://(printer ip address)’ (which I learned from CUPS).
Now I hope, I will be as successful in creating a second instance of this printer via USB.>

Creating a second instance of my printer, viz., USB. was… like done by “The Flash”! Disconnected WiFi, connected my printer via USB cable to my laptop, created the new printer, named it, noticed that in printer’s “configure > connections” still was the ‘socket://(printer’s ip addres)’, did not care, logged out, logged in again, and, lo and behold, the printer printed and scanned without internet. BTW, “configute > connection” had corrected itself as if by magic, some long line starting with “usb…”. I am getting to love Endeavourous :heartbeat: