Should I create a PKGBUILD to install printer software from source on Arch?

0
0
Asked By MellowCedar42 On

The software for my printer is officially distributed as packages for Debian-based and Fedora-based systems, but there is no Arch package on the vendor's website. They do provide the source code, along with installation scripts intended for deb and dnf systems. I have built software with make before, but I understand that creating a PKGBUILD may be the better Arch-native approach because it lets pacman track the installed files and dependencies. Is writing a PKGBUILD the recommended method, or is manually compiling and installing from source acceptable?

2 Answers

Answered By OrbitMango7 On

A PKGBUILD is usually the preferred approach, but it does not replace make—it generally runs make inside its build() function. First check whether the software is already available in the official repositories or as an existing user-maintained package. If not, you can compile it manually for a quick test, then base a PKGBUILD on a simple existing one, updating the source URL, dependencies, build commands, install steps, and package metadata. That way pacman can install and remove it cleanly.

MellowCedar42 -

I think I found an existing user-maintained package, but I was hoping to avoid using those packages. I may use it as a reference for learning how to write my own PKGBUILD.

Answered By QuietNimbus18 On

Manually running make can work, but installing files directly into the system makes them harder for pacman to track and remove later. A PKGBUILD is essentially a recipe that builds the source and creates an Arch package, so it is the cleaner long-term option. Just make sure the printer model, required dependencies, and any vendor-specific install instructions are supported before packaging it.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.