-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
83 lines (78 loc) · 3.63 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Maintainer: Jose Riha <jose1711 gmail com>
# Maintainer: Sebastian J. Bronner <[email protected]>
# Maintainer: Kevin Stolp <[email protected]>
# Contributor: Patrick Jackson <PatrickSJackson gmail com>
# Contributor: Christoph Vigano <[email protected]>
# Contributor: Anthony Irwin <[email protected]>
pkgname=st
pkgver=0.9
pkgrel=4
pkgdesc='A simple virtual terminal emulator for X with wheelmouse scrollback support patches included'
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
license=('MIT')
depends=(libxft)
url=https://st.suckless.org
_patches=(http://st.suckless.org/patches/scrollback/st-scrollback-0.8.5.diff
https://st.suckless.org/patches/scrollback/st-scrollback-reflow-0.8.5.diff
https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20220127-2c5edf2.diff
https://st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20220127-2c5edf2.diff)
source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz
terminfo.patch
README.terminfo.rst
${_patches[@]})
sha256sums=('f36359799734eae785becb374063f0be833cf22f88b4f169cd251b99324e08e7'
'f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23'
'95be3197f7de77a0fe2e4f527202e17e910ee24e1ed6bc39beb320a1304bb7e1'
'dc7f5223b26fc813d91d4ae35bdaa54d63024cae9f18afd9b3594ba3399dfa55'
'37a6bbaf77e2657c06e0b34e59980adf56aa402d7316ddb96a24764a742bbb24'
'46ac9bcdbfeb0011533207cb0ab31657a3eb9196da1d0db346e6a9d1fc4b4f76'
'8f2f17683f12d57b1c80461247fe15234f5f5a6fc52cdf48176c8358e699101d')
_sourcedir=$pkgname-$pkgver
_makeopts="--directory=$_sourcedir"
prepare() {
patch -d "$_sourcedir" -p 0 < terminfo.patch
# This package provides a mechanism to provide a custom config.h. Multiple
# configuration states are determined by the presence of two files in
# $BUILDDIR:
#
# config.h config.def.h state
# ======== ============ =====
# absent absent Initial state. The user receives a message on how
# to configure this package.
# absent present The user was previously made aware of the
# configuration options and has not made any
# configuration changes. The package is built using
# default values.
# present The user has supplied his or her configuration. The
# file will be copied to $_sourcedir and used during
# build.
#
# After this test, config.def.h is copied from $_sourcedir to $BUILDDIR to
# provide an up to date template for the user.
if [ -e "$BUILDDIR/config.h" ]
then
cp "$BUILDDIR/config.h" "$_sourcedir"
elif [ ! -e "$BUILDDIR/config.def.h" ]
then
echo \
'This package can be configured in config.h. Copy the config.def.h that' \
'was just placed into the package directory to config.h and modify it' \
'to change the configuration. Or just leave it alone to continue to use' \
'default values.'
fi
for patch in "${_patches[@]}"; do
echo "Applying patch $(basename $patch)..."
patch -i "$srcdir/$(basename $patch)" -d "$_sourcedir" --strip=1
done
cp "$_sourcedir/config.def.h" "$BUILDDIR"
}
build() {
make -C "$_sourcedir" X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
local shrdir="$pkgdir/usr/share"
make -C "$_sourcedir" PREFIX=/usr DESTDIR="$pkgdir" install
install -D -m 0644 -t "$shrdir/licenses/$pkgname" "$_sourcedir/LICENSE"
install -D -m 0644 -t "$shrdir/doc/$pkgname" "$_sourcedir/README" README.terminfo.rst
install -D -m 0644 -t "$shrdir/$pkgname" "$_sourcedir/st.info"
}