diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-01-12 17:48:50 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-01-12 17:48:50 -0500 |
commit | f996597c6b79f714ec28ef04bd3fbd4d18bf2046 (patch) | |
tree | 88f0889456a7cd2051fb61a7eff5b55380b75b7b /libre/iceweasel-libre/PKGBUILD | |
parent | a705f546158d49645fca2a4c101f429fdc1b45f4 (diff) | |
download | abslibre-f996597c6b79f714ec28ef04bd3fbd4d18bf2046.tar.gz abslibre-f996597c6b79f714ec28ef04bd3fbd4d18bf2046.tar.bz2 abslibre-f996597c6b79f714ec28ef04bd3fbd4d18bf2046.zip |
libre/iceweasel-libre: reorganize, use firefox.install
* Use a iceweasel.desktop based on Arch's firefox.desktop
* Use firefox.install
* re-organize things in PKGBUILD into separate functions
Diffstat (limited to 'libre/iceweasel-libre/PKGBUILD')
-rw-r--r-- | libre/iceweasel-libre/PKGBUILD | 104 |
1 files changed, 71 insertions, 33 deletions
diff --git a/libre/iceweasel-libre/PKGBUILD b/libre/iceweasel-libre/PKGBUILD index 7e3cc5aa3..c1c7d393c 100644 --- a/libre/iceweasel-libre/PKGBUILD +++ b/libre/iceweasel-libre/PKGBUILD @@ -82,7 +82,6 @@ makedepends=( 'librsvg' 'libxslt' 'mesa' - 'pkg-config' 'python2' 'unzip' 'wireless_tools' @@ -95,7 +94,8 @@ if $_pgo; then fi optdepends=('wireless_tools: Location detection via available WiFi networks') url="http://packages.debian.org/source/experimental/$_debname" -install=iceweasel.install +install=firefox.install +options=(!emptydirs) source=($(debfile ${_debname}_${_debver}-${_debrel}.dsc) $(debfile ${_debname}_${_debver}-${_debrel}.debian.tar.gz) $(debfile ${_debname}_${_debver}.orig.tar.bz2) @@ -108,40 +108,63 @@ source=($(debfile ${_debname}_${_debver}-${_debrel}.dsc) iceweasel-install-dir.patch vendor.js shared-libs.patch - Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch) + Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch + $pkgbase.desktop +) +# use dpkg-source to extract everything +noextract=(); for file in "${source[@]}"; do noextract+=("${file##*/}"); done -build() { - dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc mozilla-release - cd mozilla-release +# This is a bug, we should fix it. +mips64el-prepare() { + # Fix MIPS N32 support. + sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \ + js/src/assembler/wtf/Platform.h + # Disable JIT. + sed -ri 's/#define ENABLE_(JIT|ASSEMBLER) 1/#define ENABLE_\1 0/' \ + js/src/assembler/wtf/Platform.h + sed -ri 's/ENABLE_(JIT|ASSEMBLER)=1/ENABLE_\1=0/' js/src/Makefile.in +} +misp64el-configure() { + echo 'ac_add_options --disable-methodjit' >> .mozconfig + echo 'ac_add_options --disable-tracejit' >> .mozconfig + echo 'ac_add_options --disable-jemalloc' >> .mozconfig +} - cp ../mozconfig .mozconfig - if $_pgo; then - cat ../mozconfig.pgo >> .mozconfig +prepare() { + if [[ -d "/usr/lib/$pkgbase" ]]; then + error "Because of how rpath is set, this package cannot be installed during build" + return 1 fi + dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc mozilla-release + cd mozilla-release patch -Np1 -i ../Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch patch -Np1 -i ../iceweasel-install-dir.patch patch -Np1 -i ../xulrunner-copy-stub.patch - patch -Np1 -i ../libre.patch patch -Np1 -i ../shared-libs.patch + patch -Np1 -i ../libre.patch # Fix PRE_RELEASE_SUFFIX sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \ browser/base/Makefile.in - # This is a bug, we should fix it. - if [[ $CARCH == mips64el ]]; then - # Fix MIPS N32 support. - sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \ - js/src/assembler/wtf/Platform.h - # Disable JIT. - sed -ri 's/#define ENABLE_(JIT|ASSEMBLER) 1/#define ENABLE_\1 0/' \ - js/src/assembler/wtf/Platform.h - sed -ri 's/ENABLE_(JIT|ASSEMBLER)=1/ENABLE_\1=0/' js/src/Makefile.in - echo 'ac_add_options --disable-methodjit' >> .mozconfig - echo 'ac_add_options --disable-tracejit' >> .mozconfig - echo 'ac_add_options --disable-jemalloc' >> .mozconfig - fi + if [[ $CARCH == mips64el ]]; then mips64el-prepare; fi + + touch "$srcdir/.makepkg-prepare" +} + +build() { + [[ -f "$srcdir/.makepkg-prepare" ]] || { prepare || return $?; cd "$srcdir"; } + cd "$srcdir" + build_browser +} + +build_browser() { + cd mozilla-release + + cp ../mozconfig .mozconfig + if $_pgo; then cat ../mozconfig.pgo >> .mozconfig; fi + if [[ $CARCH == mips64el ]]; then mips64el-configure; fi export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$pkgbase" export PYTHON="/usr/bin/python2" @@ -163,23 +186,37 @@ build() { return $_fail } +install-icon() { + local brandingdir=$1 prog=$2 size=$3 + local sizedir=${size}x${size} ext=png + [[ $size == scalable ]] && { sizedir=$size; ext=svg; size=''; } + + dirs=({moz-objdir/,}"$brandingdir") + files=({default,mozicon,${prog}{,_icon}}${size}.${ext}) + + for dir in "${dirs[@]}"; do + for files in "${files[@]}"; do + if [[ -e "$dir/$file" ]]; then + install -Dm644 "$dir/$file" \ + "$pkgdir/usr/share/icons/hicolor/$sizedir/apps/$prog.png" + return 0 + fi + done + done + #return 1 +} + package() { cd mozilla-release make -j1 -f client.mk DESTDIR="$pkgdir" install install -Dm644 ../vendor.js "$pkgdir/usr/lib/$pkgbase/defaults/preferences/vendor.js" - # I don't even know why we're hitting the objdir, and ConnOS didn't. - _brandingdir=debian/branding - brandingdir=moz-objdir/$_brandingdir - icondir="$pkgdir/usr/share/icons/hicolor" - for i in 16x16 32x32 48x48 64x64; do - install -Dm644 "$brandingdir/default${i/x*/}.png" "$icondir/$i/apps/$pkgbase.png" + for size in 16 32 48 64 128 scalable; do + install-icon debian/branding $pkgbase $size done - install -Dm644 "$brandingdir/mozicon128.png" "$icondir/128x128/apps/$pkgbase.png" - install -Dm644 "$_brandingdir/iceweasel_icon.svg" "$icondir/scalable/apps/$pkgbase.svg" - install -Dm644 debian/iceweasel.desktop \ + install -Dm644 ../$pkgbase.desktop \ "$pkgdir/usr/share/applications/$pkgbase.desktop" # Use system-provided dictionaries @@ -297,4 +334,5 @@ md5sums=('7fe75c8797381adf9f0845d88064e24a' 'abf5ecb74caa857abb42bcfbb3442d9c' '0d053487907de4376d67d8f499c5502b' '52e52f840a49eb1d14be1c0065b03a93' - '65f68090d2a69b467bd2707d0c4ea3bd') + '65f68090d2a69b467bd2707d0c4ea3bd' + '39d8b9249c5effe5fe24d2e9f80a9a94') |