makedeb
A CLI for the collection of terminal color scripts. Included 52 beautiful terminal color scripts.
Viewing /PKGBUILD
.
Click here to go back to the Git tree for shell-color-scripts-git.
# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=shell-color-scripts-git
_pkgname=shell-color-scripts
pkgver=1fcd013e2022.03.31
pkgrel=2
pkgdesc="A CLI for the collection of terminal color scripts. Included 52 beautiful terminal color scripts."
arch=('i686' 'amd64')
url="https://gitlab.com/dwt1/shell-color-scripts.git"
license=('MIT')
depends=('binutils')
optdepends=('bash' 'zsh')
provides=("${pkgname}" "${_pkgname}")
conflicts=("${pkgname}" "${_pkgname}")
# replaces=('shell-color-scripts')
source=("${_pkgname}::git+${url}")
sha256sums=("SKIP")
pkgver() {
cd "${_pkgname}"
_always=$(git describe --always | sed -e 's:-:.:g') # tag is mobile, and switches between numbers and letters, can't use it for versioning
_commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
_date=$(git log -1 --date=short --pretty=format:%cd)
printf "%s%s%s\n" "${_commits}" "${_always}" "${_date}" | sed -e 's:-:.:g' -e 's:_:.:g'
}
package() {
install -Dm644 "${srcdir}/${_pkgname}/zsh_completion/_colorscript" -t "${pkgdir}/usr/share/zsh/site-functions"
install -Dm755 "${srcdir}/${_pkgname}/zsh_completion/_colorscript" -t "${pkgdir}/opt/${_pkgname}/zsh_completion"
install -Dm644 "${srcdir}/${_pkgname}/colorscript.1" "${pkgdir}/usr/man/man1/colorscript.1"
install -Dm755 "${srcdir}/${_pkgname}/colorscript.sh" "${pkgdir}/usr/bin/colorscript"
mkdir -p "${pkgdir}/opt/${_pkgname}/colorscripts"
cp -vRr "${srcdir}/${_pkgname}/colorscripts" "${pkgdir}/opt/${_pkgname}"
install -Dm644 "${srcdir}/${_pkgname}/README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}