recipe 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Build recipe for dwm.
  2. #
  3. # Copyright (c) 2018 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. program=dwm
  17. version=b69c870
  18. release=3
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/x-apps"
  21. tarname=${program}-${version}.tar.lz
  22. # Remote source(s)
  23. #fetch=http://dl.suckless.org/dwm/$tarname
  24. fetch=http://rsync.dragora.org/current/sources/$tarname
  25. description="
  26. Dynamic Window Manager.
  27. dwm is a dynamic window manager for X. It manages windows in tiled,
  28. monocle and floating layouts. All of the layouts can be applied
  29. dynamically, optimising the environment for the application in use
  30. and the task performed.
  31. "
  32. homepage=http://dwm.suckless.org
  33. license="MIT X Consortium"
  34. # Source documentation
  35. docs="LICENSE README"
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. cat "${worktree}/archive/dwm/config.mk" > ./config.mk
  45. make -j${jobs} \
  46. X11INC=/usr/include/X11 \
  47. X11LIB=/usr/lib${libSuffix}/X11 \
  48. FREETYPEINC=/usr/include/freetype2
  49. make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
  50. strip --strip-unneeded "${destdir}/usr/bin/dwm"
  51. lzip -9 "${destdir}/${mandir}/man1/dwm.1"
  52. # Include xinitrc file to start DWM
  53. mkdir -p "${destdir}/etc/X11/xinit"
  54. cp -p "${worktree}/archive/dwm/xinitrc-dwm" "${destdir}/etc/X11/xinit/"
  55. chmod 644 "${destdir}/etc/X11/xinit/xinitrc-dwm"
  56. touch "${destdir}/etc/X11/xinit/.graft-config"
  57. # Copy documentation
  58. mkdir -p "${destdir}${docsdir}"
  59. cp -p $docs "${destdir}${docsdir}"
  60. }