Advertisement
Guest User

PKGBUILD (archlinux) : brother-ql500-cupswrapper

a guest
May 23rd, 2014
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.43 KB | None | 0 0
  1. # Contributor: K. Hampf <khampf@users.sourceforge.net>
  2. # Based on stuff made by Christopher Schwaab -- christopher.schwaab gmail
  3. pkgname=brother-ql500-cupswrapper
  4. _pkgname=ql500cupswrapper
  5. pkgver=1.0.1
  6. pkgrel=1
  7. pkgdesc="LPR-to-CUPS wrapper for Brother P-Touch QL-500 labelprinter (metric)"
  8. url="http://solutions.brother.com/linux/en_us/"
  9. arch=('i686' 'x86_64')
  10. license=("GPL2")
  11. if [ $CARCH == "x86_64" ]; then
  12.   depends=('cups' 'ghostscript' 'lib32-glibc' 'brother-ql500-lpr')
  13. else
  14.   depends=('cups' 'ghostscript' 'glibc' 'brother-ql500-lpr')
  15. fi
  16. makedepends=('rpmextract' 'cpio')
  17. source=("http://www.brother.com/pub/bsc/linux/dlf/$_pkgname-$pkgver-0.i386.rpm")
  18. md5sums=('1bc83941faf4a927f62cf96af2c12aee')
  19. noextract=("$_pkgname-$pkgver-0.i386.rpm")
  20.  
  21. build() {
  22.         cd $srcdir
  23.         rpmextract.sh "$_pkgname-$pkgver-0.i386.rpm"
  24.  
  25.         rm -f $_pkgname-$pkgver-0.i386.rpm
  26.  
  27.         mkdir -p usr/share/ || return 1
  28.         rm -rf usr/share/brother
  29.         mv opt/brother usr/share/brother || return 1
  30.         rmdir opt || return 1
  31.  
  32.         sed -i 's|/opt/brother|/usr/share/brother|g' `grep -lr '/opt/brother' ./` || return 1
  33.         sed -i 's|/etc/init.d|/etc/rc.d|' "usr/share/brother/PTouch/ql500/cupswrapper/cupswrapperql500pt1" || return 1
  34.         sed -i 's|/etc/rc.d/cupsys|/etc/rc.d/cupsd|' "usr/share/brother/PTouch/ql500/cupswrapper/cupswrapperql500pt1" || return 1
  35.  
  36.         find . | cpio -p -dum $pkgdir || return 1
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement