summaryrefslogtreecommitdiff
path: root/extra/lyx/PKGBUILD
blob: bc0e7856f83992123c121ebb06b3b267351e6c2b (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
# $Id: PKGBUILD 145773 2011-12-31 06:32:37Z schiv $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=lyx
pkgver=2.0.2
pkgrel=1
pkgdesc="An advanced WYSIWYM document processor & LaTeX front-end"
arch=('i686' 'x86_64')
url="http://www.lyx.org"
depends=('qt' 'texlive-core' 'python2' 'imagemagick' 'enchant' 'boost-libs' 'libmythes')
makedepends=('boost')
optdepends=('rcs: built-in version control system'
            'texlive-latexextra: float wrap support')
license=('GPL')
source=(ftp://ftp.lip6.fr/pub/lyx/stable/2.0.x/$pkgname-$pkgver.tar.xz
        lyx.desktop lyxrc.dist)
backup=('etc/lyx/lyxrc.dist')
install=lyx.install
options=('emptydirs')
md5sums=('f6421fdf118ace93d259220e6a3c4431'
         '1f65a736f015a5350f8efb41b2f13abd'
         'b70fdeab95ba4a6c3ff72410dfa61823')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  find . -type f -exec sed -i 's|#!.*python|#!/usr/bin/env python2|' {} +
  sed -i 's|"python|"python2|' lib/configure.py src/support/os.cpp
  export CXXFLAGS="$CXXFLAGS -fpermissive"
  ./configure --prefix=/usr \
    --with-frontend=qt4 --without-included-boost \
    --without-included-mythes
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  # install desktop entry
  install -Dm644 "${srcdir}/lyx.desktop" \
    "${pkgdir}/usr/share/applications/lyx.desktop"
  install -Dm644 "lib/images/lyx.png" \
    "${pkgdir}/usr/share/pixmaps/lyx.png"

  # install default config file
  install -Dm644 "${srcdir}/lyxrc.dist" "${pkgdir}/etc/lyx/lyxrc.dist"
  ln -sf /etc/lyx/lyxrc.dist "${pkgdir}/usr/share/lyx/lyxrc.dist"
}