-
Notifications
You must be signed in to change notification settings - Fork 23
/
ultimarc.spec
76 lines (54 loc) · 1.61 KB
/
ultimarc.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%global debug_package %{nil}
%define name ultimarc
%define major 1
%define minor 2
%define release 14
%define version %{major}.%{minor}
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Ultimarc-linux library and command line utility
License: Copyright (C) 2014 - Robert Abram, Katie Snow
URL: https://github.com/katie-snow/Ultimarc-linux
Source0: Ultimarc-linux.tar.xz
BuildRequires: autoconf automake libtool gcc libusb-devel json-c-devel
Requires: libusb json-c
BuildArch: x86_64
%description
Provides Ultimarc-linux library and command line utility for programming Ultimarc devices
%prep
%setup -q -n Ultimarc-linux
libtoolize
aclocal
./autogen.sh
./configure --prefix=/usr --libdir=%{_libdir}
%build
make clean
make
%install
rm -Rf %{buildroot}
%make_install
# udev rule - force /usr/lib/udev path because udev rules always lives there
install -d %{buildroot}/usr/lib/udev/rules.d
install -p 21-ultimarc.rules %{buildroot}/usr/lib/udev/rules.d/
#example json files
install -d %{buildroot}/%{_datarootdir}/ultimarc/examples
install -p -m 644 ./README.* %{buildroot}/%{_datarootdir}/ultimarc/
install -p -m 644 ./src/umtool/*.json %{buildroot}/%{_datarootdir}/ultimarc/examples/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_bindir}/umtool
%{_libdir}/libultimarc.*
/usr/lib/udev/rules.d/21-ultimarc.rules
%{_datarootdir}/ultimarc
%post
udevadm control --reload
%package devel
Requires: ultimarc
Summary: Ultimarc development headers and library files
%description devel
Ultimarc development header file and static library file
%files devel
%{_libdir}/pkgconfig/ultimarc-%{major}.%{minor}.pc
%{_includedir}/ultimarc