summaryrefslogtreecommitdiff
path: root/community/notion/PKGBUILD
blob: 5c6b7b0d6cfe93b45a2923d1ad53f9132942af53 (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 57592 2011-10-31 08:12:46Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
# Contributor: aunoor

pkgname=notion
pkgver=20111031
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')
optdepends=('libxinerama' 'libxrandr')
makedepends=('git' 'pkgconfig' 'libxinerama' 'libxrandr'
	     'rubber' 'latex2html' 'texlive-htmlxml' 'texlive-latexextra')
provides=('libtu' 'libextl')
changelog=ChangleLog
_gitroots=("git://notion.git.sourceforge.net/gitroot/notion/notion"
	   "git://notion.git.sourceforge.net/gitroot/notion/libtu"
	   "git://notion.git.sourceforge.net/gitroot/notion/libextl"
	   "git://notion.git.sourceforge.net/gitroot/notion/notion-doc"
	   "git://notion.git.sourceforge.net/gitroot/notion/mod_xinerama"
	   "git://notion.git.sourceforge.net/gitroot/notion/mod_xkbevents"
	   "git://notion.git.sourceforge.net/gitroot/notion/mod_xrandr"
	   "git://notion.git.sourceforge.net/gitroot/notion/contrib")
#source=(https://downloads.sourceforge.net/project/notion/notion-3-2011102900-src.tar.bz2)

build() {
  cd ${srcdir}

  # git clone
  for _gitroot in ${_gitroots[@]}; do
    msg "Connecting to the git repository..."
    _gitname=`basename ${_gitroot}`
    if [ -d ${srcdir}/${_gitname} ]; then
        pushd ${srcdir}/${_gitname}
        git pull origin
        popd
    else
        git clone --depth 1 ${_gitroot}
    fi
    msg "GIT checkout done or server timeout"
  done

  # copy to notion-build
  rm -rf ${srcdir}/notion-build
  cp -r  ${srcdir}/notion ${srcdir}/notion-build
  for i in libextl libtu mod_xinerama mod_xkbevents mod_xrandr notion-doc; do
    cp -r  ${srcdir}/$i ${srcdir}/notion-build/
  done

  # build notion
  cd ${srcdir}/notion-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}/notion-build

  # doc workaround
  for i in ioncore mod_tiling mod_query de mod_menu mod_dock mod_sp mod_statusbar; do
    (cd $i && make _exports_doc)
  done

  # build doc and modules
  for i in mod_xinerama mod_xkbevents mod_xrandr notion-doc; do
    (cd $i && make -j1 TOPDIR=.. all)
  done
}

package() {
  cd ${srcdir}/notion-build

  # notion
  make PREFIX=${pkgdir}/usr ETCDIR=${pkgdir}/etc/notion install

  # modules
  for i in mod_xinerama mod_xkbevents mod_xrandr notion-doc; do
    (cd $i && make  PREFIX=${pkgdir}/usr ETCDIR=${pkgdir}/etc/notion TOPDIR=.. install)
  done
  cp ${srcdir}/mod_xinerama/*.lua $pkgdir/etc/notion/
  cp ${srcdir}/mod_xkbevents/*.lua $pkgdir/etc/notion/

  # contrib
  mkdir -p $pkgdir/usr/share/notion/contrib
  cp -a ${srcdir}/contrib/* $pkgdir/usr/share/notion/contrib

  # license
  install -Dm0644 LICENSE ${pkgdir}/usr/share/licenses/notion/LICENSE
}