author | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-20 08:09:04 UTC |
committer | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-20 08:09:04 UTC |
parent | 59f64e1264bfa613f866810b383f17ff020ae28b |
PKGBUILD | +23 | -5 |
diff --git a/PKGBUILD b/PKGBUILD index fea03da..f48d9da 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,4 +1,9 @@ -pkgname=git +pkgbase=git +if [ -n "$_doc" ]; then +pkgname=(git-doc) +else +pkgname=(git) +fi pkgver=2.44.0 pkgrel=2 arch=('armv7h' 'aarch64') @@ -6,18 +11,31 @@ license=('unknown') depends=(curl perl ) +if [ -n "$_doc" ]; then +makedepends+=(asciidoc xmlto) +fi source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz") build() { - cd "$pkgname-$pkgver" + cd "$pkgbase-$pkgver" ./configure --prefix=/usr \ --with-gitconfig=/etc/gitconfig \ - --with-python=python3 && + --with-python=python3 + if [ -n "$_doc" ]; then + make man + else make + fi } -package() { - cd "$pkgname-$pkgver" +package_git() { + cd "$pkgbase-$pkgver" make perllibdir="$(perl -e "print qq(@INC)" | cut -d ' ' -f 1)" DESTDIR="$pkgdir/" install } + +package_git-doc() { + cd "$pkgbase-$pkgver" + make perllibdir="$(perl -e "print qq(@INC)" | cut -d ' ' -f 1)" DESTDIR="$pkgdir/" install-man +} + sha256sums=('e358738dcb5b5ea340ce900a0015c03ae86e804e7ff64e47aa4631ddee681de3')