recipe 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Build recipe for st.
  2. #
  3. # Copyright (c) 2018-2019, 2021-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=st
  19. version=0.8.5
  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/st/$tarname
  26. description="
  27. st is a simple terminal implementation for X.
  28. st supports:
  29. * most VT10X escape sequences
  30. * serial line support
  31. * XIM support
  32. * utmp via utmp(1)
  33. * clipboard handling
  34. * mouse and keyboard shortcuts (via config.h)
  35. * UTF-8
  36. * wide-character support
  37. * resize
  38. * 256 colors and true colors
  39. * antialiased fonts (using fontconfig)
  40. * fallback fonts
  41. * line drawing
  42. "
  43. homepage=https://st.suckless.org
  44. license="MIT X Consortium"
  45. # Source documentation
  46. docs="FAQ LEGACY LICENSE README TODO"
  47. docsdir="${docdir}/${program}-${version}"
  48. build()
  49. {
  50. unpack "${tardir}/$tarname"
  51. cd "$srcdir"
  52. # Set sane permissions
  53. chmod -R u+w,go-w,a+rX-s .
  54. cat "${worktree}/archive/st/config.mk" > ./config.mk
  55. make -j${jobs} \
  56. CFLAGS="$QICFLAGS -std=c99" \
  57. LDFLAGS="$QILDFLAGS" \
  58. X11INC=/usr/include/X11 \
  59. X11LIB=/usr/lib${libSuffix}/X11
  60. make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
  61. lzip -9 "${destdir}/${mandir}/man1/st.1"
  62. # Copy documentation
  63. mkdir -p "${destdir}/$docsdir"
  64. cp -p $docs "${destdir}/$docsdir"
  65. }