# Contributor: stonecrest <stonecrestATgmailDOTcom>
pkgname=mingetty
pkgver=1.08
pkgrel=2
pkgdesc="Designed to be a minimal getty and allows automatic logins."
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/mingetty"
license=('GPL')
depends=('glibc')
makedepends=('gcc' 'make')
provides=('mingetty')
conflicts=('mingetty')
md5sums=('2a75ad6487ff271424ffc00a64420990'
         'b1bcb0668c34d4981e3acddc3990dfdb')
source=(http://downloads.sourceforge.net/sourceforge/mingetty/$pkgname-$pkgver.tar.gz
		mingetty-utf8.patch)

build() {
	patch $startdir/src/$pkgname-$pkgver/mingetty.c mingetty-utf8.patch || return 1

	mkdir -p $startdir/pkg/sbin || return 1
	mkdir -p $startdir/pkg/usr/man/man8 || return 1
	
	cd $startdir/src || return 1
	cd $startdir/src/$pkgname-$pkgver || return 1
	
	LDFLAGS="-s" make || return 1
	install -m 0755 mingetty $startdir/pkg/sbin || return 1
	install -m 0644 mingetty.8 $startdir/pkg/usr/man/man8 || return 1
}