summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 7e23ce2007bc6d93afbe4b7a212d2001fba22fba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR):  WorMzy Tykashi <wormzy.tykashi@gmail.com>
# Contributor (AUR): artiom <a.mv at gmx dot fr>
# Contributor (AUR): ilikenwf
# Contributor (AUR): American_Jesus

# # I maintain this because:
# AUR version uses git
# AUR version does not use system libs

pkgname=palemoon
_repo=Pale-Moon
_exname=UXP
pkgver=28.11.0
_uxpver=20200712
pkgrel=1
pkgdesc="Open source web browser based on Firefox focusing on efficiency."
arch=(x86_64 i686)
license=(MPL GPL LGPL)
url="https://www.palemoon.org/"
depends=(gtk2 desktop-file-utils libxt startup-notification mime-types dbus-glib
         libpulse alsa-lib
         bzip2 libffi hunspell libjpeg-turbo pixman zlib)
makedepends=(unzip zip python2 yasm
             jack
             autoconf2.13
             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.gz::https://github.com/MoonchildProductions/$_repo/archive/${pkgver}_Release.tar.gz
        $_exname-$_uxpver.tar.gz::https://github.com/MoonchildProductions/$_exname/archive/RELBASE_${_uxpver}.tar.gz
        mozconfig.in
        system-libs.patch)
b2sums=('37743952ce0c3e6c0f68212379e1850bd54d0442711602d5e97a254a0642aede5d3fccebd453dcd1f00c0df886a7a18833f771f0c111a63e942d3c96747188a9'
        'aacf6df84953a0b5f0a298fd9c1a8ee0624ccd419e0fa532b45a97aebff12eaf1f95c0f96d48e3c969a5f13a5feee04f3c8d9acf1be45193ff0651d46c83d00b'
        '993848b335a2c2c6f81d8f598848b40ba10ba3d684ec6d15b78cd2ed1ee98323ae0804442601ae05b0ede112ad22c672381468c677c1dbce345e8d5448ce64fc'
        '47cc9da19cb7003ea896e8d1f3f77197548cf917c943ec1bd8526daaf6212d2c2c90bc417df156ee571c9ca052749a6a3a13f8acc150f1983a8bf0f8f1ebe2de')
validpgpkeys=('3059E09144F56804F0FBF4E126B40624BDBFD9F3')

prepare() {
  sed 's#%SRCDIR%#'"${srcdir}"'#g' mozconfig.in > mozconfig
  cd ${_repo}-${pkgver}_Release
  rm -rf platform
  mv ../${_exname}-RELBASE_${_uxpver} platform

  # I'll use system libs if I darn well choose, thank you very much.
  patch -Np1 -i ../system-libs.patch
  rm platform/build/directive4.py

}

build() {
  cd ${_repo}-${pkgver}_Release

  export MOZBUILD_STATE_PATH="${srcdir}/mozbuild"
  export MOZCONFIG="${srcdir}/mozconfig"
  export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4 -fPIC"
  export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4 -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}/${_repo}-${pkgver}_Release/palemoon/branding/official/default16.png \
    "${pkgdir}/usr/share/icons/hicolor/16x16/apps/${pkgname}.png"
  install -Dm644 ${srcdir}/${_repo}-${pkgver}_Release/palemoon/branding/official/default32.png \
    "${pkgdir}/usr/share/icons/hicolor/32x32/apps/${pkgname}.png"
  install -Dm644 ${srcdir}/${_repo}-${pkgver}_Release/palemoon/branding/official/default48.png \
    "${pkgdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png"
  install -Dm644 ${srcdir}/${_repo}-${pkgver}_Release/palemoon/branding/official/mozicon128.png \
    "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png"

  # install desktop file
  install -Dm644 "${srcdir}/${_repo}-${pkgver}_Release/palemoon/branding/official/palemoon.desktop" \
    "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}