diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-06 10:11:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-06 10:16:35 +0000 |
commit | 43e198d889b922bf63b7826f0efe16b298998eca (patch) | |
tree | 35624428718078d6d4c0495bfe84aee70ae20d72 /main/git | |
parent | 984642a2e499f35b3a87716239746c75fdc3563a (diff) | |
download | aports-43e198d889b922bf63b7826f0efe16b298998eca.tar.bz2 aports-43e198d889b922bf63b7826f0efe16b298998eca.tar.xz |
main/git: split git-email, git-cvs, git-daemon, git-p4, git-gitweb
Refactor the way we split git package
Diffstat (limited to 'main/git')
-rw-r--r-- | main/git/APKBUILD | 127 |
1 files changed, 109 insertions, 18 deletions
diff --git a/main/git/APKBUILD b/main/git/APKBUILD index 8d429a567..18aa1387d 100644 --- a/main/git/APKBUILD +++ b/main/git/APKBUILD @@ -1,14 +1,28 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=git pkgver=1.8.5.1 -pkgrel=2 +pkgrel=3 pkgdesc="A distributed version control system" url="http://git.or.cz/" arch="all" license="GPL2+" depends= replaces="git-perl" -subpackages="$pkgname-doc $pkgname-svn $pkgname-perl $pkgname-bash-completion:completion" + +# note that order matters +subpackages="$pkgname-doc + $pkgname-bash-completion:completion + perl-$pkgname-svn:_perl_git_svn + perl-$pkgname:_perl_git + $pkgname-svn + $pkgname-email + $pkgname-cvs + $pkgname-p4 + $pkgname-daemon + $pkgname-gitweb + $pkgname-perl:_git_perl + " + makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev python-dev pcre-dev asciidoc xmlto" source="http://git-core.googlecode.com/files/git-$pkgver.tar.gz @@ -25,6 +39,8 @@ _makeopts="NO_ICONV=YesPlease NO_SVN_TESTS=YesPlease USE_LIBPCRE=1" +_gitcoredir=/usr/libexec/git-core + prepare() { cd "$srcdir"/$pkgname-$pkgver for i in $source; do @@ -41,7 +57,10 @@ build() { package() { cd "$srcdir"/$pkgname-$pkgver - make prefix=/usr DESTDIR="$pkgdir" $_makeopts install || return 1 + make prefix=/usr \ + DESTDIR="$pkgdir" \ + INSTALLDIRS=vendor \ + $_makeopts install || return 1 mkdir -p "$pkgdir"/var/git install -Dm755 "$srcdir"/git-daemon.initd \ "$pkgdir"/etc/init.d/git-daemon || return 1 @@ -51,30 +70,84 @@ package() { make prefix=/usr DESTDIR="$pkgdir" install-man || return 1 } -perl() { - depends="perl git perl-net-smtp-ssl perl-authen-sasl" - pkgdesc="Perl scripts for git" - arch="noarch" - replaces="" +_perl_git_svn() { + pkgdesc="Perl interface to Git::SVN" + depends="git=$pkgver-r$pkgrel" + replaces="git-perl" + eval local `perl -V:vendorlib` + mkdir -p "$subpkgdir"/$vendorlib/Git + mv "$pkgdir"/$vendorlib/Git/SVN* "$subpkgdir"/$vendorlib/Git/ +} - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/perl* "$subpkgdir"/usr/lib/ - cd "$pkgdir" - find -type f | xargs file --mime-type | grep perl | cut -d: -f1| while read f; do - mkdir -p "$subpkgdir"/${f%/*} - mv "$f" "$subpkgdir"/${f%/*} +_perl_git() { + pkgdesc="Perl interface to Git" + depends="git=$pkgver-r$pkgrel" + replaces="git-perl" + 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 done - find "$subpkgdir" -name perllocal.pod -delete } +email() { + depends="perl perl-git=$pkgver-r$pkgrel perl-net-smtp-ssl + perl-authen-sasl" + pkgdesc="Git tools for sending email" + replaces="git" + mkdir -p "$subpkgdir"/$_gitcoredir + mv "$pkgdir"/$_gitcoredir/*email* "$subpkgdir"/$_gitcoredir +} + + svn() { - depends="perl git git-perl>=1.7.8.4-r1 perl-subversion" + depends="perl perl-git-svn=$pkgver-r$pkgrel perl-subversion + perl-term-reaadkey" pkgdesc="Subversion support for git" arch="noarch" replaces="" - mkdir -p "$subpkgdir"/usr/libexec/git-core - mv "$pkgdir"/usr/libexec/git-core/git-svn "$subpkgdir"/usr/libexec/git-core + mkdir -p "$subpkgdir"/$_gitcoredir + mv "$pkgdir"/$_gitcoredir/git-svn "$subpkgdir"/$_gitcoredir/ +} + +cvs() { + pkgdesc="Git tools for importing CVS repositories" + 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"/$_gitcoredir/*cvs* "$subpkgdir"/$_gitcoredir \ + || return 1 +} + +p4() { + pkgdesc="Git tools for working with Perforce depots" + depends="git=$pkgver-r$pkgrel" + replaces="git" + mkdir -p "$subpkgdir"/$_gitcoredir/mergetools + mv "$pkgdir"/$_gitcoredir/*p4* "$subpkgdir"/$_gitcoredir/ || return 1 + mv "$pkgdir"/$_gitcoredir/mergetools/*p4* \ + "$subpkgdir"/$_gitcoredir/mergetools/ || return 1 +} + +daemon() { + pkgdesc="Git protocol daemon" + depends="git=$pkgver-r$pkgrel" + replaces="git" + mkdir -p "$subpkgdir"/$_gitcoredir + mv "$pkgdir"/$_gitcoredir/git-daemon "$subpkgdir"/$_gitcoredir \ + || return 1 + mv "$pkgdir"/etc "$subpkgdir"/ || return 1 +} + +gitweb() { + pkgdesc="Simple web interface to git repositories" + depends="git=$pkgver-r$pkgrel perl" + replaces="git" + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/gitweb "$subpkgdir"/usr/share/ } completion() { @@ -87,6 +160,24 @@ completion() { "$subpkgdir"/usr/share/bash-completion/completions/git } +# catch-the-rest of stuff that needs perl +_git_perl() { + depends="git=$pkgver-r$pkgrel perl" + pkgdesc="Additional Git commands that requires perl" + arch="noarch" + replaces="" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/perl* "$subpkgdir"/usr/lib/ + cd "$pkgdir" + find -type f | xargs file --mime-type | grep perl | cut -d: -f1| while read f; do + mkdir -p "$subpkgdir"/${f%/*} + mv "$f" "$subpkgdir"/${f%/*} + done + find "$subpkgdir" -name perllocal.pod -delete +} + + md5sums="7b9d622c98482aeb4532500231626210 git-1.8.5.1.tar.gz 178d2d10f9740fac4a8af0155368b3d9 0001-config-add-_cb-suffix-to-callback-functions.patch e63a201556c4f089de790805c09a2e5b bb-tar.patch |