You are not logged in.

#1 2013-05-25 13:37:55

bfrank
Member
Registered: 2013-05-25
Posts: 2

first PKGBUILD: muttvcardsearch

Hey,

I created a PKGBUILD for a small mutt tool: muttvcardsearch. It enables your mutt to search carddav servers for email addresses.
Here is the PKGBUILD, any feedback is welcome.

edit: incorporated Scimmia's suggestions.

# Maintainer: Benjamin Frank <ben+aur@pipsfrank.de>

pkgname=muttvcardsearch
pkgver=1.5
pkgrel=1
pkgdesc="A small mutt carddav search utility."
arch=('i686' 'x86_64')
url="https://github.com/tfl/muttvcardsearch"
license=('GPL')
depends=('curl' 'sqlite3')
makedepends=('cmake')
provides=(muttvcardsearch)
source=("https://github.com/tfl/muttvcardsearch/archive/v${pkgver}.tar.gz")
sha1sums=('1fee29ba15a61549a268b784e42b1b7a31d2ad11')

build() {
  cd "$pkgname-$pkgver"
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="${pkgdir}/" install
  install -Dm644 manual/muttvcardsearch.man ${pkgdir}/usr/share/man/man8/muttvcardsearch.8
}

Last edited by bfrank (2013-05-25 15:45:07)

Offline

#2 2013-05-25 13:58:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: first PKGBUILD: muttvcardsearch

Off the top of my head, the only issue I see is gzipping the man page. makepkg takes care of that for you, so you don't need to do that.

I would suggest using the $pkgver variable in the source array, ie source=("https://github.com/tfl/muttvcardsearch/archive/v$pkgver.tar.gz"). This way, you only have to change the version in one place when you update. Notice you need to use double quotes for that instead of single quotes.

Overall, nice job smile

Offline

#3 2013-05-25 14:24:32

bfrank
Member
Registered: 2013-05-25
Posts: 2

Re: first PKGBUILD: muttvcardsearch

Hey Scimmia,

thanks for the feedback. Didn't know about the manpages, but that is a cool feature, nic. Using $pkgver is also a good idea, thanks.

Offline

Board footer

Powered by FluxBB