Jakub Ružička | c82b421 | 2021-09-27 15:13:10 +0200 | [diff] [blame] | 1 | Name: libyang |
| 2 | Version: {{ version }} |
| 3 | Release: {{ release }}%{?dist} |
| 4 | Summary: YANG data modeling language library |
| 5 | Url: https://github.com/CESNET/libyang |
| 6 | Source: libyang-%{version}.tar.gz |
| 7 | License: BSD |
| 8 | |
| 9 | BuildRequires: cmake |
| 10 | BuildRequires: gcc |
| 11 | BuildRequires: make |
| 12 | BuildRequires: pkgconfig(libpcre2-8) >= 10.21 |
| 13 | |
| 14 | %package devel |
| 15 | Summary: Development files for libyang |
| 16 | Requires: %{name}%{?_isa} = %{version}-%{release} |
| 17 | Requires: pcre2-devel |
| 18 | |
| 19 | %package tools |
| 20 | Summary: YANG validator tools |
| 21 | Requires: %{name}%{?_isa} = %{version}-%{release} |
| 22 | # This was not properly split out before |
| 23 | Conflicts: %{name} < 1.0.225-3 |
| 24 | |
| 25 | %description devel |
| 26 | Headers of libyang library. |
| 27 | |
| 28 | %description tools |
| 29 | YANG validator tools. |
| 30 | |
| 31 | %description |
| 32 | Libyang is YANG data modeling language parser and toolkit |
| 33 | written (and providing API) in C. |
| 34 | |
| 35 | %prep |
| 36 | %autosetup -p1 |
| 37 | mkdir build |
| 38 | |
| 39 | %build |
| 40 | cd build |
| 41 | cmake \ |
| 42 | -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ |
Michal Vasko | a1fc185 | 2021-10-08 09:42:52 +0200 | [diff] [blame] | 43 | -DCMAKE_BUILD_TYPE:String="Release" \ |
Jakub Ružička | c82b421 | 2021-09-27 15:13:10 +0200 | [diff] [blame] | 44 | -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ |
| 45 | -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ |
| 46 | .. |
| 47 | make |
| 48 | |
Jakub Ružička | c82b421 | 2021-09-27 15:13:10 +0200 | [diff] [blame] | 49 | %install |
| 50 | cd build |
| 51 | make 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čka | b6a86a4 | 2021-09-27 15:15:26 +0200 | [diff] [blame] | 62 | %{_datadir}/man/man1/yangre.1.gz |
Jakub Ružička | c82b421 | 2021-09-27 15:13:10 +0200 | [diff] [blame] | 63 | |
| 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 |