talimat 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Tanım: Brother MFC-L2700DW için LPR ve CUPS sürücüsü
  2. # URL: http://support.brother.com/g/b/countrytop.aspx?c=tr&lang=tr
  3. # Paketçi: CihanAlkan
  4. # Gerekler: cups
  5. # Grup: sürücü
  6. isim=brother-mfc-l2700dw
  7. surum=3.2.0
  8. devir=1
  9. kaynak=(http://download.brother.com/welcome/dlf101789/mfcl2700dwlpr-$surum-1.i386.rpm
  10. http://download.brother.com/welcome/dlf101790/mfcl2700dwcupswrapper-$surum-1.i386.rpm)
  11. derle() {
  12. # '/usr/local' klasörüne kurma
  13. if [ -d $SRC/usr/local/Brother ]; then
  14. install -dm755 "$SRC/usr/share"
  15. mv "$SRC/usr/local/Brother/" "$SRC/usr/share/brother"
  16. rm -rf "$SRC/usr/local"
  17. sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' ./`
  18. fi
  19. # setup cups-directories
  20. install -dm755 "$SRC/usr/share/cups/model"
  21. install -dm755 "$SRC/usr/lib/cups/filter"
  22. # copy ppd and filter file to their destination dirs
  23. cd `find . -type d -name 'cupswrapper'`
  24. cp *lpdwrapper* "$SRC/usr/lib/cups/filter/"
  25. cp *.ppd "$SRC/usr/share/cups/model/"
  26. cd "$SRC"
  27. # get absolute printer path
  28. _baseDir="\"/$(find opt -maxdepth 3 -depth -print -quit -type d)\""
  29. # replace the dynamic basedir var with the absolute path
  30. sed -i "s|\`readlink\ \$0\`|$_baseDir|" $SRC/usr/lib/cups/filter/*lpdwrapper*
  31. # /etc/printcap is managed by cups
  32. rm "$(find $SRC -type f -name 'setupPrintcap*')"
  33. cp -R "$SRC/usr" "$PKG"
  34. cp -R "$SRC/opt" "$PKG"
  35. }