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 |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 7 | Source1: libyang.rpmlintrc |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 8 | License: BSD-3-Clause |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 9 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 10 | |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 11 | Requires: pcre |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 12 | BuildRequires: cmake |
| 13 | BuildRequires: doxygen |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 14 | BuildRequires: pcre-devel |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 15 | BuildRequires: valgrind |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 16 | BuildRequires: libcmocka-devel |
PavolVican | 5fd74d9 | 2017-06-08 09:38:39 +0200 | [diff] [blame] | 17 | BuildRequires: gcc |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 18 | BuildRequires: gcc-c++ |
Michal Vasko | 6341aea | 2018-09-27 09:03:06 +0200 | [diff] [blame] | 19 | BuildRequires: swig >= 3.0.12 |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 20 | |
| 21 | %if 0%{?suse_version} + 0%{?fedora} > 0 |
| 22 | BuildRequires: python3-devel |
| 23 | %else |
| 24 | BuildRequires: python34-devel |
| 25 | %endif |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 26 | |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 27 | Conflicts: @CONFLICT_PACKAGE_NAME@ = @LIBYANG_MAJOR_VERSION@.@LIBYANG_MINOR_VERSION@ |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 28 | |
| 29 | %package devel |
| 30 | Summary: Headers of libyang library |
| 31 | Requires: %{name} = %{version}-%{release} |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 32 | Requires: pcre-devel |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 33 | |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 34 | %package -n libyang-cpp@PACKAGE_PART_NAME@ |
| 35 | Summary: Bindings to c++ language |
| 36 | Requires: %{name} = %{version}-%{release} |
| 37 | |
| 38 | %package -n libyang-cpp@PACKAGE_PART_NAME@-devel |
| 39 | Summary: Headers of bindings to c++ language |
PavolVican | 5b6ce2c | 2018-02-27 13:51:40 +0100 | [diff] [blame] | 40 | Requires: libyang-cpp@PACKAGE_PART_NAME@ = %{version}-%{release} |
| 41 | Requires: pcre-devel |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 42 | |
| 43 | %package -n python3-yang@PACKAGE_PART_NAME@ |
| 44 | Summary: Binding to python |
PavolVican | 5b6ce2c | 2018-02-27 13:51:40 +0100 | [diff] [blame] | 45 | Requires: libyang-cpp@PACKAGE_PART_NAME@ = %{version}-%{release} |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 46 | Requires: %{name} = %{version}-%{release} |
| 47 | |
| 48 | %description -n libyang-cpp@PACKAGE_PART_NAME@ |
| 49 | Bindings of libyang library to C++ language. |
| 50 | |
| 51 | %description -n libyang-cpp@PACKAGE_PART_NAME@-devel |
| 52 | Headers of bindings to c++ language. |
| 53 | |
| 54 | %description -n python3-yang@PACKAGE_PART_NAME@ |
| 55 | Bindings of libyang library to python language. |
| 56 | |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 57 | %description devel |
| 58 | Headers of libyang library. |
| 59 | |
| 60 | %description |
| 61 | Libyang is YANG data modelling language parser and toolkit written (and providing API) in C. |
| 62 | |
| 63 | %prep |
| 64 | %setup -n libyang-@BRANCH@ |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 65 | mkdir build |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 66 | |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 67 | %build |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 68 | cd build |
| 69 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -DGEN_LANGUAGE_BINDINGS=ON .. |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 70 | make |
| 71 | |
| 72 | %check |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 73 | cd build |
PavolVican | 93d80d1 | 2017-06-07 15:18:01 +0200 | [diff] [blame] | 74 | ctest --output-on-failure |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 75 | |
| 76 | %install |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 77 | cd build |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 78 | make DESTDIR=%{buildroot} install |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 79 | |
| 80 | %post -p /sbin/ldconfig |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 81 | %post -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 82 | |
| 83 | %postun -p /sbin/ldconfig |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 84 | %postun -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 85 | |
| 86 | %files |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 87 | %defattr(-,root,root) |
| 88 | %{_bindir}/yanglint |
Radek Krejci | 9d4bb98 | 2017-07-12 15:20:34 +0200 | [diff] [blame] | 89 | %{_bindir}/yangre |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 90 | %{_datadir}/man/man1/yanglint.1.gz |
David Lamparter | 2f2a4b6 | 2018-11-09 16:38:12 +0100 | [diff] [blame] | 91 | %{_datadir}/man/man1/yangre.1.gz |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 92 | %{_libdir}/libyang.so.* |
PavolVican | 507091b | 2018-03-09 13:33:14 +0100 | [diff] [blame] | 93 | %{_libdir}/libyang/* |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 94 | %dir %{_libdir}/libyang/ |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 95 | |
| 96 | %files devel |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 97 | %defattr(-,root,root) |
PavolVican | 8fbbbdc | 2017-03-25 00:55:44 +0100 | [diff] [blame] | 98 | %{_libdir}/libyang.so |
| 99 | %{_libdir}/pkgconfig/libyang.pc |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 100 | %{_includedir}/libyang/*.h |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 101 | %dir %{_includedir}/libyang/ |
| 102 | |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 103 | %files -n libyang-cpp@PACKAGE_PART_NAME@ |
| 104 | %defattr(-,root,root) |
| 105 | %{_libdir}/libyang-cpp.so.* |
| 106 | |
| 107 | %files -n libyang-cpp@PACKAGE_PART_NAME@-devel |
| 108 | %defattr(-,root,root) |
| 109 | %{_libdir}/libyang-cpp.so |
| 110 | %{_includedir}/libyang/*.hpp |
PavolVican | 887993f | 2018-06-25 20:27:11 +0200 | [diff] [blame] | 111 | %{_libdir}/pkgconfig/libyang-cpp.pc |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 112 | %dir %{_includedir}/libyang/ |
| 113 | |
| 114 | %files -n python3-yang@PACKAGE_PART_NAME@ |
| 115 | %defattr(-,root,root) |
| 116 | %{_libdir}/python* |
| 117 | |
PavolVican | 80f962b | 2017-05-29 16:40:16 +0200 | [diff] [blame] | 118 | %changelog |