hblock: bump to 3.4.0
[kiss-trunc88.git] / palemoon / build
blobc03acf98222029536456b647903329742f80693f
1 #!/bin/sh -e
3 export CFLAGS="-march=westmere"
4 export CXXFLAGS="$CFLAGS"
6 export DESTDIR="$1"
9 # Build autoconf 2.13 for browser's sole use.
11 cd autoconf2.13
13 ./configure \
14 --prefix="$PWD/../junk" \
15 --program-suffix=-2.13
17 make
18 make install
21 if ! command -v yasm; then (
22 cd yasm
24 ./configure \
25 --prefix=/
27 make
28 make DESTDIR="$PWD/../junk" install
29 ); fi
31 for f in zip unzip; do
32 if ! kiss list "$f"; then (
33 cd "$f"
35 make \
36 CC="$CC $CFLAGS $CXXFLAGS" \
37 -f unix/Makefile generic
39 make \
40 prefix="$PWD/../junk" \
41 -f unix/Makefile install
42 ); fi
43 done
45 git clone --depth=1 --recursive https://repo.palemoon.org/MoonchildProductions/Pale-Moon.git
47 export PATH="$PWD/junk/bin:$PATH"
49 cd ./Pale-Moon
50 git checkout master
51 git submodule update
52 cd platform
53 git checkout master
54 git pull
55 cd ..
57 sed -e 's#%SRCDIR%#'"$(realpath .)"'#g' -e "s#%CFLAGS%#$CFLAGS#g" ../mozconfig.in > .mozconfig
59 #for patch in ../*.patch; do
60 # patch -p1 < "$patch"
61 #done
63 #export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/browser"
65 ./mach build
66 ./mach stage
68 mkdir -p "$1/usr/bin"
69 mkdir -p "$1/usr/lib"
71 cp -r objdir/dist/palemoon "$1/usr/lib/browser"
72 ln -s ../lib/browser/palemoon "$1/usr/bin/browser"