From 7a65a910b77ad191d69881098c47f9b0c852d92e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 01:33:19 -0700 Subject: Tue Aug 13 01:31:08 PDT 2013 --- community/hwinfo/PKGBUILD | 48 +++++++++++++++++++++++++++++++++++++ community/hwinfo/custom_ioctl.patch | 16 +++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 community/hwinfo/PKGBUILD create mode 100644 community/hwinfo/custom_ioctl.patch (limited to 'community/hwinfo') diff --git a/community/hwinfo/PKGBUILD b/community/hwinfo/PKGBUILD new file mode 100644 index 000000000..11bd4bb06 --- /dev/null +++ b/community/hwinfo/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 90497 2013-05-12 23:11:39Z arodseth $ +# Maintainer: Alexander Rødseth +# Contributor: Kaiting Chen +# Contributor: Gergely Imreh +# Contributor: champus +# Contributor: madeye +# Contributor: Ranguvar +# Contributor: ninja_pt + +pkgname=hwinfo +pkgver=20.1 +_subver=3.10 +pkgrel=2 +pkgdesc='Hardware detection tool from openSUSE' +arch=('x86_64' 'i686') +url='http://download.opensuse.org/source/factory/repo/oss/suse/src/' +license=('GPL2') +depends=('perl' 'libx86emu') +makedepends=('sysfsutils' 'rpmextract' 'flex') +source=("http://download.opensuse.org/source/factory/repo/oss/suse/src/$pkgname-$pkgver-$_subver.src.rpm" + 'custom_ioctl.patch') +sha256sums=('b0e2e51b4dd754071fb40843deaaafb0755388de5335b1d2c4c081d0f6393841' + '6e83b50aa34f31db5fe6de938402e7c4dda6ffa9ffe1346c076e4779018fcf1d') + +prepare() { + cd "$srcdir" + + rpmextract.sh "$pkgname-$pkgver-$_subver.src.rpm" + tar jxf $pkgname-$pkgver.tar.bz2 + cd "$pkgname-$pkgver" + patch -p0 -i ../custom_ioctl.patch +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + + make -j1 CFLAGS+="-fPIC -I$srcdir/$pkgname-$pkgver/src/hd" LIBDIR=/usr/lib +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make LIBDIR=/usr/lib DESTDIR="$pkgdir" install + mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin" + rmdir "$pkgdir/sbin" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/hwinfo/custom_ioctl.patch b/community/hwinfo/custom_ioctl.patch new file mode 100644 index 000000000..b9dd67161 --- /dev/null +++ b/community/hwinfo/custom_ioctl.patch @@ -0,0 +1,16 @@ +--- src/hd/kbd.c.old 2010-03-15 23:37:52.000000000 +0800 ++++ src/hd/kbd.c 2010-03-22 10:50:58.000000000 +0800 +@@ -146,11 +146,13 @@ + } + + if(!dev && (fd = open(DEV_CONSOLE, O_RDWR | O_NONBLOCK | O_NOCTTY)) >= 0) { ++ /* Removing since TIOCGDEV is not supported by the mainline kernel + if(ioctl(fd, TIOCGDEV, &u) != -1) { + tty_major = (u >> 8) & 0xfff; + tty_minor = (u & 0xff) | ((u >> 12) & 0xfff00); + ADD2LOG(DEV_CONSOLE ": major %u, minor %u\n", tty_major, tty_minor); + } ++ */ + + if (0) + ; -- cgit v1.2.3-54-g00ecf