forked from markllama/powerusb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpowerusb.spec
44 lines (34 loc) · 1 KB
/
powerusb.spec
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
41
42
43
44
Summary: Control PowerUSB power strips
Name: python-powerusb
Version: 1.5
Release: 1
Source0: %{name}-%{version}.tar.gz
License: Apache License 2.0
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Mark Lamourine <markllama@gmail.com>
Url: http://github.com/markllama/powerusb
Requires: python-lxml
Requires: pyusb
%description
Library and CLI tools to Control PowerUSB power strips.
This version only controls Basic power strips. Watchdog, IO and Smart
features TBD.
%prep
%setup -n %{name}-%{version}
%build
python setup.py build
%install
python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
cp 99-powerusb.rules $RPM_BUILD_ROOT/lib/udev/rules.d
%clean
rm -rf $RPM_BUILD_ROOT
%post
# Create a group which will be given permission to manage the strips
groupadd --system powerusb
%files -f INSTALLED_FILES
%defattr(-,root,root)
/lib/udev/rules.d/99-powerusb.rules