PKGBUILDs/community/bluegriffon/PKGBUILD

116 lines
4.3 KiB
Bash
Raw Normal View History

2016-01-10 00:40:17 +00:00
# $Id$
# Maintainer: Muflone http://www.muflone.com/contacts/english/
# Contributor: Balló György <ballogyor+arch at gmail dot com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - mozconfig changes
2016-07-02 19:50:57 +00:00
# - upstream patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1257019
2016-01-10 00:40:17 +00:00
highmem=1
pkgname=bluegriffon
2017-01-28 18:14:52 +00:00
pkgver=2.2
2016-07-02 19:50:57 +00:00
_mozilla_ver=f14898695ee0
2017-01-29 17:25:53 +00:00
pkgrel=2
2016-01-10 00:40:17 +00:00
pkgdesc="The next-generation Web Editor based on the rendering engine of Firefox"
arch=('i686' 'x86_64')
url="http://bluegriffon.org/"
license=('MPL' 'GPL' 'LGPL')
2016-10-12 12:50:09 +00:00
depends=('alsa-lib' 'desktop-file-utils' 'dbus-glib' 'gtk2' 'gtk3' 'hunspell' 'mozilla-common'
'nss' 'libevent' 'libvpx' 'libxt' 'python2' 'startup-notification')
2016-07-02 19:50:57 +00:00
makedepends=('autoconf2.13' 'libpulse' 'unzip' 'zip' 'yasm')
2016-01-10 00:40:17 +00:00
options=('!emptydirs')
2016-07-02 19:50:57 +00:00
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/therealglazou/${pkgname}/archive/${pkgver}.tar.gz"
2017-01-28 18:14:52 +00:00
"mozilla-central-${_mozilla_ver}.tar.bz2"::"https://hg.mozilla.org/mozilla-central/archive/${_mozilla_ver}.tar.bz2"
"bug_1329272_icu.patch"::"https://hg.mozilla.org/releases/mozilla-esr45/raw-diff/571b48abf054/build/autoconf/icu.m4"
2017-01-29 17:25:53 +00:00
"bug_1290037_update_keybits_in_h2.patch"::"https://hg.mozilla.org/mozilla-central/raw-rev/361ac226da2a"
2016-10-12 12:50:09 +00:00
"${pkgname}_gtk3.patch"
"bug_1234158_firefox-gtk3-20.patch"
2016-01-10 00:40:17 +00:00
"mozconfig"
2016-07-02 19:50:57 +00:00
"${pkgname}.desktop"
"bug_1257019.patch"::"https://hg.mozilla.org/mozilla-central/raw-rev/d5e77c8d64c9")
2017-01-28 18:14:52 +00:00
sha256sums=('660efb0f6498e0a67b2410f24a6c09836e2005906f4a456150df9e9e031f9e17'
2016-07-02 19:50:57 +00:00
'0b13213b5f9b3819b56872f7fb4fa7a1170ade06f8797dc11114e5f7c8eabca2'
2017-01-28 18:14:52 +00:00
'93de8102de543bad38dc49d9ffcf7a8a2d9246594a8e7b92c38736ed6c6050cd'
2017-01-29 17:25:53 +00:00
'87fb92e45f161d47b9e3ca31bcce60555bc33d633116dab4baa3bfba6ad965c4'
2016-10-12 12:50:09 +00:00
'3868f39181a258823c45e7ad62bba8e7b6e8b07c41535dd584c2dc71431f5deb'
'd5e1b9a702dc693184494899fc4cd57ac206e1fd5415a8e5520b8ff3b822e734'
'3c162de2bae884a573b2c1260500352e6b9c7803758cc73975109482503b9eb0'
2016-07-02 19:50:57 +00:00
'882133b77840356985a81e496b4ddc443f8f33c068cfb7ef0858497820adcfff'
2017-01-28 18:14:52 +00:00
'd0229aa67aa68dd50755fd022cf34af2a2a36faef2cf2ce06a336ebef7a08974')
2016-01-10 00:40:17 +00:00
prepare() {
2016-10-12 12:50:09 +00:00
cd "${pkgname}-${pkgver}"
2017-01-29 17:25:53 +00:00
# Fix build with GTK+3
patch -Np1 -i "${srcdir}/${pkgname}_gtk3.patch"
2016-01-10 00:40:17 +00:00
2016-10-12 12:50:09 +00:00
cd "${srcdir}/mozilla-central-${_mozilla_ver}"
2017-01-29 17:25:53 +00:00
2017-01-28 18:14:52 +00:00
# https://bugzilla.mozilla.org/show_bug.cgi?id=1329272
2017-01-29 17:25:53 +00:00
patch -Np1 -i "${srcdir}/bug_1329272_icu.patch"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1290037
patch -Np1 -i "${srcdir}/bug_1290037_update_keybits_in_h2.patch"
2017-01-28 18:14:52 +00:00
# Move files to their correct location
2016-07-02 19:50:57 +00:00
cp -r "${srcdir}/${pkgname}-${pkgver}" bluegriffon
2016-01-10 00:40:17 +00:00
cp "${srcdir}/mozconfig" .mozconfig
2016-10-12 12:50:09 +00:00
# https://bugzilla.mozilla.org/show_bug.cgi?id=1234158
2017-01-29 17:25:53 +00:00
patch -Np1 -i "${srcdir}/bug_1234158_firefox-gtk3-20.patch"
2016-10-12 12:50:09 +00:00
2016-01-10 00:40:17 +00:00
# Apply BlueGriffon's upstream customizations
2016-10-12 12:50:09 +00:00
patch -Np1 -i "bluegriffon/config/content.patch"
2016-01-10 00:40:17 +00:00
2016-07-02 19:50:57 +00:00
# ALARM
patch -p1 -i ../bug_1257019.patch
2016-01-10 00:40:17 +00:00
# python2 fix
find . -name \*.py -exec sed -i 's@^#.*python$@#!/usr/bin/python2@' '{}' \;
}
build() {
cd "${srcdir}/mozilla-central-${_mozilla_ver}"
# configure script misdetects the preprocessor without an optimization level
# https://bugs.archlinux.org/task/34644
export CPPFLAGS+=' -O2'
export PYTHON=python2
2016-10-12 12:50:09 +00:00
# Fix linking with gtk3
export LDFLAGS+=" $(pkg-config --libs gtk+-3.0)"
2016-01-10 00:40:17 +00:00
# Build the package
./mach build
}
package() {
cd "${srcdir}/mozilla-central-${_mozilla_ver}"
# Install files
install -m 755 -d "${pkgdir}/usr/lib/${pkgname}"
cp -LR bg/dist/bin/* "${pkgdir}/usr/lib/${pkgname}"
# Install executable file
install -m 755 -d "${pkgdir}/usr/bin"
ln -sf /usr/lib/${pkgname}/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
# Install icons
2016-10-12 12:50:09 +00:00
cp bluegriffon/branding/mozicon128.png bluegriffon/branding/default128.png
for _icon in 16 32 48 128 256; do
install -Dm644 bluegriffon/branding/default${_icon}.png \
2016-01-10 00:40:17 +00:00
"${pkgdir}/usr/share/icons/hicolor/${_icon}x${_icon}/apps/${pkgname}.png"
done
# Install desktop file
install -Dm644 ../${pkgname}.desktop \
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
# Use system-provided dictionaries
rm -rf "${pkgdir}/usr/lib/${pkgname}/dictionaries"
ln -sf /usr/share/hunspell "${pkgdir}/usr/lib/${pkgname}/dictionaries"
rm -rf "${pkgdir}/usr/lib/${pkgname}hyphenation"
ln -sf /usr/share/hyphen "${pkgdir}/usr/lib/${pkgname}/hyphenation"
}