summaryrefslogtreecommitdiff
path: root/community/sigil/PKGBUILD
blob: feb0fb1c1a4e325cbd98df23cc84039f622e9766 (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
# $Id: PKGBUILD 37601 2011-01-15 09:55:00Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>

pkgname=sigil
_pkgname=Sigil
pkgver=0.3.4
pkgrel=1
pkgdesc="A WYSIWYG ebook editor"
arch=('i686' 'x86_64' 'mips64el') 
url="http://code.google.com/p/sigil/"
license=('GPL3')
depends=('qt')
makedepends=('cmake')
install=sigil.install
source=(http://${pkgname}.googlecode.com/files/${_pkgname}-${pkgver}-Code.zip
        ${pkgname}.desktop)
md5sums=('6f83a8ee12d6f5918fe50b8314e63760'
         'fef6aa492af487ccccd6b133635cee5a')

build() {
  cd ${_pkgname}-${pkgver}-Code

  mkdir build
  cd build
  cmake -G "Unix Makefiles" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
    -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_SKIP_RPATH=ON .. || return 1

    make || return 1
}

package() {
  cd ${_pkgname}-${pkgver}-Code/build

  make install DESTDIR="${pkgdir}" || return 1

  install -d -m 0755 "${pkgdir}"/usr/share/applications || return 1
  install -m 0644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications || return 1

  for _pic in 16 32 48 128 256; do
    install -D -m 0644 ../src/Sigil/Resource_Files/icon/app_icon_${_pic}.png \
      "${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/${pkgname}.png || return 1
  done
}