diff options
author | doakey3 | 2018-02-20 17:15:47 -0700 |
---|---|---|
committer | doakey3 | 2018-02-20 17:15:47 -0700 |
commit | 99772a6390a5d50bbfe4e5b8df7a38152d0c59a4 (patch) | |
tree | 16b9607611b961c558857a1e72b69e2477e996ef | |
download | aur-99772a6390a5d50bbfe4e5b8df7a38152d0c59a4.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | brother-pj723.install | 17 |
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f87da40067ee --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = brother-pj723 + pkgdesc = Brother PJ-723 CUPS driver + pkgver = 1.2.0 + pkgrel = 1 + url = http://www.brother.com + arch = any + license = GPL + source = http://download.brother.com/welcome/dlfp100218/pj723cupswrapper-1.2.0-0.i386.rpm + source = http://download.brother.com/welcome/dlfp100217/pj723lpr-1.2.0-0.i386.rpm + md5sums = e63370dea8692176e7d257d810145e76 + md5sums = f976c06d770c74b94d8d480d463260e0 + depends_x86_64 = lib32-glibc + +pkgname = brother-pj723 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f9680fafeaa7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: doakey3 <doakey3@gmail.com> + +pkgname="brother-pj723" +pkgver="1.2.0" +pkgrel="1" +pkgdesc="CUPS driver for Brother Pocket Jet 723 printer" +url="http://www.brother.com" +license=('GPL') +install="brother-pj723.install" +arch=('any') +depends_x86_64=('lib32-glibc') +md5sums=( + 'e63370dea8692176e7d257d810145e76' + 'f976c06d770c74b94d8d480d463260e0' +) + +source=( + http://download.brother.com/welcome/dlfp100218/pj723cupswrapper-1.2.0-0.i386.rpm + http://download.brother.com/welcome/dlfp100217/pj723lpr-1.2.0-0.i386.rpm +) + +prepare() { + # The point is to make all the needed edits to the files and place + # them into correct folders in the src folder. Pretend $srcdir is + # the root of the system. + + # .ppd + mkdir -p "$srcdir/usr/share/ppd/Brother" + _ppd="$srcdir/opt/brother/PTouch/pj723/cupswrapper/brother_pj723_printer_en.ppd" + _out_ppd="$srcdir/usr/share/ppd/Brother/brother_pj723_printer_en.ppd" + _out_wrapper="/usr/Brother/Printer/pj723/cupswrapper/brother_lpdwrapper_pj723" + sed "s|brother_lpdwrapper_pj723|${_out_wrapper}|g" "$_ppd" > "$_out_ppd" + + # brcupsconfpt1 + mkdir -p "$srcdir/usr/Brother/Printer/pj723/cupswrapper" + _driver="$srcdir/usr/bin/brprintconfpt1_pj723" + _out_driver="$srcdir/usr/Brother/Printer/pj723/cupswrapper/brcupsconfpt1" + cp "$_driver" "$_out_driver" + + rm -r "$srcdir/usr/bin" + + cp -R "$srcdir/opt/brother/PTouch/pj723/inf" "$srcdir/usr/Brother/Printer/pj723" + cp -R "$srcdir/opt/brother/PTouch/pj723/lpd" "$srcdir/usr/Brother/Printer/pj723" + + _setupPrintcappt1="$srcdir/opt/brother/PTouch/pj723/inf/setupPrintcappt1" + _out_setupPrintcappt1="$srcdir/usr/Brother/Printer/pj723/inf/setupPrintcappt1" + + _filterpj723="$srcdir/opt/brother/PTouch/pj723/lpd/filterpj723" + _out_filterpj723="$srcdir/usr/Brother/Printer/pj723/lpd/filterpj723" + + # setupPrintcappt1 & filterpj723 + sed "s|/opt/brother/PTouch|/usr/Brother/Printer|g" "$_setupPrintcappt1" > "$_out_setupPrintcappt1" + sed "s|/opt/brother/PTouch|/usr/Brother/Printer|g" "$_filterpj723" > "$_out_filterpj723" + + # lpdwrapper + wrapper=$(sed -n '/<<!ENDOFWFILTER!/,$p' $srcdir/opt/brother/PTouch/pj723/cupswrapper/cupswrapperpj723) + wrapper=$(sed "1d" <<< $wrapper) + wrapper=$(sed -n "/!ENDOFWFILTER!/q;p" <<< $wrapper) + wrapper=$(sed 's|${printer_model}|pj723|g' <<< $wrapper) + wrapper=$(sed 's|\\||g' <<< $wrapper) + wrapper=$(sed 's|/usr/share/cups/model/Brother/brother_pj723_printer_en.ppd|/usr/share/ppd/Brother/brother_pj723_printer_en.ppd|g' <<< $wrapper) + wrapper=$(sed 's|/opt/brother/${device_model}/|/usr/Brother/Printer/|g' <<< $wrapper) + + echo "$wrapper" > "$srcdir/usr/Brother/Printer/pj723/cupswrapper/brother_lpdwrapper_pj723" + chmod 755 "$srcdir/usr/Brother/Printer/pj723/cupswrapper/brother_lpdwrapper_pj723" +} + +package() { + cp -R "$srcdir/usr" "$pkgdir" +} diff --git a/brother-pj723.install b/brother-pj723.install new file mode 100644 index 000000000000..7e83ad8b1ed0 --- /dev/null +++ b/brother-pj723.install @@ -0,0 +1,17 @@ +post_install() { + __port2="$(lpinfo -v | grep -i 'usb://Brother/PJ-723' | head -1)" + if [ "$__port2" = '' ];then + __port2="$(sudo lpinfo -v | grep 'usb://' | head -1)" + fi + __port="$(echo $__port2| sed s/direct//g)" + + if [ "$__port" = '' ];then + __port="usb:/dev/usb/lp0" + fi + + lpadmin -p Brother_PJ-723 -E -v $__port -P /usr/share/ppd/Brother/brother_pj723_printer_en.ppd +} + +pre_remove() { + lpadmin -x Brother_PJ-723 +} |