# Maintainer: jc_gargma # Maintainer (AUR): WorMzy Tykashi # Contributor (AUR): artiom # Contributor (AUR): ilikenwf # Contributor (AUR): American_Jesus # Contributor (AUR): Mufflone # Contributor (AUR): switchnode # # I maintain this because: # AUR version does not use full length commit IDs # AUR version does not use specific UXP commit # AUR version does not check signatures on UXP repo # AUR version does not use system libs pkgname=palemoon _pmaltname=pale-moon _pmotheraltname=Pale-Moon _uxpaltname=uxp pkgver=33.4.0.1 pkgrel=1 # palemoon commit ID can be found at https://repo.palemoon.org/MoonchildProductions/Pale-Moon/tags _commit=635981878f2d1bc5194fa180ac6142a153f581e4 # UXP commit ID can be found at https://repo.palemoon.org/MoonchildProductions/UXP/tags _UXPcommit=89e88ca6a055ed560da7bda9ad3c448c41cf4295 pkgdesc="Open source web browser based on Firefox focusing on efficiency." arch=(x86_64 i686) license=(MPL-2.0 GPL LGPL) url="https://www.palemoon.org/" options=(lto) depends=(gtk2 dbus-glib desktop-file-utils libxt mime-types alsa-lib bzip2 libffi libjpeg-turbo pixman zlib) makedepends=(python2 unzip zip yasm libpulse jack git) optdepends=('ffmpeg: various video and audio support' 'alsa-utils: ALSA support' 'jack: Jack support' 'pulseaudio: PulseAudio support' 'palemoon-preferences: Custom vendor.js with security by default' 'palemoon-preferences-basic: Custom vendor.js with less breaking changes') #source=($pkgname-$pkgver.tar.xz::https://archive.palemoon.org/source/${pkgname}-${pkgver}.source.tar.xz # $pkgname-$pkgver.tar.xz.sig::https://archive.palemoon.org/source/${pkgname}-${pkgver}.source.tar.xz.sig source=(git+"https://repo.palemoon.org/MoonchildProductions/${_pmotheraltname}?signed#commit=${_commit}" git+"https://repo.palemoon.org/MoonchildProductions/UXP?signed#commit=${_UXPcommit}" mozconfig.in) sha1sums=('83bd82c83ec954cd6988fa6b4286ba4a953c129a' '98fdbb5606cc04c2cc2a5f9d6b90c1054e0d4add' '71ad1fdd6f76c896486565d0dfa27b0919228b00') sha256sums=('6bf26bd8b98d6ccfacc765b9c1f60179350b8ad2b1e7d4f4ac148896027ea3ed' '75bf7f92650161006a8e4b34fc56564cc202a79f284a2f72d32e7d1d39ab63d4' '2da2111c9c204a4babaf19e1e1c1d629513b410d1290ac44a1f14c02a4f5d704') b2sums=('aa2e7dd817e1a51ffcf82c443e71b1551738cbeca92a6a6873f1326c4f6f7fab86fcff2e4a9bd052d5cde8d542068e6975d4ca8192d3eb34db08f4c3e576c989' '75092a08fbaa2c333324568a612dd13ddca95378ae4ef620cb98748cb3f3da5cc397422fe4b5b81f0313730cca60d2ba603f6c3eb00cc188a41b1b8b524c3714' '290dfd5c3f93025048c94b6b592a3605e093862f1c4fbd96a9cde61b91ebb53b2901ce62b646cff298f9286bd46767972ac20a7bd19d902b470f15ca4c9fa4b7') #https://www.palemoon.org/0x8FCF9CEC.asc validpgpkeys=('3DAD8CD107197488D2A2A0BD40481E7B8FCF9CEC') prepare() { sed 's#%SRCDIR%#'"${srcdir}"'#g' mozconfig.in > mozconfig cd ${_pmotheraltname} git submodule init git config submodule.platform.url "${srcdir}/UXP" git -c protocol.file.allow=always submodule update } build() { cd ${_pmotheraltname} # palemoon is prone to OOM, use 1 thread per 2GB ram export MOZ_MAKE_FLAGS="${MAKEFLAGS}" #export MOZ_MAKE_FLAGS="-j32" # Remove option not supported by ld.gold to prevent configure failure export LDFLAGS="${LDFLAGS/-Wl,-z,pack-relative-relocs/}" export MOZBUILD_STATE_PATH="${srcdir}/mozbuild" export MOZCONFIG="${srcdir}/mozconfig" export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIC" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIC" ./mach build } package() { cd pmbuild make package cd dist install -d "${pkgdir}"/usr/{bin,lib} cp -r palemoon/ "${pkgdir}/usr/lib/${pkgname}" ln -s "/usr/lib/${pkgname}/palemoon" "${pkgdir}/usr/bin/palemoon" # icons install -Dm644 ${srcdir}/${_pmotheraltname}/${pkgname}/branding/official/default16.png \ "${pkgdir}/usr/share/icons/hicolor/16x16/apps/${pkgname}.png" install -Dm644 ${srcdir}/${_pmotheraltname}/${pkgname}/branding/official/default32.png \ "${pkgdir}/usr/share/icons/hicolor/32x32/apps/${pkgname}.png" install -Dm644 ${srcdir}/${_pmotheraltname}/${pkgname}/branding/official/default48.png \ "${pkgdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png" install -Dm644 ${srcdir}/${_pmotheraltname}/${pkgname}/branding/official/mozicon128.png \ "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png" # install desktop file install -Dm644 "${srcdir}/${_pmotheraltname}/${pkgname}/branding/official/palemoon.desktop" \ "${pkgdir}/usr/share/applications/${pkgname}.desktop" }