diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..8a37067 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: + +pkgname=st-spinach-git +_pkgname=st +pkgver=0.8.2.r1062.2087ab9 +pkgrel=1 +epoch=1 +pkgdesc="Spinach's simple (suckless) terminal with a few patches" +url='https://git.keegandeppe.com/kdeppe/st' +arch=('x86_64') +license=('MIT') +options=('zipman') +depends=('libxft') +makedepends=('ncurses' 'libxext' 'git') +source=(git+https://git.keegandeppe.com/kdeppe/st) +sha1sums=('SKIP') + +_patches=("https://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff" + "https://st.suckless.org/patches/blinking_cursor/st-blinking_cursor-20211116-2f6e597.diff" + "https://st.suckless.org/patches/alpha/st-alpha-0.8.2.diff" + "https://st.suckless.org/patches/alpha_focus_highlight/st-focus-20200731-43a395a.diff") + +source=("http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz" + "$config" + "${_patches[@]}") + +provides=("${_pkgname}") +conflicts=("${_pkgname}") + +pkgver() { + cd "${_pkgname}" + printf "%s.r%s.%s" "$(awk '/^VERSION =/ {print $3}' config.mk)" \ + "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd $srcdir/${_pkgname} + # skip terminfo which conflicts with ncurses + # sed -i '/tic /d' Makefile + for patch in "${_path[@]}"; do + echo "Applying $(basename $patch)..." + patch -Np1 -i "$srcdir/$(basename $patch)" + done +} + +build() { + cd "${_pkgname}" + make +} + +package() { + cd "${_pkgname}" + make PREFIX=/usr DESTDIR="${pkgdir}" install + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + #install -Dm644 Xdefaults "${pkgdir}/usr/share/doc/${pkgname}/Xdefaults.example" +}