# $Id: PKGBUILD 185562 2013-05-15 07:34:58Z tpowa $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=pcmciautils
pkgver=018
pkgrel=7
pkgdesc="Utilities for inserting and removing PCMCIA cards"
arch=('i686' 'x86_64')
url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
license=('GPL')
groups=('base')
depends=('systemd')
conflicts=('pcmcia-cs')
# source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/${pkgname}-${pkgver}.tar.bz2) broken due to breakin
source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz
        initcpio-install-pcmcia)
options=(!makeflags)

build() {
  cd "$pkgname-$pkgver"
  sed -i -e 's,/lib/udev,/usr/lib/udev,g' Makefile
  sed -i -e 's,/sbin,/usr/bin,g' Makefile
  make
}

package() {
  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install

  # install the mkinitpcio hook
  install -Dm644 initcpio-install-pcmcia "$pkgdir/usr/lib/initcpio/install/pcmcia"
}
md5sums=('964c802994677a71b38ec56554aa229f'
         '041af04025daee5b3b05812ac3896c8f')