updated arch packaging scripts with official ones

This commit is contained in:
Daniel Pavel 2013-05-26 01:32:46 +03:00
parent db53de2233
commit 8f2ee555ec
2 changed files with 31 additions and 35 deletions

View File

@ -1,26 +1,29 @@
# $Id$
# Maintainer: Patrick Hüther <patrick dot huether at gmail dot com>
# Maintainer: Arnaud Taffanel <dev@taffanel.org>
pkgname=solaar
pkgver=0.8.8.1
pkgrel=1
pkgdesc="Linux devices manager for the Logitech Unifying Receiver"
arch=("any")
url="http://pwr.github.io/Solaar/"
license=('GPL')
depends=(
'systemd' 'python' 'python-pyudev'
)
optdepends=(
'gtk3: required for GUI application'
'gobject-introspection: required for GUI application'
'python-gobject: required for GUI application'
)
pkgdesc="Device manager for Logitech's Unifying receiver peripherals"
url="http://pwr.github.com/Solaar/"
license=('GPL2')
groups=()
arch=('any')
depends=('python' 'python-pyudev' 'python-gobject' 'pygtk')
makedepends=('python')
provides=('solaar')
conflicts=('solaar')
options=(!emptydirs)
install=solaar.install
source=("https://github.com/pwr/Solaar/archive/$pkgver.tar.gz")
md5sums=('6b61313b0b113ffcd38b1d6ffbaf5ba3')
source=("https://github.com/pwr/Solaar/archive/${pkgver}.tar.gz"
'solaar.install')
md5sums=('2fee5353702b32e6958a51c2e603178f'
'2416fcb58a4c24da5bbb94a9207799b4')
package() {
cd "$srcdir/Solaar-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
cd "$srcdir/Solaar-${pkgver}/"
python3 setup.py install --root="$pkgdir/" --optimize=1
install -D -m0644 rules.d/99-logitech-unifying-receiver.rules \
"$pkgdir/etc/udev/rules.d/99-logitech-unifying-receiver.rules"
}
#vim: set ft=PKGBUILD sw=2 ts=2 et
# vim:set ts=2 sw=2 et:

View File

@ -1,17 +1,10 @@
## arg 1: the new package version
post_install() {
echo "Installing udev rules..."
echo "Please make sure the plugdev group exists on your system and your user is a member"
touch "/usr/lib/udev/rules.d/99-logitech-unifying-receiver.rules"
echo 'ACTION=="add", KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GROUP="plugdev", MODE="0660"' > "/usr/lib/udev/rules.d/99-logitech-unifying-receiver.rules"
chmod a+r "/usr/lib/udev/rules.d/99-logitech-unifying-receiver.rules"
echo "Reloading udev rules..."
udevadm control --reload-rules
echo "Done. Now remove the Unfiying Receiver, wait 10 seconds and plug it in again."
}
post_remove() {
echo "Removing udev rules"
rm "/usr/lib/udev/rules.d/99-logitech-unifying-receiver.rules"
udevadm control --reload-rules
pre_install() {
if ! getent group plugdev >/dev/null; then
groupadd --system plugdev
fi
}
post_install() {
udevadm control --reload-rules
echo "To be able to use this application, user must be in the plugdev group."
}
# vim:set ts=2 sw=2 et: