recipes: move dragora-ice to ../testing; move some recipes to community/
[dragora.git] / recipes / community / x-apps / icewm / recipe
blob1896c5c8393739fb2f37964da7a7e63c9b038248
1 # Build recipe for icewm.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2019 Lucas Skoldqvist, <frusen@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.6.2
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-apps"
25 tarname=${program}-${version}.tar.lz
27 # Remote source(s)
28 fetch=http://github.com/ice-wm/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     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
61      $configure_args \
62      --libdir=/usr/lib${libSuffix} \
63      --mandir=$mandir \
64      --with-docdir=$docsdir \
65      --disable-rpath \
66      --build="$(cc -dumpmachine)"
68     make -j${jobs} V=1
69     make -j${jobs} DESTDIR="$destdir" install
71     mkdir -p "${destdir}/usr/share/xsessions" \
72              "${destdir}/usr/share/applications"
73     cp -p lib/icewm-session.desktop "${destdir}/usr/share/xsessions"
74     cp -p lib/icewm.desktop "${destdir}/usr/share/applications"
76     # Include xinitrc file to start IceWM
77     mkdir -p "${destdir}/etc/X11/xinit"
78     cp -p "${worktree}/archive/icewm/xinitrc-icewm" "${destdir}/etc/X11/xinit/"
79     chmod 644 "${destdir}/etc/X11/xinit/xinitrc-icewm"
81     touch "${destdir}/etc/X11/xinit/.graft-config"
83     # Compress and link man pages (if needed)
84     if test -d "${destdir}/$mandir"
85     then
86         (
87             cd "${destdir}/$mandir"
88             find . -type f -exec lzip -9 '{}' +
89             find . -type l | while read -r file
90             do
91                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
92                 rm -- "$file"
93             done
94         )
95     fi
97     # Copy documentation
98     mkdir -p "${destdir}${docsdir}"
99     cp -p $docs "${destdir}${docsdir}"