# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Alessandro Sagratini

pkgname=inotify-tools
pkgver=3.21.9.5
pkgrel=1
pkgdesc="inotify-tools is a C library and a set of command-line programs for Linux providing a simple interface to inotify."
arch=('x86_64')
url="https://github.com/rvoicilas/inotify-tools"
license=('GPL')
depends=()
makedepends=('gcc' 'make' 'doxygen')
options=('docs')
source=($pkgname-$pkgver.tar.gz::https://github.com/rvoicilas/inotify-tools/archive/$pkgver.tar.gz)
sha256sums=('fee64502f63d5a6bc2cb8ac0e5613a008bc4a6c9dc6c8bbc77290029f2e502b1')

prepare() {
  cd "$srcdir"/$pkgname-$pkgver
  sed -i 's|-Werror||g' src/Makefile.*
}

build() {
  cd "$srcdir"/$pkgname-$pkgver
  ./autogen.sh
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
