LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File openant.spec of Package openant (Project home:tgoettlicher)

Name:           openant
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  libusb-compat-devel
BuildRequires:  udev
Requires:       udev
Requires:       pyusb
BuildRequires:  pyusb
Version:        0.3
Release:        0
Summary:        ANT and ANT-FS Python Library 
License:        MIT
Group:          System/Libraries
Url:            https://github.com/Tigge/openant
Source0:        %{name}.tar
Patch0:         skip_udev_install.patch
BuildArch:      noarch

python library to download and upload files from ANT-FS compliant devices (Garmin products).

tar xf ../SOURCES/openant.tar
%patch0 -p0

cd openant
python setup.py build

cd openant
python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT



if [ ! -e /etc/udev/rules.d/ant-usb-sticks.rules  ]; then
  mkdir -p /etc/udev/rules.d
  touch /etc/udev/rules.d/ant-usb-sticks.rules
  echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="0666", SYMLINK+="ttyANT2", ACTION=="add"' >> /etc/udev/rules.d/ant-usb-sticks.rules
  echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1009", MODE="0666", SYMLINK+="ttyANT3", ACTION=="add"' >> /etc/udev/rules.d/ant-usb-sticks.rules
udevadm control --reload-rules || true
udevadm trigger --subsystem-match=usb --attr-match=idVendor=0fcf --action=add || true

#rm /etc/udev/rules.d/ant-usb-sticks.rules