summarylogtreecommitdiffstats
path: root/brother-hl4150cdn.install
diff options
context:
space:
mode:
authorfrederik2015-06-09 14:35:32 +0200
committerfrederik2015-06-09 14:35:32 +0200
commit89f694ca2ebc2fa8e074130b0199742d6c5fae71 (patch)
treee3d04b54727b5b71fdd1ff4cac8149e5c7af9aa3 /brother-hl4150cdn.install
downloadaur-89f694ca2ebc2fa8e074130b0199742d6c5fae71.tar.gz
Initial commit: move from aur to aur4
Diffstat (limited to 'brother-hl4150cdn.install')
-rw-r--r--brother-hl4150cdn.install50
1 files changed, 50 insertions, 0 deletions
diff --git a/brother-hl4150cdn.install b/brother-hl4150cdn.install
new file mode 100644
index 000000000000..39ddba9de039
--- /dev/null
+++ b/brother-hl4150cdn.install
@@ -0,0 +1,50 @@
+MODEL=hl4150cdn
+
+advisorymsg() {
+ cat <<EOM
+ The usblp kernel module must be disabled before CUPS can detect the
+ printer.
+
+ Start CUPS after installation and type the command:
+ lpadmin -p $MODEL -E -v \$URL -P /usr/share/cups/model/$MODEL.ppd
+ where \$URL can be found using the command:
+ lpinfo -v | grep -i 'Brother'
+ You can also register the new printer using web interface at:
+ http://localhost:631/
+
+ You may have to add "$MODEL" to /usr/share/Brother/inf/brPrintList for
+ proper operation and extended printing options.
+EOM
+}
+
+post_install() {
+ _port=`lpinfo -v | grep -i 'usb://Brother/' | head -1 | sed 's/direct //g'`
+
+ if [ "$_port" = '' ];then
+ _port="usb:/dev/usb/lp0"
+ fi
+ echo ""
+ echo "Added $MODEL configuration defaults to /usr/share/Brother/inf/brPrintList"
+ echo ""
+ cat /usr/share/Brother/Printer/hl4150cdn/inf/brhl4150cdnrc >> /usr/share/Brother/Printer/hl4150cdn/inf/brPrintList
+
+# echo $MODEL >> /usr/share/Brother/inf/brPrintList
+# lpadmin -p $MODEL -E -v $_port -P /usr/share/cups/model/$MODEL.ppd
+
+ advisorymsg
+}
+
+post_upgrade() {
+ advisorymsg
+}
+
+pre_remove() {
+ echo "Remember to unregister the $MODEL:"
+ echo " lpadmin -x $MODEL"
+ echo "Or visit the CUPS web interface at:"
+ echo " http://localhost:631/"
+ # lpadmin -x $MODEL
+
+ # Reverse this
+ # echo $MODEL >> /usr/share/Brother/inf/brPrintList
+}