diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-08-07 17:46:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-08-07 17:47:46 +0000 |
commit | 22e9223d785ffaadd1384cb61c0852578c4f4268 (patch) | |
tree | b663701cfa39bfa58138d5660acabe76c7c1b509 /main/git | |
parent | a9887b16e8e1dd4a5c827cf5ebf828e41a5939a4 (diff) | |
download | aports-22e9223d785ffaadd1384cb61c0852578c4f4268.tar.bz2 aports-22e9223d785ffaadd1384cb61c0852578c4f4268.tar.xz |
main/git: modernize, respect CFLAGS
Diffstat (limited to 'main/git')
-rw-r--r-- | main/git/APKBUILD | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/main/git/APKBUILD b/main/git/APKBUILD index 62bdb69db8..a5a51889dd 100644 --- a/main/git/APKBUILD +++ b/main/git/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=git pkgver=2.14.0 -pkgrel=0 +pkgrel=1 pkgdesc="A distributed version control system" url="https://www.git-scm.com/" arch="all" @@ -37,35 +37,41 @@ source="https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz git-daemon.confd " -_makeopts=" - NO_GETTEXT=YesPlease - NO_NSEC=YesPlease - NO_SVN_TESTS=YesPlease - NO_REGEX=YesPlease - USE_LIBPCRE2=YesPlease" - _gitcoredir=/usr/libexec/git-core -_builddir="$srcdir"/$pkgname-$pkgver +builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + default_prepare + cat >> config.mak <<-EOF + NO_GETTEXT=YesPlease + NO_SVN_TESTS=YesPlease + NO_REGEX=YesPlease + USE_LIBPCRE2=YesPlease + NO_NSEC=YesPlease + NO_SYS_POLL_H=1 + CFLAGS=$CFLAGS + EOF +} build() { - cd "$_builddir" - make -j1 prefix=/usr DESTDIR="$pkgdir" $_makeopts perl/perl.mak || return 1 - make prefix=/usr DESTDIR="$pkgdir" $_makeopts || return 1 + cd "$builddir" + make -j1 prefix=/usr DESTDIR="$pkgdir" perl/perl.mak + make prefix=/usr DESTDIR="$pkgdir" } package() { - cd "$_builddir" + cd "$builddir" make -j1 prefix=/usr \ DESTDIR="$pkgdir" \ INSTALLDIRS=vendor \ - $_makeopts install || return 1 + install mkdir -p "$pkgdir"/var/git install -Dm755 "$srcdir"/git-daemon.initd \ - "$pkgdir"/etc/init.d/git-daemon || return 1 + "$pkgdir"/etc/init.d/git-daemon install -Dm644 "$srcdir"/git-daemon.confd \ - "$pkgdir"/etc/conf.d/git-daemon || return 1 + "$pkgdir"/etc/conf.d/git-daemon - make prefix=/usr DESTDIR="$pkgdir" install-man || return 1 + make prefix=/usr DESTDIR="$pkgdir" install-man } _perl_git_svn() { @@ -84,8 +90,8 @@ _perl_git() { eval local `perl -V:vendorlib` eval local `perl -V:vendorarch` for i in $vendorlib $vendorarch; do - mkdir -p "$subpkgdir"/${i%/*} || return 1 - mv "$pkgdir"/$i "$subpkgdir"/$i || return 1 + mkdir -p "$subpkgdir"/${i%/*} + mv "$pkgdir"/$i "$subpkgdir"/$i done } @@ -116,9 +122,9 @@ cvs() { depends="perl perl-git=$pkgver-r$pkgrel cvs perl-dbd-sqlite" replaces="git-perl" mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/$_gitcoredir - mv "$pkgdir"/usr/bin/git-cvs* "$subpkgdir"/usr/bin/ || return 1 + mv "$pkgdir"/usr/bin/git-cvs* "$subpkgdir"/usr/bin/ mv "$pkgdir"/$_gitcoredir/*cvs* "$subpkgdir"/$_gitcoredir \ - || return 1 + } _fast_import() { @@ -133,9 +139,9 @@ p4() { depends="git=$pkgver-r$pkgrel git-fast-import=$pkgver-r$pkgrel" replaces="git" mkdir -p "$subpkgdir"/$_gitcoredir/mergetools - mv "$pkgdir"/$_gitcoredir/*p4* "$subpkgdir"/$_gitcoredir/ || return 1 + mv "$pkgdir"/$_gitcoredir/*p4* "$subpkgdir"/$_gitcoredir/ mv "$pkgdir"/$_gitcoredir/mergetools/*p4* \ - "$subpkgdir"/$_gitcoredir/mergetools/ || return 1 + "$subpkgdir"/$_gitcoredir/mergetools/ } daemon() { @@ -147,8 +153,8 @@ daemon() { "$pkgdir"/$_gitcoredir/git-http-backend \ "$pkgdir"/$_gitcoredir/git-shell \ "$subpkgdir"/$_gitcoredir \ - || return 1 - mv "$pkgdir"/etc "$subpkgdir"/ || return 1 + + mv "$pkgdir"/etc "$subpkgdir"/ } gitweb() { @@ -166,7 +172,7 @@ completion() { replaces="" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" - install -Dm644 "$_builddir"/contrib/completion/git-completion.bash \ + install -Dm644 "$builddir"/contrib/completion/git-completion.bash \ "$subpkgdir"/usr/share/bash-completion/completions/git } @@ -175,8 +181,8 @@ subtree() { pkgdesc="Split git repository into subtrees" replaces="" - cd "$_builddir"/contrib/subtree - make prefix=/usr DESTDIR="$pkgdir" || return 1 + cd "$builddir"/contrib/subtree + make prefix=/usr DESTDIR="$pkgdir" make install prefix=/usr DESTDIR="$subpkgdir" } @@ -185,8 +191,8 @@ subtree_doc() { pkgdesc="Split git repository into subtrees (documentation)" replaces="" - cd "$_builddir"/contrib/subtree - make install-man prefix=/usr DESTDIR="$subpkgdir" || return 1 + cd "$builddir"/contrib/subtree + make install-man prefix=/usr DESTDIR="$subpkgdir" gzip -9 "$subpkgdir"/usr/share/man/man1/git-subtree.1 } |