talimat 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Tanım: Mozilla.org'dan Bağımsız Web Tarayıcısı
  2. # URL: http://www.mozilla.com/firefox/
  3. # Paketçi: Cihan_Alkan
  4. # Gerekler: libvpx rust cargo binutils-gold autoconf2 pulseaudio gconf yasm sqlite nss alsa-lib gtk2 gtk3 xorg-app zip unzip startup-notification gstreamer gstreamer-plugins-base gstreamer-plugins-good gstreamer1-plugins-libav
  5. # Grup: ağ
  6. isim=firefox
  7. surum=60.0
  8. devir=1
  9. kaynak=(https://ftp.mozilla.org/pub/firefox/releases/60.0/source/firefox-60.0.source.tar.xz
  10. http://download.cdn.mozilla.net/pub/$isim/releases/$surum/linux-x86_64/xpi/tr.xpi::tr-${surum}.xpi
  11. google-api-key
  12. mozilla-api-key)
  13. derle() {
  14. cd $isim-$surum
  15. # Locale autodetect
  16. sed -i '/intl.locale.matchOS/s/false/true/' modules/libpref/init/all.js
  17. cat > mozconfig << "EOF"
  18. ac_add_options --enable-application=browser
  19. ac_add_options --prefix=/usr
  20. ac_add_options --enable-release
  21. ac_add_options --enable-gold
  22. ac_add_options --enable-pie
  23. ac_add_options --enable-optimize="-O2"
  24. ac_add_options --enable-rust-simd
  25. # Branding
  26. ac_add_options --enable-official-branding
  27. ac_add_options --enable-update-channel=release
  28. ac_add_options --with-distribution-id=org.milislinux
  29. export MOZILLA_OFFICIAL=1
  30. export MOZ_TELEMETRY_REPORTING=1
  31. export MOZ_ADDON_SIGNING=1
  32. export MOZ_REQUIRE_SIGNING=1
  33. # Keys
  34. ac_add_options --with-google-api-keyfile=/${SRC}/google-api-key
  35. ac_add_options --with-mozilla-api-keyfile=/${SRC}/mozilla-api-key
  36. # System libraries
  37. ac_add_options --with-system-bz2
  38. #ac_add_options --with-system-icu
  39. ac_add_options --with-system-jpeg
  40. ac_add_options --with-system-libvpx
  41. #ac_add_options --enable-system-hunspell
  42. ac_add_options --enable-system-ffi
  43. # Features
  44. ac_add_options --enable-alsa
  45. ac_add_options --enable-jack
  46. ac_add_options --enable-startup-notification
  47. ac_add_options --enable-crashreporter
  48. ac_add_options --disable-updater
  49. ac_add_options --disable-stylo
  50. EOF
  51. SHELL=/bin/sh ./mach build
  52. SHELL=/bin/sh ./mach buildsymbols
  53. mkdir -pv $PKG/usr/{bin,lib{,/mozilla/plugins}}
  54. SHELL=/bin/sh DESTDIR=$PKG ./mach install
  55. ln -svf ../mozilla/plugins $PKG/usr/lib/firefox/browser/
  56. # Need for gnash
  57. mkdir -p $PKG/usr/include/npapi
  58. cp -v dom/plugins/base/*.h $PKG/usr/include/npapi
  59. # Launcher
  60. mkdir -pv $PKG/usr/share/applications &&
  61. cat > $PKG/usr/share/applications/firefox.desktop << "EOF" &&
  62. [Desktop Entry]
  63. Encoding=UTF-8
  64. Name=Firefox Web Browser
  65. Comment=İnternette gezinin
  66. GenericName=Web Tarayıcı
  67. Exec=firefox %u
  68. Terminal=false
  69. Type=Application
  70. Icon=firefox
  71. Categories=GNOME;GTK;Network;WebBrowser;
  72. MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
  73. StartupNotify=true
  74. EOF
  75. mkdir -pv $PKG/usr/share/applications
  76. mkdir -pv $PKG/usr/share/pixmaps
  77. ln -sf /usr/lib/firefox-$version/browser/icons/mozicon128.png $PKG/usr/share/pixmaps/firefox.png
  78. for i in 16 22 24 32 48 256
  79. do
  80. mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps
  81. cp browser/branding/official/default${i}.png \
  82. $PKG/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png
  83. done
  84. for lang in tr
  85. do
  86. install -Dm644 $SRC/tr-${surum}.xpi \
  87. $PKG/usr/lib/firefox/browser/extensions/langpack-tr@firefox.mozilla.org.xpi
  88. done
  89. install -Dm644 /dev/stdin $PKG/usr/lib/firefox/browser/defaults/preferences/vendor.js <<END
  90. // Use LANG environment variable to choose locale
  91. pref("intl.locale.requested", "");
  92. // Disable default browser checking.
  93. pref("browser.shell.checkDefaultBrowser", false);
  94. // Don't disable our bundled extensions in the application directory
  95. pref("extensions.autoDisableScopes", 11);
  96. pref("extensions.shownSelectionUI", true);
  97. END
  98. }