summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5db1a6e55869cef9d664c83a18e0c9689fd02711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: auruser <>
# Ex-maintainer: Franz Rogar <franzrogar@gmail.com>
# Modified AUR [brother-mfc-j220] package by Franz Rogar <franzrogar@gmail.com>
# Original AUR [brother-hll2300d] package maintained by Mykola Bespaliuk (kolkabes [at] gmail [dot] com)
pkgname="brother-mfc-j220"
_model="j220"
pkgver="1.1.3"
pkgrel=1
epoch=1
pkgdesc="LPR and CUPS driver for the Brother MFC-J220"
url="http://solutions.brother.com/linux/en_us/"
license=('custom:brother commercial license')

arch=('i686' 'x86_64')

depends=('cups' 'perl' 'bash')
if test "$CARCH" == x86_64; then
  depends+=('lib32-glibc')
fi

install="$pkgname.install"

source=("http://www.brother.com/pub/bsc/linux/dlf/mfcj220lpr-$pkgver-$pkgrel.i386.rpm"
	"http://www.brother.com/pub/bsc/linux/dlf/mfcj220cupswrapper-$pkgver-$pkgrel.i386.rpm"
)
md5sums=('931b168c320049ae20a1b5939f5da31e'
	 '37bbde153ca2e3ac5005f637ce5a4fbb'
)

prepare() {
echo "unpacking"
}

package() {
  mkdir -p "${pkgdir}/usr/bin"
  install -m 0755 -o root -g root "${srcdir}/usr/bin/brprintconf_mfcj220" "${pkgdir}/usr/bin/brprintconf_mfcj220"

  mkdir -p "${pkgdir}/opt"
  cp -R "${srcdir}/opt/brother" "${pkgdir}/opt/brother"

  mkdir -p "${pkgdir}/usr/lib/cups/filter"
  echo "#! /opt/brother/Printers/mfcj220/lpd/filtermfcj220" > "${srcdir}/filter-shim"
  install -m 0755 -o root -g root "${srcdir}/filter-shim" "${pkgdir}/usr/lib/cups/filter/brlpdwrappermfcj220"

  mkdir -p "${pkgdir}/usr/share/ppd/cupsfilters"
  install -m 0644 -o root -g root "${srcdir}/opt/brother/Printers/mfcj220/cupswrapper/brother_mfcj220_printer_en.ppd" "${pkgdir}/usr/share/ppd/cupsfilters"
}