# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=rcs
pkgver=5.10.0
pkgrel=2
pkgdesc='Revision Control System: manages multiple revisions of files'
url='https://www.gnu.org/software/rcs/'
license=('GPL3')
arch=('i686' 'x86_64')
makedepends=('groff' 'ed')
source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"
        rcs-5.10.0-msysize.patch)
sha256sums=('3a0d9f958c7ad303e475e8634654974edbe6deb3a454491f3857dc1889bac5c5'
            '05267a2dd4a3cc47815db9df98c36e476680374d3680f20cb000451ae7f1702c')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ${srcdir}/rcs-5.10.0-msysize.patch

  autoreconf -fi
}

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

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

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