updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sigil-git / PKGBUILD
blobd04c37425f700c144effa678ffb3163da1ff22a2
1 # $Id: PKGBUILD 59836 2011-11-30 22:56:23Z giovanni $
2 # Maintainer: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>
5 pkgname=sigil-git
6 pkgver=20111202
7 pkgrel=1
8 pkgdesc="A WYSIWYG ebook editor"
9 arch=('i686' 'x86_64') 
10 url="http://code.google.com/p/sigil/"
11 license=('GPL3')
12 depends=('qt')
13 makedepends=('cmake')
14 provides=('sigil')
15 install=sigil.install
16 source=("sigil.desktop")
17 md5sums=('fef6aa492af487ccccd6b133635cee5a')
19 _gitroot=http://code.google.com/p/sigil/
20 _gitname=sigil
22 build() {
23     cd ${srcdir}
24     if [ -d ${_gitname} ]; then
25                 cd ${_gitname} && git pull origin master
26         msg "The local files are updated."
27     else
28                 git clone ${_gitroot}
29                 cd ${_gitname}
30     fi
31     msg "GIT checkout done or server timeout"
32     msg "Starting make..."
34   mkdir build
35   cd build
36   cmake -G "Unix Makefiles" \
37     -DCMAKE_INSTALL_PREFIX=/usr \
38     -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
39     -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
40     -DCMAKE_BUILD_TYPE=Release \
41     -DCMAKE_SKIP_RPATH=ON ..
43     make
46 package() {
47   cd "${srcdir}"/${_gitname}/build
48   make install DESTDIR="${pkgdir}"
50   install -d -m 0755 "${pkgdir}"/usr/share/applications
51   install -m 0644 "${srcdir}"/sigil.desktop "${pkgdir}"/usr/share/applications
53   for _pic in 16 32 48 128 256; do
54     install -D -m 0644 ../src/Sigil/Resource_Files/icon/app_icon_${_pic}.png \
55       "${pkgdir}"/usr/share/icons/hicolor/${_pic}x${_pic}/apps/sigil.png
56   done