---
name: scanbuttond
version: 0.2.3_1
origin: sysutils/scanbuttond
comment: A daemon to monitor and configure modern scanner's buttons
arch: freebsd:9:x86:64
www: http://scanbuttond.sourceforge.net/
maintainer: dthiele@gmx.net
prefix: /usr/local
licenselogic: single
licenses: [GPLv2]
flatsize: 141609
desc: "This is the port of scanbuttond, an utility to monitor the various buttons\nfound
  on many modern scanners which are intended to trigger certain actions \nlike copying,
  faxing or mailing the scanned document.\nThis daemon queries the scanner button
  state several times per second via \nlibusb and if it detects that a button is pressed
  it runs a shell script with\nthe button number as an argument. \n\nThe supported
  scanner backends currently are: epson, niash, plustek, snapscan\n\nAuthor:\tBernhard
  Stiftner <root84@users.sourceforge.net>\nWWW:\thttp://scanbuttond.sourceforge.net/\n"
categories: [sysutils]
files:
  /usr/local/bin/scanbuttond: 7af7378f4d1e5dcc2cba4c04462ea1d6b4b5b4d0386843eb3cc2a4e2d689d545
  /usr/local/etc/scanbuttond/buttonpressed.sh.sample: 9681b3f580fee1831e3b2f776bbae5e7625662c37b69def920ae2a62cebea1af
  /usr/local/etc/scanbuttond/initscanner.sh.sample: 1c7b796131fb5140c48cb7e503e35f0e409bd5063f7a4643fa0407f1b7a52432
  /usr/local/etc/scanbuttond/meta.conf.sample: c3009f11c4992284bbe0228ee239dfc6760107efd727f0b9884a0b2aa67e0ad9
  /usr/local/lib/libscanbtnd-backend_epson.la: deac3ac4d37ccd85e481707d53f9a68d858c5b99ab1e16f93ba2f60a8029e9ef
  /usr/local/lib/libscanbtnd-backend_epson.so: '-'
  /usr/local/lib/libscanbtnd-backend_epson.so.1: 1b6632f4f4ddb3a3d13d22477fa375e2570cdf0ed4dd60714ed2cb920d287067
  /usr/local/lib/libscanbtnd-backend_meta.la: 74183a581d48523740b6f0bb6f6b11dd5b6a709c22b9c505f733202793f02101
  /usr/local/lib/libscanbtnd-backend_meta.so: '-'
  /usr/local/lib/libscanbtnd-backend_meta.so.1: f08bd07d9a7a662b9e464fc58383edabf3667c73ce512813e01ba2913872488d
  /usr/local/lib/libscanbtnd-backend_mustek.la: 2d4285a155a48dfbf17747cf918131aad072792b1a1b48b37cf35c0c839a3962
  /usr/local/lib/libscanbtnd-backend_mustek.so: '-'
  /usr/local/lib/libscanbtnd-backend_mustek.so.1: 42af0af3b6ee2a4a08f01d889d3acd40a8478c55cfe184cd4380ed10fe3b6c73
  /usr/local/lib/libscanbtnd-backend_niash.la: b6004754001d8e169db175073f5846b2bbe83f11898f897450288bc4cfaf6625
  /usr/local/lib/libscanbtnd-backend_niash.so: '-'
  /usr/local/lib/libscanbtnd-backend_niash.so.1: 6293981ed49fbe1dded333ab9319f2a2adcbfa58490ea818e9a7853963de8e36
  /usr/local/lib/libscanbtnd-backend_plustek.la: 1729ac923c1ada21296b290a2d2a87de33febd09227ad821038a76a35370f822
  /usr/local/lib/libscanbtnd-backend_plustek.so: '-'
  /usr/local/lib/libscanbtnd-backend_plustek.so.1: 3d166ce7cc9e5c844056fb6a62d86bfd42cce7c5e55d32bd0f4df80d792a5ba1
  /usr/local/lib/libscanbtnd-backend_plustek_umax.la: 4d398d062e8f593a3ca5e5cd96fa846b7f0d377f61b3b7a1f476a0bd73c37297
  /usr/local/lib/libscanbtnd-backend_plustek_umax.so: '-'
  /usr/local/lib/libscanbtnd-backend_plustek_umax.so.1: e7db513c1b828edbda21cb7005c6ac09695bae4f4e4858d278ead7be5e75b5e0
  /usr/local/lib/libscanbtnd-backend_snapscan.la: 0ebbc6f8d49fd52f06be78eae74eb22db5b3a279198ce4f7d3549ed7e8631231
  /usr/local/lib/libscanbtnd-backend_snapscan.so: '-'
  /usr/local/lib/libscanbtnd-backend_snapscan.so.1: 5cb37a368f999734ec1cddb65a3cb81e78fb4662bbe193bd1e2f8f7092548b96
  /usr/local/lib/libscanbtnd-interface_usb.la: 3913485289c993d63a419939421cc7b8ab58c955781aa783c41bc7ebdf53c13b
  /usr/local/lib/libscanbtnd-interface_usb.so: '-'
  /usr/local/lib/libscanbtnd-interface_usb.so.1: 74d2ffd078761b1b3be6feb4f786507a5d6ca2c452a440644f4cff7c0989d349
  /usr/local/share/licenses/scanbuttond-0.2.3_1/GPLv2: 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
  /usr/local/share/licenses/scanbuttond-0.2.3_1/LICENSE: 7e1394d03c5f275a402fe721ff1d1349449ea8602b52af954c76463afcdb6ef7
  /usr/local/share/licenses/scanbuttond-0.2.3_1/catalog.mk: 0d7c26537829117d7a12f7eeddcd5e68aa872f6dd42be76ffbbf5eaddc4383ac
