talimat 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Tanım: Tam özellikli çapraz platform ofis paketi (ikili)
  2. # URL: http://www.libreoffice.org
  3. # Paketçi: milisarge
  4. # Gerekler: cups xorg-libxaw xorg-libxcursor xorg-libxft xorg-libxinerama xorg-libxi xorg-libxrandr dbus-glib krb5
  5. # Grup: ofis
  6. isim=libreoffice-bin
  7. isimp=libreoffice
  8. surum=6.0.0
  9. devir=1
  10. kaynak=(http://tdf.c3sl.ufpr.br/libreoffice/stable/6.0.0/rpm/x86_64/LibreOffice_6.0.0_Linux_x86-64_rpm.tar.gz)
  11. derle() {
  12. local workd="$SRC/tmp_work"
  13. mkdir $workd
  14. cd LibreOffice_${surum}*/RPMS
  15. for rpm in *.rpm; do
  16. bsdtar -p -o -C $workd -xf $rpm
  17. done
  18. bsdtar -p -o -C $workd -xf \
  19. $isimp${surum%.*}*.noarch.rpm
  20. cd $workd
  21. mkdir -p $PKG/usr/lib/$isimp
  22. mv opt/$isimp*/* $PKG/usr/lib/$isimp
  23. cd $PKG/usr/lib/$isimp
  24. ln -sf basis${surum%.*} basis-link
  25. mkdir -p $PKG/usr/bin
  26. local programs=(sbase scalc sdraw simpress smath soffice spadmin swriter)
  27. for program in ${programs[@]}; do
  28. ln -sf /usr/lib/$isimp/program/$program $PKG/usr/bin/$program
  29. done
  30. mkdir -p $PKG/usr/share/applications
  31. cd $PKG/usr/lib/$isimp/share/xdg/
  32. for desktop in *.desktop; do
  33. sed -i '/^Exec=/s/libreoffice[^ ]*/soffice/' $desktop
  34. ln -sf /usr/lib/$isimp/share/xdg/$desktop $PKG/usr/share/applications/$desktop
  35. done
  36. mv $workd/usr/share/{mime,icons} $PKG/usr/share
  37. find $PKG \(\
  38. -inamep '*readme*' -o \
  39. -inamep '*changelog*' -o \
  40. -namep '*TODO*' -o \
  41. -inamep '*news*' -o \
  42. -inamep '*license*' -o \
  43. -inamep '*credits*' \
  44. \) -exec rm -rf '{}' \; || true
  45. }