Upgraded x-libs/ and x-apps/ software categories
[dragora.git] / recipes / x-apps / st / recipe
blobbe222af5cfec02d80d4b5ee16b71c775053909d7
1 # Build recipe for st.
3 # Copyright (c) 2018-2019, 2021-2022 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 # Exit immediately on any error
18 set -e
20 program=st
21 version=0.8.5
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=x-apps
27 tarname=${program}-${version}.tar.gz
29 # Remote source(s)
30 fetch=https://dl.suckless.org/st/$tarname
32 description="
33 st is a simple terminal implementation for X.
35 st supports:
36 *   most VT10X escape sequences
37 *    serial line support
38 *    XIM support
39 *    utmp via utmp(1)
40 *    clipboard handling
41 *    mouse and keyboard shortcuts (via config.h)
42 *    UTF-8
43 *    wide-character support
44 *    resize
45 *    256 colors and true colors
46 *    antialiased fonts (using fontconfig)
47 *    fallback fonts
48 *    line drawing
51 homepage=https://st.suckless.org
52 license="MIT X Consortium"
54 # Source documentation
55 docs="FAQ LEGACY LICENSE README TODO"
56 docsdir="${docdir}/${program}-${version}"
58 build()
60     unpack "${tardir}/$tarname"
62     cd "$srcdir"
64     # Set sane permissions
65     chmod -R u+w,go-w,a+rX-s .
67     cat "${worktree}/archive/st/config.mk" > ./config.mk
69     make -j${jobs} \
70      CFLAGS="$QICFLAGS -std=c99" \
71      LDFLAGS="$QILDFLAGS" \
72      X11INC=/usr/include/X11 \
73      X11LIB=/usr/lib${libSuffix}/X11
75     make -j${jobs} PREFIX=/usr DESTDIR="$destdir" install
77     lzip -9 "${destdir}/${mandir}/man1/st.1"
79     # Copy documentation
80     mkdir -p "${destdir}${docsdir}"
81     cp -p $docs "${destdir}${docsdir}"