recipe 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Build recipe for dwm.
  2. #
  3. # Copyright (c) 2018-2019, 2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. # Exit immediately on any error
  17. set -e
  18. program=dwm
  19. version=6.3
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=x-apps
  23. tarname=${program}-${version}.tar.gz
  24. # Remote source(s)
  25. fetch=https://dl.suckless.org/dwm/$tarname
  26. description="
  27. Dynamic Window Manager.
  28. dwm is a dynamic window manager for X. It manages windows in tiled,
  29. monocle and floating layouts. All of the layouts can be applied
  30. dynamically, optimising the environment for the application in use
  31. and the task performed.
  32. "
  33. homepage=https://dwm.suckless.org
  34. license="MIT X Consortium"
  35. # Source documentation
  36. docs="LICENSE README"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. # Set default font size to '14'
  45. patch -p0 < "${worktree}/patches/dwm/dwm-fontsize.diff"
  46. cat "${worktree}/archive/dwm/config.mk" > ./config.mk
  47. make -j${jobs} \
  48. X11INC=/usr/include/X11 \
  49. X11LIB=/usr/lib${libSuffix}/X11 \
  50. FREETYPEINC=/usr/include/freetype2
  51. make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
  52. strip --strip-unneeded "${destdir}/usr/bin/dwm"
  53. lzip -9 "${destdir}/${mandir}/man1/dwm.1"
  54. # Include xinitrc file to start DWM
  55. mkdir -p "${destdir}/etc/X11/xinit"
  56. cp -p "${worktree}/archive/dwm/xinitrc-dwm" "${destdir}/etc/X11/xinit/"
  57. chmod 644 "${destdir}/etc/X11/xinit/xinitrc-dwm"
  58. touch "${destdir}/etc/X11/xinit/.graft-config"
  59. # Copy documentation
  60. mkdir -p "${destdir}/$docsdir"
  61. cp -p $docs "${destdir}/$docsdir"
  62. }