#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=ndisgtk
pkgver=0.8.5
pkgrel=1gv
source=("http://launchpad.net/ndisgtk/0.8/0.8.5/+download/ndisgtk-0.8.5.tar.gz" "ndisgtk")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=https://launchpad.net/ndisgtk


slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"ndisgtk (frontend to install ndis drivers)"
"With ndisgtk you can easily install an NDIS driver for your WIFI card"
"when it is not supported natively in the Linux kernel. The"
"ndiswrapper module must be loaded before you can proceed."
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	sed 's/nm-connection-editor/wicd-client","--no-tray/' -i ndisgtk
        sed 's/Windows/Ndiswrapper/' -i ndisgtk.desktop.in
        sed 's/Windows/Ndiswrapper/' -i ndisgtk-kde.desktop.in
        sed 's/.png//' -i ndisgtk.desktop.in
        sed 's/.png//' -i ndisgtk-kde.desktop.in
	sed 's/Settings;//' -i ndisgtk.desktop.in
	sed 's/Settings;//' -i ndisgtk-kde.desktop.in
        sed 's/Windows/Ndiswrapper/' -i ndisgtk.glade
        sed 's/Windows/Ndiswrapper/' -i po/ndisgtk.pot
        sed 's/Windows/Ndiswrapper/' -i po/*po

	make || return 1
	make install DESTDIR=$startdir/pkg
	
	mkdir -p $startdir/pkg/usr/libexec
	mv $startdir/pkg/usr/sbin/ndisgtk $startdir/pkg/usr/libexec/
	cp $startdir/src/ndisgtk $startdir/pkg/usr/sbin
	chmod 755 $startdir/pkg/usr/sbin/ndisgtk
	chown root:root $startdir/pkg/usr/sbin/ndisgtk


}