PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 1 | Name: @PACKAGE_NAME@ |
| 2 | Version: @LIBYANG_VERSION@ |
| 3 | Release: 0 |
| 4 | Summary: Libyang library |
| 5 | Url: https://github.com/CESNET/libyang |
| 6 | Source: %{url}/archive/@BRANCH@.tar.gz |
| 7 | License: BSD-3-Clause |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 8 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 9 | |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 10 | Requires: pcre |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 11 | BuildRequires: cmake |
| 12 | BuildRequires: doxygen |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 13 | BuildRequires: pcre-devel |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 14 | BuildRequires: valgrind |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 15 | BuildRequires: libcmocka-devel |
PavolVican | 5fd74d9 | 2017-06-08 09:38:39 +0200 | [diff] [blame] | 16 | BuildRequires: gcc |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 17 | |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 18 | Conflicts: @CONFLICT_PACKAGE_NAME@ = @LIBYANG_MAJOR_VERSION@.@LIBYANG_MINOR_VERSION@ |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 19 | |
| 20 | %package devel |
| 21 | Summary: Headers of libyang library |
| 22 | Requires: %{name} = %{version}-%{release} |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 23 | Requires: pcre-devel |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 24 | |
| 25 | %description devel |
| 26 | Headers of libyang library. |
| 27 | |
| 28 | %description |
| 29 | Libyang is YANG data modelling language parser and toolkit written (and providing API) in C. |
| 30 | |
| 31 | %prep |
| 32 | %setup -n libyang-@BRANCH@ |
| 33 | |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 34 | %build |
| 35 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" . |
| 36 | make |
| 37 | |
| 38 | %check |
PavolVican | 93d80d1 | 2017-06-07 15:18:01 +0200 | [diff] [blame] | 39 | ctest --output-on-failure |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 40 | |
| 41 | %install |
| 42 | make DESTDIR=%{buildroot} install |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 43 | |
| 44 | %post -p /sbin/ldconfig |
| 45 | |
| 46 | %postun -p /sbin/ldconfig |
| 47 | |
| 48 | %files |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 49 | %defattr(-,root,root) |
| 50 | %{_bindir}/yanglint |
Radek Krejci | 9d4bb98 | 2017-07-12 15:20:34 +0200 | [diff] [blame] | 51 | %{_bindir}/yangre |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 52 | %{_datadir}/man/man1/yanglint.1.gz |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 53 | %{_libdir}/libyang.so.* |
| 54 | %{_libdir}/libyang/nacm.so |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 55 | %{_libdir}/libyang/metadata.so |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 56 | %dir %{_libdir}/libyang/ |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 57 | |
| 58 | %files devel |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 59 | %defattr(-,root,root) |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 60 | %{_libdir}/libyang.so |
| 61 | %{_libdir}/pkgconfig/libyang.pc |
| 62 | %{_includedir}/libyang/* |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 63 | %dir %{_includedir}/libyang/ |
| 64 | |
| 65 | %changelog |