summaryrefslogtreecommitdiff
path: root/community/lomoco/PKGBUILD
blob: a5916c2f003909eb17cd3a695c26a1badabaf1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 67826 2012-03-14 16:31:38Z spupykin $
# Maintainer: Jeff Mickey <j@codemac.net>
# Contributor: Shadowhand <woody.gilk@gmail.com>

pkgname=lomoco
pkgver=1.0
pkgrel=7
url="http://www.lomoco.org/"
pkgdesc="Logitech USB mouse configuration program"
license=('GPL')
depends=('libusb-compat')
replaces=('lmctl')
arch=('i686' 'x86_64')
options=(!libtool)
backup=(etc/udev/lomoco_mouse.conf)
source=(http://www.lomoco.org/${pkgname}-${pkgver}.tar.gz
	"lomoco_mx518.patch::https://bugs.archlinux.org/task/28180?getfile=8163"
	lomoco_mouse.conf
	lomoco.sh)
md5sums=('f5197d0a3ee81229c3eecc1e03f7b08d'
         '87aeccb99413faf9e49453215c3d0b8a'
         '182b10a7e4a1828a93c1d55ef7f81b97'
         'bc92f661641265b33b27895ef24028fd')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -p1 <$srcdir/lomoco_mx518.patch
  ./autogen.sh --prefix=/usr --mandir=/usr/share/man
  make
  make udev-rules
  make DESTDIR=${pkgdir} install

  # Fix and install udev rules and helpers
  sed -i 's|/etc/sysconfig/logitech_mouse|/etc/udev/lomoco_mouse.conf|g' udev/udev.lomoco
  sed -i 's|RUN="lomoco"|RUN+="lomoco.sh"|g' udev/lomoco.rules
  sed -i 's|SYSFS|ATTR|' udev/lomoco.rules
  install -D -m 644 udev/lomoco.rules ${pkgdir}/etc/udev/rules.d/80-lomoco.rules
  install -D -m 755 ../lomoco.sh ${pkgdir}/lib/udev/lomoco.sh
  install -D -m 644 ../lomoco_mouse.conf ${pkgdir}/etc/udev/
}