summaryrefslogtreecommitdiff
path: root/community/notion/PKGBUILD
blob: 0bc1fcd146ced22c23435ec40f711710445f97b9 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# $Id: PKGBUILD 54702 2011-08-23 11:42:16Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
# Contributor: aunoor

pkgname=notion
pkgver=20110823
pkgrel=1
pkgdesc="Tabbed tiling, window manager. Fork of Ion3"
url="http://sourceforge.net/projects/notion/"
arch=('i686' 'x86_64')
license=('custom:LGPL')
depends=('glib2' 'gettext' 'lua' 'libxext' 'libsm')
makedepends=('git' 'pkgconfig'
	     'rubber' 'latex2html' 'texlive-htmlxml' 'texlive-latexextra')
conflicts=('ion3')
provides=('libtu' 'libextl')

_gitroot="git://notion.git.sourceforge.net/gitroot/notion/notion"
_gitname="notion"
_gitroot2="git://notion.git.sourceforge.net/gitroot/notion/libtu"
_gitname2="libtu"
_gitroot3="git://notion.git.sourceforge.net/gitroot/notion/libextl"
_gitname3="libextl"
_gitroot4="git://notion.git.sourceforge.net/gitroot/notion/notion-doc"
_gitname4="notion-doc"

source=(doc-build-fix.patch)
md5sums=('68b348427d0531d2679a8a8d97d51c7d')

build() {
    cd ${srcdir}

    msg "Connecting to the git repository..."
    if [ -d ${srcdir}/${_gitname} ]; then
        cd ${_gitname}
        git pull origin
    else
        git clone --depth 1 ${_gitroot}
        cd ${_gitname}
    fi

    if [ -d ${srcdir}/${_gitname}/${_gitname2} ]; then
    echo
        git pull origin
    else
        git clone --depth 1 ${_gitroot2}
      echo
    fi

    if [ -d ${srcdir}/${_gitname}/${_gitname3} ]; then
    echo
        git pull origin
    else
        git clone --depth 1 ${_gitroot3}
    echo
    fi

    if [ -d ${srcdir}/${_gitname}/${_gitname4} ]; then
    echo
        git pull origin
    else
        git clone --depth 1 ${_gitroot4}
    echo
    fi

    msg "GIT checkout done or server timeout"

    rm -rf ${srcdir}/${_gitname}-build
    cp -r  ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build

    cd ${srcdir}/${_gitname}-build

    msg "Starting make..."

    sed -e 's/^\(PREFIX=\).*$/\1\/usr/' \
        -e 's/^\(ETCDIR=\).*$/\1\/etc\/notion/' \
        -e 's/^\(LUA_DIR=\).*$/\1\/usr/' \
        -e 's/^\(X11_PREFIX=\).*/\1\/usr/' \
        -i system.mk

    make INCLUDES=-I${srcdir}/${_gitname}-build
    (cd notion-doc && patch -p1 <$srcdir/doc-build-fix.patch)
    (cd notion-doc && make -j1 TOPDIR=.. all)
}

package() {
    cd ${srcdir}/${_gitname}-build
    make PREFIX=${pkgdir}/usr ETCDIR=${pkgdir}/etc/notion install
    (cd notion-doc && make  PREFIX=${pkgdir}/usr TOPDIR=.. install)
    mkdir -p ${pkgdir}/usr/share/licenses/notion
    cp LICENSE ${pkgdir}/usr/share/licenses/notion
}