summaryrefslogtreecommitdiff
path: root/community/notion/PKGBUILD
blob: f7bb067846824504c052d5537ebc466acccf529b (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
# $Id: PKGBUILD 54370 2011-08-17 15:48:41Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
# Contributor: aunoor

pkgname=notion
pkgver=20110817
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')
conflicts=('ion3')
provides=('libtu' 'libextl')
source=()

_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"

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

    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
}

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