1 pkgname=("firmware-tools")
4 pkgdesc="Scripts and tools to manage firmware and BIOS updates"
6 url="http://linux.dell.com/repo/firmware/"
8 depends=('python2' 'python2-libgnome' 'rpm')
9 makedepends=('make' 'gawk')
11 source=(http://linux.dell.com/libsmbios/download/firmware-tools/firmware-tools-${pkgver}/firmware-tools-${pkgver}.tar.bz2)
12 md5sums=("aac1dd05d28b41c37359a771ce3453b8")
14 provides=('firmware-tools')
16 #grep '\..-' will work with any locale
17 PYTHON3VER=$(pacman -Qi python | grep '\..-' | sed -e 's/^.*: //' -e 's/-.*$//g' | awk -F '.' '{print $1"."$2}')
18 PYTHON2VER=$(pacman -Qi python2 | grep '\..-' | sed -e 's/^.*: //' -e 's/-.*$//g' | awk -F '.' '{print $1"."$2}')
22 cd "$srcdir/${pkgname}-${pkgver}"
23 ./configure --prefix=/usr --sysconfdir=/etc
24 #UGLY HACK - Python 3 to Python 2
25 sed -i -e 's/^PYTHON.=.*$/PYTHON = \/usr\/bin\/python2/' -e "s/${PYTHON3VER}/${PYTHON2VER}/g" Makefile
30 cd "$srcdir/${pkgname}-${pkgver}"
31 make DESTDIR="$pkgdir/" install
32 for i in $pkgdir/usr/sbin/*
34 sed -i 's/^.*\/usr\/bin\/python.*$/#!\/usr\/bin\/python2/' $i
37 ln -s firmwaretool inventory_firmware
38 ln -s firmwaretool bootstrap_firmware
39 ln -s firmwaretool update_firmware