qi: added new item to the TODO file
[dragora.git] / recipes / x-apps / icewm / recipe
blobd84307673a5f3b359527990bbfa7665a51b11176
1 # Build recipe for icewm.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 program=icewm
19 version=1.4.2
20 release=4
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-apps"
25 tarname=${program}-${version}.tar.bz2
27 # Remote source(s)
28 fetch=http://github.com/bbidulock/icewm/releases/download/${version}/$tarname
30 homepage=http://ice-wm.org/
32 description="
33 IceWM Window Manager.
35 IceWM is a window manager for the X Window System.  The goal of IceWM
36 is speed, simplicity, and not getting in the user's way.  It comes with
37 a taskbar with pager, global and per-window keybindings and a dynamic
38 menu system.
40 For more information, visit: $homepage
43 license=LGPLv2+
45 # Source documentation
46 docs="AUTHORS ChangeLog COPYING NEWS README.md THANKS TODO VERSION doc/*.html icewm.lsm"
47 docsdir="${docdir}/${program}-${version}"
49 build()
51     set -e
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     patch -Np0 -i ${worktree}/patches/icewm/fix-strlcat_strlcpy.patch
58     patch -Np0 -i ${worktree}/patches/icewm/musl.patch
60     # Note: IceWM has sound support for GUI events, this requires the
61     # libsndfile dependency, and also has been marked as experimental;
62     # we turn it to OFF by default.
64     ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
65     LDFLAGS="$QILDFLAGS" \
66      $configure_args \
67      --libdir=/usr/lib${libSuffix} \
68      --mandir=$mandir \
69      --enable-static=no \
70      --enable-shared=yes \
71      --docdir=$docsdir \
72      --enable-shaped-decorations \
73      --enable-gradients \
74      --disable-guievents \
75      --disable-menus-gnome2 \
76      --with-x \
77      --build="$(cc -dumpmachine)"
79     make -j${jobs} V=1
80     make -j${jobs} DESTDIR="$destdir" install
82     # Include xinitrc file to start ICEWM
84     mkdir -p "${destdir}/etc/X11/xinit"
85     cp -p "${worktree}/archive/icewm/xinitrc-icewm" "${destdir}/etc/X11/xinit/"
86     chmod 644 "${destdir}/etc/X11/xinit/xinitrc-icewm"
88     touch "${destdir}/etc/X11/xinit/.graft-config"
90     # Compress and link man pages (if needed)
91     if test -d "${destdir}/$mandir"
92     then
93         (
94             cd "${destdir}/$mandir"
95             find . -type f -exec lzip -9 '{}' +
96             find . -type l | while read -r file
97             do
98                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
99                 rm -- "$file"
100             done
101         )
102     fi
104     # Copy documentation
105     mkdir -p "${destdir}${docsdir}"
106     cp -p $docs "${destdir}${docsdir}/"