directories:
  /usr/local/share/licenses/scanbuttond-0.2.3_1/: n
  /usr/local/share/licenses/: y
  /usr/local/etc/scanbuttond/: n
scripts:
  post-install: |
    if [ ! -f /usr/local/etc/scanbuttond/buttonpressed.sh ] ; then cp -p /usr/local/etc/scanbuttond/buttonpressed.sh.sample /usr/local/etc/scanbuttond/buttonpressed.sh; fi
    if [ ! -f /usr/local/etc/scanbuttond/initscanner.sh ] ; then cp -p /usr/local/etc/scanbuttond/initscanner.sh.sample /usr/local/etc/scanbuttond/initscanner.sh; fi
    if [ ! -f /usr/local/etc/scanbuttond/meta.conf ] ; then cp -p /usr/local/etc/scanbuttond/meta.conf.sample /usr/local/etc/scanbuttond/meta.conf; fi
    /sbin/ldconfig -m /usr/local/lib
    cd /usr/local
  pre-deinstall: |
    if cmp -s /usr/local/etc/scanbuttond/buttonpressed.sh.sample /usr/local/etc/scanbuttond/buttonpressed.sh; then rm -f /usr/local/etc/scanbuttond/buttonpressed.sh; fi
    if cmp -s /usr/local/etc/scanbuttond/initscanner.sh.sample /usr/local/etc/scanbuttond/initscanner.sh; then rm -f /usr/local/etc/scanbuttond/initscanner.sh; fi
    if cmp -s /usr/local/etc/scanbuttond/meta.conf.sample /usr/local/etc/scanbuttond/meta.conf; then rm -f /usr/local/etc/scanbuttond/meta.conf; fi
    /sbin/ldconfig -R
    cd /usr/local
  post-deinstall: |
    cd /usr/local
message: "-------------------------------------------------------------------------------\nscanbuttond
  has been installed, but is not quite ready to be used yet.\n\nTo make scanbuttond
  actually do something you have to edit \n/usr/local/etc/scanbuttond/buttonpressed.sh
  and change it to your needs.\n\nIf you are having trouble getting your scanner detected
  try uncommenting one\nof the following lines in /usr/local/etc/scanbuttond/initscanner.sh:\n\nscanimage
  -n\nor\nsane-find-scanner  > /dev/null 2> /dev/null\n\nIf your scanner is connected
  via a hot-plug capable technology (e.g. USB)\nyou can conveniently enable scanbuttond
  every time you attach you scanner by\nusing devd. In order to do so you may add
  the following lines to your \n/etc/devd.conf and restart devd after you are done.
  \n(Make sure to replace device-name, vendor, product and back-end name to \nsomething
  that matches your environment)\n\nattach 20 {\n\tdevice-name \"ugen[0-9]+\";\n\tmatch
  \"vendor\" \"0x04a9\";\n\tmatch \"product\" \"0x220e\";\n\taction \"/usr/local/bin/scanbuttond
  \\\n\t\t-s /usr/local/etc/scanbuttond/buttonpressed.sh \\\n\t\t-S /usr/local/etc/scanbuttond/initscanner.sh
  \\\n\t\t-b /usr/local/lib/libscanbtnd-backend_plustek.so\";\n};\n  \ndetach 20 {\n\tdevice-name
  \"ugen[0-9]+\";\n\tmatch \"vendor\" \"0x04a9\";\n\tmatch \"product\" \"0x220e\";\n\taction
  \"/usr/bin/killall scanbuttond\";\n};\n-------------------------------------------------------------------------------\n"
