summaryrefslogtreecommitdiff
path: root/packaging/sd-mux-ctrl.spec
blob: 7e9dd92b4d1cfdabb3c1cc08584cf8d50ecfb04b (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
41
42
43
44
45
46
47
48
49
50
51
%define rc_version 0

%if 0%{?rc_version}
%define release_prefix 0.rc%{rc_version}.
%endif

Name:           sd-mux-ctrl
Summary:        Control software for sd-mux devices.
Version:        0.0.1
Release:        %{?release_prefix}%{?opensuse_bs:<CI_CNT>.<B_CNT>}%{!?opensuse_bs:0}
Group:          Development/Tools
License:        Apache-2.0
URL:            http://www.tizen.org
Source0:        %{name}_%{version}.tar.gz
BuildRequires:  cmake
Requires:       libftdi >= 1.2
Requires:       popt
Requires:       awk

BuildRoot:  %{_tmppath}/%{name}_%{version}-build

%description
Tool for controlling multiple sd-mux devices.
 This tool allows:
  to connect SD card to DUT (Device Under Test) or to TS (Test Server)
  to connect one USB port to DUT or TS
  to power off or on DUT
  to reset DUT through power disconnecting and reconnecting


%prep
%setup -q -n %{name}-%{version}

%build
cmake -DCMAKE_INSTALL_PREFIX=/usr
%__make

%install
rm -rf %{buildroot}
%make_install

mkdir -p %{buildroot}/%{_mandir}/man1
install -m644 docs/man/%{name}.1 %{buildroot}/%{_mandir}/man1

install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
install -Dp -m0755 etc/bash_completion.d/%{name} %{buildroot}/%{_sysconfdir}/bash_completion.d/

%files
%{_bindir}/%{name}
%{_mandir}/man1/*
%{_sysconfdir}/bash_completion.d/*