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.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-apps"
25 tarname=${program}-${version}.tar.lz
28 fetch=http://github.com/ice-wm/icewm/releases/download/${version}/$tarname
30 homepage=http://ice-wm.org/
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
40 For more information, visit: $homepage
45 # Source documentation
46 docs="AUTHORS ChangeLog COPYING NEWS README.md THANKS TODO VERSION doc/*.html icewm.lsm"
47 docsdir="${docdir}/${program}-${version}"
53 unpack "${tardir}/$tarname"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
60 ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
62 --libdir=/usr/lib${libSuffix} \
64 --with-docdir=$docsdir \
66 --build="$(cc -dumpmachine)"
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"
87 cd "${destdir}/$mandir"
88 find . -type f -exec lzip -9 '{}' +
89 find . -type l | while read -r file
91 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
98 mkdir -p "${destdir}${docsdir}"
99 cp -p $docs "${destdir}${docsdir}"