Created
December 3, 2016 15:56
-
-
Save yousefamar/d80d62e8c9589fdbcc27c0710b24a36c to your computer and use it in GitHub Desktop.
st PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: mar77i <mar77i at mar77i dot ch> | |
# Past Maintainer: Gaetan Bisson <[email protected]> | |
# Contributor: Scytrin dai Kinthra <[email protected]> | |
pkgname=st-git | |
_pkgname=st | |
pkgver=0.7.2.gf92ca6e | |
pkgrel=1 | |
pkgdesc='Simple virtual terminal emulator for X' | |
url='http://st.suckless.org/' | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
options=('zipman') | |
depends=('libxft') | |
makedepends=('ncurses' 'libxext' 'git') | |
epoch=1 | |
# include config.h and any patches you want to have applied here | |
source=('git://git.suckless.org/st') | |
patches=( | |
'st-scrollback-0.7.diff' | |
'st-scrollback-mouse-20161020-6e79e83.diff' | |
'st-scrollback-mouse-altscreen-20161020-6e79e83.diff' | |
'st-alpha-20160727-308bfbf.diff' | |
'st-externalpipe-20160727-308bfbf.diff' | |
) | |
sha1sums=('SKIP') | |
provides=("${_pkgname}") | |
conflicts=("${_pkgname}") | |
pkgver() { | |
cd "${_pkgname}" | |
git describe --tags |sed 's/-/./g' | |
} | |
prepare() { | |
cd "${_pkgname}" | |
git checkout 0.7 | |
git checkout -b custom | |
for patch in "${patches[@]}"; do | |
curl "http://st.suckless.org/patches/$patch" | git apply | |
done | |
git add -A | |
git commit -m "Apply patches" | |
sed \ | |
-e '/char font/s/= .*/= "bitocra:size=8";/' \ | |
-e '/int borderpx/s/= .*/= 2;/' \ | |
-e '/char shell/s/= .*/= "\/bin\/zsh";/' \ | |
-e '/char worddelimiters/s/= .*/= " '"'"'`\\\"()[]{}<>|";/' \ | |
-e '/int cursorthickness/s/= .*/= 1;/' \ | |
-e '/int bellvolume/s/= .*/= 50;/' \ | |
-e '/int defaultbg/s/= .*/= 0;/' \ | |
-e '/int cursorshape/s/= .*/= 6;/' \ | |
-e '/clip/s/MODKEY/ControlMask/' \ | |
-i config.def.h | |
git add -A | |
git commit -m "Configure" | |
} | |
build() { | |
cd "${_pkgname}" | |
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 | |
} | |
package() { | |
cd "${_pkgname}" | |
make PREFIX=/usr DESTDIR="${pkgdir}" install | |
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment