Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.9 KiB

# STATIC: Will build static libraries if correct versions aren't found
8 years ago
name=Pale-Moon
6 years ago
version=28.2.1
8 years ago
version_autoconf=2.13
8 years ago
6 years ago
dlextract "https://github.com/MoonchildProductions/UXP/archive/PM${version}_Release.tar.gz" \
6 years ago
'6a06e7094204eedae2b8592159d0f66d'
extrafile 'palemoon.desktop'
8 years ago
( name=autoconf version="$version_autoconf"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
'9de56d4a161a723228220b0f425dc711'
)
_
8 years ago
( cd "autoconf-$version_autoconf"
./configure --prefix="$PWD/install" --program-suffix=-$version_autoconf
8 years ago
make
make install
)
6 years ago
cd "UXP-PM${version}_Release"
get_conf() {
if [ "$1" = "NSS_MINVER" ]; then
sed -ne 's/^ *AM_PATH_NSS(\([^,]*\),.*/\1/p' old-configure.in
else
sed -ne 's/^'"$1"'=\(.*\)/\1/p' old-configure.in
fi
}
8 years ago
cat > .mozconfig << EOF
6 years ago
mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_OBJDIR="$PWD/pmbuild/"
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize="-O2"
8 years ago
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
#ac_add_options --enable-official-branding
#export MOZILLA_OFFICIAL=1
6 years ago
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
8 years ago
ac_add_options --with-pthreads
6 years ago
ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
8 years ago
ac_add_options --disable-updater
ac_add_options --x-libraries="/$dir_prefix/$dir_lib"
8 years ago
# The section before this is kept up to date with https://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux#head:Mozconfig_Files (with minor changes)
# The following section are my additions.
# Use system libraries (autoconf-2.13 && ./configure --help | grep system)
6 years ago
ac_add_options --with-system-ffi
7 years ago
$(pkg-config --atleast-version=1.4.0 hunspell && echo ac_add_options --enable-system-hunspell)
8 years ago
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
6 years ago
$(pkg-config --atleast-version="$(get_conf SQLITE_VERSION)" sqlite3 && echo ac_add_options --enable-system-sqlite)
ac_add_options --with-system-bz2
$(pkg-config --atleast-version=58.1 icu-i18n && echo ac_add_options --with-system-icu)
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
$(pkg-config --atleast-version="$(get_conf NSPR_MINVER)" nspr && echo ac_add_options --with-system-nspr)
$(pkg-config --atleast-version="$(get_conf NSS_MINVER)" nss && echo ac_add_options --with-system-nss)
#ac_add_options --with-system-png - The APNG patch is not upstream
ac_add_options --with-system-zlib
8 years ago
# Make pulseaudio support optional
$(pkg-config --exists libpulse || echo ac_add_options --disable-pulseaudio)
8 years ago
EOF
8 years ago
# Build
6 years ago
PATH="$PWD/../autoconf-$version_autoconf/install/bin:$PATH" \
6 years ago
MOZ_MAKE_FLAGS="$MAKEFLAGS" \
make -f client.mk build
8 years ago
8 years ago
# Install
8 years ago
cd pmbuild
8 years ago
make package
mkdir -p "$dir_install/$dir_prefix/$dir_lib/palemoon"
cp -Ta dist/palemoon "$dir_install/$dir_prefix/$dir_lib/palemoon"
mkdir -p "$dir_install/$dir_prefix/$dir_bin"
ln -sf "/$dir_prefix/$dir_lib/palemoon/palemoon" "$dir_install/$dir_prefix/$dir_bin/palemoon"
8 years ago
cd ../..
# Install icons
for x in 16 32 48; do
mkdir -p "$dir_install/$dir_prefix/$dir_data/icons/hicolor/${x}x$x/apps"
ln -sf "/$dir_prefix/$dir_lib/palemoon/browser/chrome/icons/default/default$x.png" \
"$dir_install/$dir_prefix/$dir_data/icons/hicolor/${x}x$x/apps/palemoon.png"
8 years ago
done
mkdir -p "$dir_install/$dir_prefix/$dir_data/icons/hicolor/128x128/apps"
ln -sf "/$dir_prefix/$dir_lib/palemoon/browser/icons/mozicon128.png" \
"$dir_install/$dir_prefix/$dir_data/icons/hicolor/128x128/apps/palemoon.png"
8 years ago
# Install desktop
install -Dm644 -t "$dir_install/$dir_prefix/$dir_data/applications" palemoon.desktop
8 years ago
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: