diff options
author | haawda | 2017-08-28 23:06:12 +0200 |
---|---|---|
committer | haawda | 2017-08-28 23:06:12 +0200 |
commit | 8067a26c07d685b9701e1a5e225d142ed770cd48 (patch) | |
tree | 20583c45a2f3309f6bea7db955dbe447202453a5 | |
parent | 687f03e3c201066d0f461a6f0d2451cd90693a58 (diff) | |
download | aur-8067a26c07d685b9701e1a5e225d142ed770cd48.tar.gz |
refactor packages
-rw-r--r-- | .SRCINFO | 59 | ||||
-rw-r--r-- | PKGBUILD | 137 |
2 files changed, 123 insertions, 73 deletions
@@ -1,8 +1,6 @@ -# Generated by mksrcinfo v8 -# Sun Jul 23 19:59:06 UTC 2017 pkgbase = notmuch-git pkgver = 0.25_rc1.2.0.gd95ccfe9 - pkgrel = 2 + pkgrel = 3 url = https://notmuchmail.org/ arch = i686 arch = x86_64 @@ -22,22 +20,57 @@ pkgbase = notmuch-git source = git+https://github.com/notmuch/notmuch md5sums = SKIP -pkgname = notmuch-git - pkgdesc = Not much of an email program +pkgname = notmuch-emacs-git + pkgdesc = Not much of an email program -default interface to emacs install = notmuch.install + arch = any depends = notmuch-runtime optdepends = emacs: for using the emacs interface - optdepends = vim: for using the vim interface - optdepends = python2: for using the python2 bindings - optdepends = ruby: for using the ruby bindings optdepends = gnupg: for email encryption provides = notmuch conflicts = notmuch + replaces = notmuch-git + +pkgname = notmuch-runtime-git + pkgdesc = Runtime for notmuch and notmuch-mutt + arch = i686 + arch = x86_64 + depends = xapian-core + depends = gmime + depends = talloc + provides = notmuch-runtime + conflicts = notmuch-runtime + +pkgname = notmuch-python-git + pkgdesc = Python bindings for notmuch + arch = any + depends = notmuch-runtime + optdepends = python: for using the python bindings + provides = notmuch-python + conflicts = notmuch-python + +pkgname = notmuch-python2-git + pkgdesc = Python2 bindings for notmuch + arch = any + depends = notmuch-runtime + optdepends = python2: for using the python2 bindings + provides = notmuch-python2 + conflicts = notmuch-python2 + +pkgname = notmuch-ruby-git + pkgdesc = Ruby bindings for notmuch + arch = i686 + arch = x86_64 + depends = notmuch-runtime + optdepends = ruby: for using the ruby bindings + provides = notmuch-ruby + conflicts = notmuch-ruby pkgname = notmuch-vim-git pkgdesc = Vim plugins for notmuch arch = any - depends = notmuch-runtime-git + depends = notmuch-runtime + optdepends = vim: for using the vim interface provides = notmuch-vim conflicts = notmuch-vim @@ -53,11 +86,3 @@ pkgname = notmuch-mutt-git provides = notmuch-mutt conflicts = notmuch-mutt -pkgname = notmuch-runtime-git - pkgdesc = Runtime for notmuch and notmuch-mutt - depends = xapian-core - depends = gmime - depends = talloc - provides = notmuch-runtime - conflicts = notmuch-runtime - @@ -6,11 +6,11 @@ # Contributor: Richard Murri <admin@richardmurri.com> pkgbase=notmuch-git -_pkgname=notmuch -pkgname=('notmuch-git' 'notmuch-vim-git' 'notmuch-mutt-git' 'notmuch-runtime-git') -pkgver=0.25_rc1.2.0.gd95ccfe9 -pkgrel=2 arch=('i686' 'x86_64') +_pkgbase=notmuch +pkgname=('notmuch-emacs-git' 'notmuch-runtime-git' 'notmuch-python-git' 'notmuch-python2-git' 'notmuch-ruby-git' 'notmuch-vim-git' 'notmuch-mutt-git') +pkgver=0.25_rc1.2.0.gd95ccfe9 +pkgrel=3 url="https://notmuchmail.org/" license=('GPL3') makedepends=('python2' 'python' 'python-sphinx' 'emacs' 'gnupg' 'ruby' 'pkgconfig' 'xapian-core' 'gmime' 'talloc') @@ -19,22 +19,23 @@ source=("git+https://github.com/notmuch/notmuch") md5sums=('SKIP') pkgver() { - cd ${_pkgname} + cd "$_pkgbase" git describe --long --tags|tr - .|cut -c8- } prepare(){ - cp -dpr --no-preserve=ownership "$srcdir/${_pkgname}"/bindings/python{,2} - find "$srcdir/${_pkgname}/bindings/python" -name '*.py' -exec sed -i -e '1s,python$,python3,' {} + - find "$srcdir/${_pkgname}/bindings/python2" -name '*.py' -exec sed -i -e '1s,python$,python2,' {} + + cd "$_pkgbase" + cp -dpr --no-preserve=ownership "$srcdir"/$_pkgbase/bindings/python{,2} + find "$srcdir/${_pkgbase}/bindings/python" -name '*.py' -exec sed -i -e '1s,python$,python3,' {} + + find "$srcdir/${_pkgbase}/bindings/python2" -name '*.py' -exec sed -i -e '1s,python$,python2,' {} + } build() { - cd $_pkgname + cd "$_pkgbase" ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --without-zsh-completion make - make -C "contrib/${_pkgname}-mutt" "${_pkgname}-mutt.1" + make -C "contrib/${_pkgbase}-mutt" "${_pkgbase}-mutt.1" make ruby-bindings @@ -45,63 +46,87 @@ build() { python2 setup.py build } -package_notmuch-runtime-git(){ - pkgdesc="Runtime for notmuch and notmuch-mutt" - depends=('xapian-core' 'gmime' 'talloc') - conflicts=('notmuch-runtime') - provides=('notmuch-runtime') - cd $_pkgname +package_notmuch-emacs-git(){ + arch=('any') + pkgdesc="Not much of an email program -default interface to emacs" + depends=('notmuch-runtime') + optdepends=('emacs: for using the emacs interface' 'gnupg: for email encryption') + conflicts=('notmuch') + provides=('notmuch') + replaces=('notmuch-git') + install=notmuch.install + + cd "$_pkgbase" + make DESTDIR="$pkgdir/" install-emacs + rm "$pkgdir/usr/share/applications/mimeinfo.cache" +} - make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 WITH_EMACS=0 install +package_notmuch-runtime-git(){ + arch=('i686' 'x86_64') + pkgdesc="Runtime for notmuch and notmuch-mutt" + depends=('xapian-core' 'gmime' 'talloc') + conflicts=('notmuch-runtime') + provides=('notmuch-runtime') + cd "$_pkgbase" + + make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 WITH_EMACS=0 install + + # install manpages + make DESTDIR="$pkgdir" prefix="/usr" install-man + + # install binary + install -Dm755 notmuch "$pkgdir/usr/bin/notmuch" - install -Dm755 notmuch "$pkgdir/usr/bin/notmuch" - rm -rf "$pkgdir/usr/share" + # remove stuff that goes into the other packages + rm -rf "$pkgdir/usr/share/emacs" } - package_notmuch-vim-git(){ arch=('any') pkgdesc="Vim plugins for notmuch" - depends=('notmuch-runtime-git') + depends=('notmuch-runtime') + optdepends=('vim: for using the vim interface') conflicts=('notmuch-vim') - provides=('notmuch-vim') + provides=('notmuch-vim') - make -C ${_pkgname}/vim DESTDIR="$pkgdir" prefix="/usr/share/vim/vimfiles" install + make -C "$_pkgbase"/vim DESTDIR="$pkgdir" prefix="/usr/share/vim/vimfiles" install } -package_notmuch-git(){ - pkgdesc="Not much of an email program" - depends=('notmuch-runtime') - optdepends=('emacs: for using the emacs interface' - 'vim: for using the vim interface' - 'python2: for using the python2 bindings' - 'ruby: for using the ruby bindings' - 'gnupg: for email encryption') - conflicts=('notmuch') - provides=('notmuch') - - install=notmuch.install - - cd $_pkgname +package_notmuch-python-git(){ + arch=('any') + depends=('notmuch-runtime') + pkgdesc="Python bindings for notmuch" + optdepends=('python: for using the python bindings') + conflicts=('notmuch-python') + provides=('notmuch-python') - # Install emacs parts - make DESTDIR="$pkgdir/" install-emacs - - # Install manpages - make DESTDIR="$pkgdir" prefix="/usr" install-man + cd "$_pkgbase"/bindings/python + python setup.py install --prefix=/usr --root="$pkgdir" +} - # Install ruby bindings - sed -i 's:INSTALL = .*[^D]$:& -D:' bindings/ruby/Makefile - install -d $pkgdir/usr/lib/ruby/vendor_ruby/2.4.0/x86_64-linux - make -C bindings/ruby exec_prefix=$pkgdir/usr prefix=/usr install +package_notmuch-python2-git(){ + arch=('any') + depends=('notmuch-runtime') + pkgdesc="Python2 bindings for notmuch" + optdepends=('python2: for using the python2 bindings') + conflicts=('notmuch-python2') + provides=('notmuch-python2') + cd "$_pkgbase"/bindings/python2 + python2 setup.py install --prefix=/usr --root="$pkgdir" +} - # Install python bindings - cd bindings/python - python setup.py install --prefix=/usr --root="$pkgdir" - cd - - cd bindings/python2 - python2 setup.py install --prefix=/usr --root="$pkgdir" - rm "$pkgdir"/usr/share/applications/mimeinfo.cache +package_notmuch-ruby-git(){ + arch=('i686' 'x86_64') + depends=('notmuch-runtime') + pkgdesc="Ruby bindings for notmuch" + optdepends=('ruby: for using the ruby bindings') + conflicts=('notmuch-ruby') + provides=('notmuch-ruby') + + cd $_pkgbase + sed -i 's:INSTALL = .*[^D]$:& -D:' bindings/ruby/Makefile + install -d $pkgdir/usr/lib/ruby/vendor_ruby/2.4.0/x86_64-linux + make -C bindings/ruby exec_prefix=$pkgdir/usr prefix=/usr install } package_notmuch-mutt-git(){ @@ -111,8 +136,8 @@ package_notmuch-mutt-git(){ conflicts=('notmuch-mutt') provides=('notmuch-mutt') - cd ${_pkgname} + cd "$_pkgbase" - install -Dm755 "contrib/${_pkgname}-mutt/${_pkgname}-mutt" "$pkgdir/usr/bin/${_pkgname}-mutt" - install -Dm644 "contrib/${_pkgname}-mutt/${_pkgname}-mutt.1" "${pkgdir}/usr/share/man/man1/${_pkgname}-mutt.1" + install -Dm755 "contrib/${_pkgbase}-mutt/${_pkgbase}-mutt" "$pkgdir/usr/bin/${_pkgbase}-mutt" + install -Dm644 "contrib/${_pkgbase}-mutt/${_pkgbase}-mutt.1" "${pkgdir}/usr/share/man/man1/${_pkgbase}-mutt.1" } |