blob: e49d8a670519ecf5de0e9b86e284e53ff864d16e [file] [log] [blame]
Jakub Ružičkac82b4212021-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} \
Michal Vaskoa1fc1852021-10-08 09:42:52 +020043 -DCMAKE_BUILD_TYPE:String="Release" \
Jakub Ružičkac82b4212021-09-27 15:13:10 +020044 -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
45 -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
46 ..
47make
48
Jakub Ružičkac82b4212021-09-27 15:13:10 +020049%install
50cd build
51make DESTDIR=%{buildroot} install
52
53%files
54%license LICENSE
55%{_libdir}/libyang.so.2
56%{_libdir}/libyang.so.2.*
57
58%files tools
59%{_bindir}/yanglint
60%{_bindir}/yangre
61%{_datadir}/man/man1/yanglint.1.gz
Jakub Ružičkab6a86a42021-09-27 15:15:26 +020062%{_datadir}/man/man1/yangre.1.gz
Jakub Ružičkac82b4212021-09-27 15:13:10 +020063
64%files devel
65%{_libdir}/libyang.so
66%{_libdir}/pkgconfig/libyang.pc
67%{_includedir}/libyang/*.h
68%dir %{_includedir}/libyang/
69
70%changelog
71* Fri Aug 06 2021 Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
72- upstream package