summaryrefslogtreecommitdiff
path: root/packaging/lthor.spec
blob: b1daab135f149b72b70922102f9df6cf2f08967f (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
52
53
54
55
56
57
58
59
60
#
# spec file for cats-core
#
Name:          lthor
Summary:       Flashing tool for Tizen lunchbox
Version:       3.1
Release:       1
Group:         Development/Tools/Other
License:       Apache
URL:           http://download.tizen.org/tools/latest-release/
Source0:       %{name}_%{version}.tar.gz

BuildRequires:  libusb-devel
BuildRequires:  libarchive-devel
BuildRequires:  cmake
BuildRequires:  pkg-config

Requires: udev

%description
Tool for downloading binaries from a Linux host PC to a target phone.
It uses a USB cable as a physical communication medium.
It is prerequisite that the boot-loader should support download protocol
which is compatible with 'lthor'.

%prep 
%setup -q

%build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf %{buildroot}

%post
if [ -x /sbin/udevadm ] ; then
    alias udevcontrol="udevadm control"
fi
udevcontrol reload_rules ||:

%postun
if [ -x /sbin/udevadm ] ; then
    alias udevcontrol="udevadm control"
fi
udevcontrol --reload-rules ||:

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%{_bindir}/%{name}
%config %{_sysconfdir}/udev/rules.d/*.rules

%changelog