From b1840de9e26e038b1698c1656dd42125467c6e56 Mon Sep 17 00:00:00 2001 From: Ray Kohler Date: Sun, 21 Aug 2011 19:19:39 -0400 Subject: [PATCH] Add monthly cron job to run update-pciids and conf.d file to disable it. --- PKGBUILD | 16 +++++++++++++--- pciutils.conf.d | 3 +++ pciutils.cron.monthly | 7 +++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 pciutils.conf.d create mode 100755 pciutils.cron.monthly diff --git a/PKGBUILD b/PKGBUILD index 91c1216..e69fee2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Tobias Powalowski pkgname=pciutils pkgver=3.1.7 -pkgrel=4 +pkgrel=5 pkgdesc="PCI bus configuration space access library and tools" arch=(i686 x86_64) license=('GPL2') @@ -11,8 +11,13 @@ url="http://mj.ucw.cz/pciutils.html" optdepends=('sh: required by update-pciids') makedepends=('wget') depends=('glibc') -source=(ftp://ftp.kernel.org/pub/software/utils/${pkgname}/${pkgname}-${pkgver}.tar.bz2) -md5sums=('35222edb86b50a6641352c66fe829b2e') +backup=(etc/conf.d/pciutils) +source=(ftp://ftp.kernel.org/pub/software/utils/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + pciutils.conf.d + pciutils.cron.monthly) +md5sums=('35222edb86b50a6641352c66fe829b2e' + '3340e474d08376124b98a49096bfd4e6' + '9ba423752416d037077dac66b7e9ac64') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -26,5 +31,10 @@ build() { package() { cd "${srcdir}/${pkgname}-${pkgver}" make SHARED=yes PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man DESTDIR="${pkgdir}" install install-lib + install -dm755 "${pkgdir}/usr/lib/" install -m644 "${srcdir}/libpci.a" "${pkgdir}/usr/lib/" + install -dm755 "${pkgdir}/etc/conf.d/" + install -m644 "${srcdir}/pciutils.conf.d" "${pkgdir}/etc/conf.d/pciutils" + install -dm755 "${pkgdir}/etc/cron.monthly/" + install -m755 "${srcdir}/pciutils.cron.monthly" "${pkgdir}/etc/cron.monthly/pciutils" } diff --git a/pciutils.conf.d b/pciutils.conf.d new file mode 100644 index 0000000..7aa6a82 --- /dev/null +++ b/pciutils.conf.d @@ -0,0 +1,3 @@ +# Settings for the pciutils package +# CRON_PCI_IDS= : whether to enable the cron job that updates pci.ids +CRON_PCI_IDS=1 diff --git a/pciutils.cron.monthly b/pciutils.cron.monthly new file mode 100755 index 0000000..6341f5a --- /dev/null +++ b/pciutils.cron.monthly @@ -0,0 +1,7 @@ +#!/bin/bash + +. /etc/conf.d/pciutils + +if (( $CRON_PCI_IDS )); then + /usr/sbin/update-pciids -q +fi -- 1.7.6