blob: 95e0ec3343e6d8e18683a20f29fbfd663348b3d2 [file] [log] [blame]
Jakub Ružička78c1e4d2021-09-27 15:13:10 +02001Name: libyang
2Version: {{ version }}
3Release: {{ release }}%{?dist}
4Summary: YANG data modeling language library
5Url: https://github.com/CESNET/libyang
6Source: libyang-%{version}.tar.gz
7License: BSD
8
9BuildRequires: cmake
10BuildRequires: gcc
11BuildRequires: make
12BuildRequires: pkgconfig(libpcre2-8) >= 10.21
13
14%package devel
15Summary: Development files for libyang
16Requires: %{name}%{?_isa} = %{version}-%{release}
17Requires: pcre2-devel
18
19%package tools
20Summary: YANG validator tools
21Requires: %{name}%{?_isa} = %{version}-%{release}
22# This was not properly split out before
23Conflicts: %{name} < 1.0.225-3
24
25%description devel
26Headers of libyang library.
27
28%description tools
29YANG validator tools.
30
31%description
32Libyang is YANG data modeling language parser and toolkit
33written (and providing API) in C.
34
35%prep
36%autosetup -p1
37mkdir build
38
39%build
40cd build
41cmake \
42 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
43 -DCMAKE_BUILD_TYPE:String="Package" \
44 -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
45 -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
46 ..
47make
48
49%check
50cd build
51ctest --output-on-failure
52
53%install
54cd build
55make DESTDIR=%{buildroot} install
56
57%files
58%license LICENSE
59%{_libdir}/libyang.so.2
60%{_libdir}/libyang.so.2.*
61
62%files tools
63%{_bindir}/yanglint
64%{_bindir}/yangre
65%{_datadir}/man/man1/yanglint.1.gz
Jakub Ružička1f18a2c2021-09-27 15:15:26 +020066%{_datadir}/man/man1/yangre.1.gz
Jakub Ružička78c1e4d2021-09-27 15:13:10 +020067
68%files devel
69%{_libdir}/libyang.so
70%{_libdir}/pkgconfig/libyang.pc
71%{_includedir}/libyang/*.h
72%dir %{_includedir}/libyang/
73
74%changelog
75* Fri Aug 06 2021 Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
76- upstream package