1 # Build recipe for dwm.
3 # Copyright (c) 2018-2019, 2022 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.gz
30 fetch=https://dl.suckless.org/dwm/$tarname
33 Dynamic Window Manager.
35 dwm is a dynamic window manager for X. It manages windows in tiled,
36 monocle and floating layouts. All of the layouts can be applied
37 dynamically, optimising the environment for the application in use
38 and the task performed.
41 homepage=https://dwm.suckless.org
42 license="MIT X Consortium"
44 # Source documentation
46 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 # Set sane permissions
55 chmod -R u+w,go-w,a+rX-s .
57 # Set default font size to '14'
58 patch -p0 < "${worktree}/patches/dwm/dwm-fontsize.diff"
60 cat "${worktree}/archive/dwm/config.mk" > ./config.mk
63 X11INC=/usr/include/X11 \
64 X11LIB=/usr/lib${libSuffix}/X11 \
65 FREETYPEINC=/usr/include/freetype2
67 make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
69 strip --strip-unneeded "${destdir}/usr/bin/dwm"
70 lzip -9 "${destdir}/${mandir}/man1/dwm.1"
72 # Include xinitrc file to start DWM
74 mkdir -p "${destdir}/etc/X11/xinit"
75 cp -p "${worktree}/archive/dwm/xinitrc-dwm" "${destdir}/etc/X11/xinit/"
76 chmod 644 "${destdir}/etc/X11/xinit/xinitrc-dwm"
78 touch "${destdir}/etc/X11/xinit/.graft-config"
81 mkdir -p "${destdir}/$docsdir"
82 cp -p $docs "${destdir}/$docsdir"