summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Heyns2015-09-20 01:57:00 +1200
committerMichael Heyns2015-09-20 01:57:00 +1200
commite1ea6e8314682dab8961bd189d1a05a50da655cd (patch)
tree9f9716d18cfe01c3ec3713dfb76e67011b91b5de
parent51b3874ed5ca6c32c98a27fda447c688f0c2b325 (diff)
downloadaur-e1ea6e8314682dab8961bd189d1a05a50da655cd.tar.gz
Switch to rpm version
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD70
-rw-r--r--brother-mfc-j265w.install10
3 files changed, 59 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9ff42f18d25..5a5237a22e60 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,20 @@
# Generated by makepkg 4.2.1
-# Sat Sep 19 09:53:48 UTC 2015
+# Sat Sep 19 10:14:05 UTC 2015
pkgbase = brother-mfc-j265w
pkgdesc = LPR and CUPS driver for the Brother MFC-J265W
pkgver = 1.1.3
pkgrel = 1
- url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html
+ url = http://solutions.brother.com/linux/en_us/
install = brother-mfc-j265w.install
arch = i686
arch = x86_64
- license = unknown
- depends = tcsh
- depends = deb2targz
- depends = perl
- depends = a2ps
- source = http://download.brother.com/welcome/dlf006542/mfcj265wlpr-1.1.3-1.i386.deb
- source = http://download.brother.com/welcome/dlf006544/mfcj265wcupswrapper-1.1.3-1.i386.deb
- md5sums = 036138c0f659283aa492eddb1495edf6
- md5sums = c1459408fbf72a588d72a4048cb801de
+ license = custom:brother commercial license
+ depends = cups
+ depends = lib32-glibc
+ source = http://download.brother.com/welcome/dlf006541/mfcj265wlpr-1.1.3-1.i386.rpm
+ source = http://download.brother.com/welcome/dlf006543/mfcj265wcupswrapper-1.1.3-1.i386.rpm
+ md5sums = 0d6245511b601e7168cd811be812072c
+ md5sums = 418728947071aa087aa029ea24dc22da
pkgname = brother-mfc-j265w
diff --git a/PKGBUILD b/PKGBUILD
index 7ecac8ce49ef..a1f87bcecfa8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,58 @@
# Maintainer: Michael Heyns <beanaroo@gmail.com>
-
+# Copied from the MFC-J5910DW package created by Libernux <dutchman55@gmx.com>
pkgname="brother-mfc-j265w"
+_model="j265w"
pkgver="1.1.3"
pkgrel=1
-_revision=1
pkgdesc="LPR and CUPS driver for the Brother MFC-J265W"
-url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
arch=('i686' 'x86_64')
-license='unknown'
-install='brother-mfc-j265w.install'
-depends=('tcsh' 'deb2targz' 'perl' 'a2ps')
+url="http://solutions.brother.com/linux/en_us/"
+license=('custom:brother commercial license')
+depends=('cups')
+install="$pkgname.install"
source=(
- "http://download.brother.com/welcome/dlf006542/mfcj265wlpr-1.1.3-1.i386.deb"
- "http://download.brother.com/welcome/dlf006544/mfcj265wcupswrapper-1.1.3-1.i386.deb"
+ "http://download.brother.com/welcome/dlf006541/mfcj265wlpr-$pkgver-$pkgrel.i386.rpm"
+ "http://download.brother.com/welcome/dlf006543/mfcj265wcupswrapper-$pkgver-$pkgrel.i386.rpm"
)
-md5sums=('036138c0f659283aa492eddb1495edf6'
- 'c1459408fbf72a588d72a4048cb801de')
-
-build() {
- deb2targz *.deb >/dev/null || return 1
- rm -f *.deb || return 1
+md5sums=(
+ '0d6245511b601e7168cd811be812072c'
+ '418728947071aa087aa029ea24dc22da'
+)
+if test "$CARCH" == x86_64; then
+ depends+=('lib32-glibc')
+fi
+prepare() {
+# do not install in '/usr/local'
+ if [ -d $srcdir/usr/local/Brother ]; then
+ install -d $srcdir/usr/share
+ mv $srcdir/usr/local/Brother/ $srcdir/usr/share/brother
+ rm -rf $srcdir/usr/local
+ sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' ./`
+ fi
+# setup cups-directories
+ install -d $srcdir/usr/share/cups/model
+ install -d $srcdir/usr/lib/cups/filter
+# go to the cupswrapper directory and find the source file from which to generate a ppd- and wrapper-file
+ cd `find . -type d -name 'cupswrapper'`
+ if [ -f cupswrapper* ]; then
+ _wrapper_source=`ls cupswrapper*`
+ sed -i '/^\/etc\/init.d\/cups/d' $_wrapper_source
+ sed -i '/^sleep/d' $_wrapper_source
+ sed -i '/^lpadmin/d' $_wrapper_source
+ sed -i 's|/usr|$srcdir/usr|g' $_wrapper_source
+ sed -i 's|/opt|$srcdir/opt|g' $_wrapper_source
+ sed -i 's|/model/Brother|/model|g' $_wrapper_source
+ sed -i 's|lpinfo|echo|g' $_wrapper_source
+ export srcdir=$srcdir
+ ./$_wrapper_source
+ sed -i 's|$srcdir||' $srcdir/usr/lib/cups/filter/*lpdwrapper*
+ sed -i "s|$srcdir||" $srcdir/usr/lib/cups/filter/*lpdwrapper*
+ rm $_wrapper_source
+ fi
+# /etc/printcap is managed by cups
+ rm `find $srcdir -type f -name 'setupPrintcap*'`
}
-
package() {
- cd $srcdir || return 1
- [ -d "mfcj265w" ] || (mkdir mfcj265w || return 1)
- for i in *.tar.gz;do tar xfz $i -C mfcj265w;done || return 1
- cd mfcj265w || return 1
- cd usr/local/Brother/Printer/mfcj265w || return 1
- perl -i -pe 's#/etc/init.d#/etc/rc.d#g' ./cupswrapper/cupswrappermfcj265w || return 1
- perl -i -pe 's#printcap\.local#printcap#g' ./inf/setupPrintcapij || return 1
- cp -rf $srcdir/mfcj265w/usr/ $pkgdir/ || return 1
+ cp -R $srcdir/usr $pkgdir
+ if [ -d $srcdir/opt ]; then cp -R $srcdir/opt $pkgdir; fi
}
diff --git a/brother-mfc-j265w.install b/brother-mfc-j265w.install
index 8f9d323cd273..3ddb04120f84 100644
--- a/brother-mfc-j265w.install
+++ b/brother-mfc-j265w.install
@@ -3,11 +3,7 @@ post_install() {
}
post_upgrade() {
- /usr/local/Brother/Printer/mfcj265w/cupswrapper/cupswrappermfcj265w >/dev/null
- if [ "$?" -eq 0 ]; then
- printf "\033[1m\033[32m\x3d\x3d\x3e\033\1330m Done. The printer should be visible now via the CUPS-webinterface
-(http://localhost:631)\n"
- else
- printf "\033[1m\032[32m\x3d\x3d\x3e\033\1330m Something went wrong...\n"
- fi
+echo "Restart CUPS to load the new files"
+echo "You can now register your new printer using the web interface at:"
+echo " http://localhost:631/"
}