linux-libre upgraded to version 4.19.14
[dragora.git] / recipes / x-apps / dwm / recipe
blob909ad986e401223d59575930bcd08116cf337ff4
1 # Build recipe for dwm.
3 # Copyright (c) 2018-2019 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 program=dwm
18 version=b69c870
19 release=4
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/x-apps"
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 #fetch=http://dl.suckless.org/dwm/$tarname
28 fetch=http://rsync.dragora.org/current/sources/$tarname
30 description="
31 Dynamic Window Manager.
33 dwm is a dynamic window manager for X.  It manages windows in tiled,
34 monocle and floating layouts.  All of the layouts can be applied
35 dynamically, optimising the environment for the application in use
36 and the task performed.
39 homepage=http://dwm.suckless.org
40 license="MIT X Consortium"
42 # Source documentation
43 docs="LICENSE README"
44 docsdir="${docdir}/${program}-${version}"
46 build()
48     set -e
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
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
62     make -j${jobs} \
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"
80     # Copy documentation
81     mkdir -p "${destdir}${docsdir}"
82     cp -p $docs "${destdir}${docsdir}"