summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9b9078b3c8bde4ebd7e46895d616ffa1baed0af8 (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
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>

_pkgname='cmake-init'
pkgname="${_pkgname}-git"
pkgver=0.39.0.r0.g4618fbb
pkgrel=1
pkgdesc='An opinionated CMake project initializer that generates CMake projects.'
arch=(any)
url="https://github.com/friendlyanon/${_pkgname}"
license=('GPL3')
depends=('python' 'cmake' 'git')
optdepends=(
	'clang: clang-tidy and clang-format'
	'cppcheck'
	'doxygen'
	'lcov'
	'codespell'
	'conan'
	'vcpkg'
)
makedepends=('python-setuptools')
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"
	python 'setup.py' build
}

package() {
	cd "$_srcdir/package"
	
	python 'setup.py' install --optimize=1 --root="$pkgdir/" --prefix='/usr'
	
	cd ..
	install -Dm644 'COPYING' -t "$pkgdir/usr/share/licenses/${_pkgname}"
}