diff options
author | lucasheld | 2021-09-26 12:49:02 +0200 |
---|---|---|
committer | lucasheld | 2021-09-26 12:49:02 +0200 |
commit | 5d0a034f65467544a46ae7dcd7266bfaa1c7be76 (patch) | |
tree | 0d28a4ea19e9621d754ce9ffea59c38b45b4e2b3 | |
download | aur-brother-dcp165c.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | brother-dcp165c.install | 26 | ||||
-rw-r--r-- | fix_lp.patch | 10 |
5 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d5d95623f7de --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = brother-dcp165c + pkgdesc = Driver for Brother DCP-165C printer + pkgver = 1.1.2 + pkgrel = 1 + url = https://support.brother.com/g/b/producttop.aspx?c=de&lang=de&prod=dcp165c_all + install = brother-dcp165c.install + arch = i686 + arch = x86_64 + license = custom:brother + depends = a2ps + depends = cups + depends = lib32-gcc-libs + depends = lib32-glibc + optdepends = brscan3: scanner support. + source = fix_lp.patch + source = https://download.brother.com/welcome/dlf005378/dcp165clpr-1.1.2-2.i386.rpm + source = https://download.brother.com/welcome/dlf005380/dcp165ccupswrapper-1.1.2-2.i386.rpm + md5sums = 51b9c8ea31dc37540cb8264bb05ca3f7 + md5sums = 22a0932c6547a682af4a16fb86100614 + md5sums = 0bf765de513b8d1e37567ecf2c04897e + +pkgname = brother-dcp165c diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..fb9ea6c08c5d --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!fix_lp.patch +!brother-dcp165c.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8424d656acfd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +pkgname=brother-dcp165c +pkgver=1.1.2 +pkgrel=1 +pkgdesc="Driver for Brother DCP-165C printer" +url="https://support.brother.com/g/b/producttop.aspx?c=de&lang=de&prod=dcp165c_all" +license=('custom:brother') +depends=('a2ps' 'cups' 'lib32-gcc-libs' 'lib32-glibc') +optdepends=('brscan3: scanner support.') +install="brother-dcp165c.install" +arch=('i686' 'x86_64') + +md5sums=('51b9c8ea31dc37540cb8264bb05ca3f7' + '22a0932c6547a682af4a16fb86100614' + '0bf765de513b8d1e37567ecf2c04897e') + +source=( + "fix_lp.patch" \ + "https://download.brother.com/welcome/dlf005378/dcp165clpr-1.1.2-2.i386.rpm" \ + "https://download.brother.com/welcome/dlf005380/dcp165ccupswrapper-1.1.2-2.i386.rpm" +) + +build() { + cd "$srcdir" + patch -Np0 < fix_lp.patch +} + +post_install() { + /usr/local/Brother/Printer/dcp165c/cupswrapper/cupswrapperdcp165c +} + +package() { + install -d $pkgdir/usr/bin + install -d $pkgdir/var/spool/lpd + install -Dm755 "$srcdir"/usr/bin/brprintconf_dcp165c "$pkgdir"/usr/bin/ + cp -R $srcdir/usr/. $pkgdir/usr +} diff --git a/brother-dcp165c.install b/brother-dcp165c.install new file mode 100644 index 000000000000..5f06b2e99d04 --- /dev/null +++ b/brother-dcp165c.install @@ -0,0 +1,26 @@ +post_install() { + # lpr + /usr/local/Brother/Printer/dcp165c/inf/setupPrintcapij dcp165c -i + + # cupswrapper + /usr/local/Brother/Printer/dcp165c/cupswrapper/cupswrapperdcp165c + + systemctl restart cups.service +} + +post_upgrade() { + /bin/true +} + +pre_remove() { + # lpr + /usr/local/Brother/Printer/dcp165c/inf/setupPrintcapij dcp165c -e + + # cupswrapper + /usr/local/Brother/Printer/dcp165c/cupswrapper/cupswrapperdcp165c -e +} + +op=$1 +shift + +$op "$@" diff --git a/fix_lp.patch b/fix_lp.patch new file mode 100644 index 000000000000..adff45bba48f --- /dev/null +++ b/fix_lp.patch @@ -0,0 +1,10 @@ +--- ./usr/local/Brother/Printer/dcp165c/inf/setupPrintcapij.old 2008-10-24 15:32:59.000000000 +0200 ++++ ./usr/local/Brother/Printer/dcp165c/inf/setupPrintcapij 2021-09-26 12:33:23.763845407 +0200 +@@ -34,7 +34,7 @@ + if [ ! -d $SPOOLER_NAME ]; then + mkdir $SPOOLER_NAME + fi +- chown lp $SPOOLER_NAME ++ chown root $SPOOLER_NAME + chgrp lp $SPOOLER_NAME + chmod 700 $SPOOLER_NAME |