blob: ff1d89d25989e095738a3d8137f8a16e896111ba (
plain)
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
|
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
_pkgname='cmake-init'
pkgname="${_pkgname}-git"
pkgver=0.41.1.r0.g7e0c52f
pkgrel=1
pkgdesc='An opinionated CMake project initializer that generates CMake projects.'
arch=(any)
url="https://github.com/friendlyanon/${_pkgname}"
license=('GPL-3.0-only')
depends=('python' 'cmake' 'git')
optdepends=(
'clang: clang-tidy and clang-format'
'cppcheck'
'doxygen'
'lcov'
'codespell'
'conan'
'vcpkg'
)
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
sha256sums=('SKIP')
source=("git+${url}.git")
_srcdir="$_pkgname"
pkgver() {
cd "${_srcdir}"
( set -o pipefail
git describe --tags --abbrev=7 --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}
prepare() {
cd "$_srcdir/package"
sed -i 's|license_files="../COPYING"|license_files=("../COPYING",)|' 'setup.py'
}
build() {
cd "$_srcdir/package"
python -m build --wheel --no-isolation
}
package() {
cd "$_srcdir/package"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 '../COPYING' -t "$pkgdir/usr/share/licenses/${_pkgname}"
}
|