recipe 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Build recipe for st.
  2. #
  3. # Copyright (c) 2018-2019 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=st
  17. version=0.8.2
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/x-apps"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. fetch=http://dl.suckless.org/st/$tarname
  24. description="
  25. st is a simple terminal implementation for X.
  26. st supports:
  27. * most VT10X escape sequences
  28. * serial line support
  29. * XIM support
  30. * utmp via utmp(1)
  31. * clipboard handling
  32. * mouse and keyboard shortcuts (via config.h)
  33. * UTF-8
  34. * wide-character support
  35. * resize
  36. * 256 colors and true colors
  37. * antialiased fonts (using fontconfig)
  38. * fallback fonts
  39. * line drawing
  40. "
  41. homepage=http://st.suckless.org
  42. license="MIT X Consortium"
  43. # Source documentation
  44. docs="FAQ LEGACY LICENSE README TODO"
  45. docsdir="${docdir}/${program}-${version}"
  46. build()
  47. {
  48. set -e
  49. unpack "${tardir}/$tarname"
  50. cd "$srcdir"
  51. # Set sane permissions
  52. chmod -R u+w,go-w,a+rX-s .
  53. # Avoid conflicts with terminfo database (ncurses)
  54. sed -i '/tic /d' Makefile
  55. cat "${worktree}/archive/st/config.mk" > ./config.mk
  56. make -j${jobs} \
  57. CFLAGS="$QICFLAGS -std=c99" \
  58. LDFLAGS="$QILDFLAGS" \
  59. X11INC=/usr/include/X11 \
  60. X11LIB=/usr/lib${libSuffix}/X11
  61. make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
  62. lzip -9 "${destdir}/${mandir}/man1/st.1"
  63. # Copy documentation
  64. mkdir -p "${destdir}${docsdir}"
  65. cp -p $docs "${destdir}${docsdir}"/
  66. }