diff options
author | Aseem Athale | 2022-05-06 19:54:25 +0530 |
---|---|---|
committer | Aseem Athale | 2022-05-06 19:54:25 +0530 |
commit | 6f30bb295a45327df57ef17bf20c014d5719e546 (patch) | |
tree | cf26928230c9da90dfe62d5f601fb6177ba0569f | |
parent | 36f22f716e5833e0b36c4b03a8c635cf9630cf1a (diff) | |
download | aur-6f30bb295a45327df57ef17bf20c014d5719e546.tar.gz |
captdriver-git: Add postinstall file
Inspired by the post install file of capt-src, this gives further post
install instructions to (hopefully) get your printer working.
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 1 | ||||
-rw-r--r-- | captdriver-git.install | 50 |
3 files changed, 52 insertions, 0 deletions
@@ -3,6 +3,7 @@ pkgbase = captdriver-git pkgver = r103.c798add pkgrel = 1 url = https://github.com/mounaiban/captdriver + install = captdriver-git.install arch = any license = GPL makedepends = automake @@ -9,6 +9,7 @@ pkgdesc='Open source CUPS driver for Canon CAPT printers (not stable, formerly f arch=('any') url='https://github.com/mounaiban/captdriver' depends=('cups') +install=${pkgname}.install license=('GPL') makedepends=('automake' 'git' 'gcc') source=("$_gitname::git+https://github.com/mounaiban/captdriver.git" "capt.rules") diff --git a/captdriver-git.install b/captdriver-git.install new file mode 100644 index 000000000000..75afa61a84e1 --- /dev/null +++ b/captdriver-git.install @@ -0,0 +1,50 @@ +post_install(){ + cat << EOF + >>> Installation: + >>> + >>> 1) Before doing anything, be sure to add your user to the lp group: + >>> eg. + >>> gpasswd -a your_user lp + >>> and then reboot, or relogin + >>> + >>> 2) Connect the printer to your computer, turn it on and start CUPS, or restart it if it was already running + >>> eg. + >>> systemctl restart cups.service + >>> + >>> Ensure that the printer device is connected and switched on. + >>> + >>> With captdriver and the CUPS command-line programs already + >>> installed, run the following command + >>> to identify the printer's URI: + >>> lpinfo -v + >>> Example output of "lpinfo -v" : + >>> file cups-brf:/ + >>> network beh + >>> network lpd + >>> network https + >>> network ipps + >>> file cups-pdf:/ + >>> network ipp + >>> network http + >>> network socket + >>> direct usb://Canon/LBP2900?serial=0000C3J0LGaQ + >>> network smb + >>> + >>> 3) Run this command to add the printer to CUPS: + >>> /usr/bin/lpadmin -p <name> -m <corresponding ppd> -v <device path in lpinfo -v> -E + >>> eg. + >>> /usr/bin/lpadmin -p 'LBP2900' -m CANON-LBP2900-3000.ppd -v 'usb://Canon/LBP2900?serial=0000C3J0LGaQ' -E + >>> (you can find ppds in the /usr/share/cups/model/ directory) + >>> 4) Optionally, you can set the newly-installed printer as default with this command: + >>> lpadmin -d 'LBP3000' + >>> + >>> For more details check out the project wiki: https://github.com/mounaiban/captdriver/wiki + >>> and the project official install guide: + >>> https://github.com/mounaiban/captdriver/wiki/Building-and-Installing-captdriver%3A-A-Unified-Guide + >>> +EOF +} + +op=$1 +shift +$op $* |