upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / notion / trunk / PKGBUILD
blobeb9aa205f598ba035f9eed77317e445ff3aaa447
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
3 # Contributor: aunoor
5 pkgname=notion
6 epoch=1
7 pkgver=4.0.2
8 pkgrel=4
9 _commit_doc=746225fb6cfc9109663faaabc73e444ea88815bb
10 pkgdesc="Tabbed tiling, window manager. Fork of Ion3"
11 url="https://notionwm.net"
12 arch=('x86_64')
13 license=('LGPL')
14 depends=('glib2' 'gettext' 'lua' 'libxext' 'libsm' 'freetype2' 'libxft')
15 optdepends=('libxinerama' 'libxrandr' 'xorg-xmessage'
16             'perl: for contrib/verify_index.pl')
17 makedepends=('git' 'pkgconfig' 'libxinerama' 'libxrandr'
18              'rubber' 'latex2html' 'texlive-htmlxml' 'texlive-latexextra')
19 optdepends=('xorg-fonts-100dpi' 'xorg-fonts-75dpi')
20 backup=("etc/notion/cfg_bindings.lua"
21         "etc/notion/cfg_defaults.lua"
22         "etc/notion/cfg_dock.lua"
23         "etc/notion/cfg_kludges.lua"
24         "etc/notion/cfg_layouts.lua"
25         "etc/notion/cfg_menu.lua"
26         "etc/notion/cfg_notion.lua"
27         "etc/notion/cfg_notion3_keybindings.lua"
28         "etc/notion/cfg_notion3_tiling.lua"
29         "etc/notion/cfg_notioncore.lua"
30         "etc/notion/cfg_query.lua"
31         "etc/notion/cfg_sp.lua"
32         "etc/notion/cfg_statusbar.lua"
33         "etc/notion/cfg_tiling.lua"
34         "etc/notion/cfg_xrandr.lua"
35         "etc/notion/look.lua"
36         "etc/notion/look_brownsteel.lua"
37         "etc/notion/look_clean.lua"
38         "etc/notion/look_cleanios.lua"
39         "etc/notion/look_cleanviolet.lua"
40         "etc/notion/look_dusky.lua"
41         "etc/notion/look_greenlight.lua"
42         "etc/notion/look_greyviolet.lua"
43         "etc/notion/look_ios.lua"
44         "etc/notion/look_newviolet.lua"
45         "etc/notion/look_newviolet_hidpi.lua"
46         "etc/notion/look_paper.lua"
47         "etc/notion/look_simpleblue.lua"
48         "etc/notion/lookcommon_clean.lua"
49         "etc/notion/lookcommon_clean_frame.lua"
50         "etc/notion/lookcommon_clean_stdisp.lua"
51         "etc/notion/lookcommon_clean_tab.lua"
52         "etc/notion/lookcommon_emboss.lua"
53         "etc/notion/lookcommon_emboss_frame.lua"
54         "etc/notion/lookcommon_emboss_stdisp.lua"
55         "etc/notion/lookcommon_emboss_tab.lua"
56         "etc/notion/mod_xinerama.lua"
57         "etc/notion/net_client_list.lua"
58         "etc/notion/statusbar_xkbgroup.lua"
59         "etc/notion/test_xinerama.lua"
60         "etc/notion/xkbbell.lua"
61         "etc/notion/xkbion.lua")
62 provides=('libtu' 'libextl')
63 changelog=ChangleLog
64 source=("notion::git+https://github.com/raboof/notion#tag=${pkgver}"
65         "notion-doc::git+https://github.com/raboof/notion-doc.git#commit=${_commit_doc}")
66 sha256sums=('SKIP'
67             'SKIP')
69 prepare() {
70   cd "$srcdir"
71   cat >notion/build/lua-detect.mk <<EOF
72 LUA_VERSION := 5.3
73 LUA_LIBS     := $(pkg-config --libs lua)
74 LUA_INCLUDES := $(pkg-config --cflags lua)
75 LUA          := $(which lua)
76 LUAC         := $(which luac)
77 EOF
78   sed -i '/Skipping dvi and ps because/d' notion-doc/Makefile
81 build() {
82   cd "$srcdir"/notion
83   make \
84         INCLUDES="-I$srcdir/notion -I/usr/include/freetype2" \
85         LUA_VERSION=5.3 \
86         PREFIX=/usr \
87         ETCDIR=/etc/notion \
88         NOTION_RELEASE="$pkgver"
90   cd "$srcdir"/notion-doc
91   make all-html all-html-onepage
94 package() {
95   cd "$srcdir"/notion
96   make \
97         DESTDIR="$pkgdir" \
98         LUA_VERSION=5.3 \
99         PREFIX=/usr \
100         ETCDIR=/etc/notion \
101         install
103   # doc
104   cd "$srcdir"/notion-doc
105   make PREFIX="$pkgdir"/usr ETCDIR=/etc/notion install
107   # fix typo
108   mv "$pkgdir"/usr/share/notion/notion{,flux}.1 "$pkgdir"/usr/share/man/man1/
110   # modules
111   cp "$srcdir"/notion/mod_xinerama/*.lua "$pkgdir"/etc/notion/
112   cp "$srcdir"/notion/mod_xkbevents/*.lua "$pkgdir"/etc/notion/
114   # contrib
115   mkdir -p "$pkgdir"/usr/share/notion/contrib
116   cp -a "$srcdir"/$pkgname/contrib/* "$pkgdir"/usr/share/notion/contrib
118   # license
119   install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/notion/LICENSE
121   #
122   mkdir -p "$pkgdir"/usr/share/xsessions
123   cat >"$pkgdir"/usr/share/xsessions/notion.desktop <<EOF
124 [Desktop Entry]
125 Name=Notion
126 Comment=This session logs you into Notion
127 Exec=/usr/bin/notion
128 TryExec=/usr/bin/notion
129 Icon=
130 Type=XSession