diff options
author | Michael Kuc | 2020-05-24 13:40:20 +0100 |
---|---|---|
committer | Michael Kuc | 2020-05-24 13:40:20 +0100 |
commit | 07a2ae64ee4b82a4cb5fb6f7da3e6cd7d1db6df4 (patch) | |
tree | a198cd7fc6310ebaec874fa1ecbd66a049533426 | |
parent | 089e37c3b49e8982f2084edbb9d4301e3e051181 (diff) | |
download | aur-07a2ae64ee4b82a4cb5fb6f7da3e6cd7d1db6df4.tar.gz |
Update build to use included CMakeLists.txt.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 30 insertions, 18 deletions
@@ -1,6 +1,6 @@ pkgbase = termcolor-git pkgdesc = Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force. - pkgver = 0.1 + pkgver = v1.0.1.r22.ga79bf3c pkgrel = 1 url = https://github.com/ikalnytskyi/termcolor arch = x86_64 @@ -8,7 +8,7 @@ pkgbase = termcolor-git makedepends = git makedepends = cmake provides = termcolor - source = termcolor-git::git+https://github.com/ikalnytskyi/termcolor.git + source = termcolor::git+https://github.com/ikalnytskyi/termcolor.git sha256sums = SKIP pkgname = termcolor-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0c76a5799b39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/src +/termcolor +/pkg +/*.pkg.* @@ -1,8 +1,9 @@ # Maintainer: Michael Kuc <michaelkuc6 at gmail dot com> # Contributor: Ihor Kalnytskyi <ikalnytskyi at github dot com> -pkgname=termcolor-git -pkgver=0.1 +_pkgname=termcolor +pkgname="${_pkgname}-git" +pkgver=v1.0.1.r22.ga79bf3c pkgrel=1 epoch= pkgdesc='Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.' @@ -14,36 +15,43 @@ depends=() makedepends=('git' 'cmake') checkdepends=() optdepends=() -provides=('termcolor') +provides=("${_pkgname}") conflicts=() replaces=() backup=() options=() install= changelog= -source=("${pkgname}::git+https://github.com/ikalnytskyi/termcolor.git") +source=("${_pkgname}::git+https://github.com/ikalnytskyi/termcolor.git") noextract=() validpgpkeys=() sha256sums=('SKIP') +pkgver() { + cd "${srcdir}/${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + prepare() { - # cd "$pkgname - : + cd "${_pkgname}" + mkdir -p build + cd build + cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=/usr ".." } build() { - cd "${pkgname}" - cmake . - make + cd "${_pkgname}/build" + cmake --build . } -check() { - cd "${pkgname}" - ./test_termcolor -} +# check() { +# cd "${pkgname}/build" +# ./test_termcolor +# } package() { - cd "${pkgname}" - install -Dm644 "include/termcolor/termcolor.hpp" "${pkgdir}/usr/include/termcolor/termcolor.hpp" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${_pkgname}" + (cd build && make PREFIX=/usr DESTDIR="${pkgdir}/" install) + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm644 README.rst "${pkgdir}/usr/share/doc/${_pkgname}/README.rst" } |