PavolVican | 29948b1 | 2018-02-05 12:34:15 +0100 | [diff] [blame] | 1 | Name: @PACKAGE_NAME@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 2 | Version: @LIBNETCONF2_VERSION@ |
| 3 | Release: 0 |
| 4 | Summary: Libnetconf2 library |
| 5 | Url: https://github.com/CESNET/libnetconf2 |
| 6 | Source: %{url}/archive/@BRANCH@.tar.gz |
| 7 | License: BSD-3-Clause |
| 8 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
| 9 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 10 | Requires: libyang@COMPAT_PACKAGES@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 11 | BuildRequires: libyang@COMPAT_PACKAGES@-devel |
| 12 | BuildRequires: libssh-devel >= 0.7.1 |
| 13 | BuildRequires: openssl-devel |
| 14 | BuildRequires: valgrind |
PavolVican | c5568a9 | 2018-02-05 12:13:17 +0100 | [diff] [blame] | 15 | BuildRequires: cmake |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 16 | BuildRequires: libcmocka-devel |
| 17 | BuildRequires: gcc |
| 18 | %if 0%{?suse_version} |
| 19 | BuildRequires: timezone |
| 20 | %endif |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 21 | %if 0%{?suse_version} + 0%{?fedora} > 0 |
| 22 | BuildRequires: python3-devel |
| 23 | %else |
| 24 | BuildRequires: python34-devel |
| 25 | %endif |
PavolVican | c5568a9 | 2018-02-05 12:13:17 +0100 | [diff] [blame] | 26 | Conflicts: @CONFLICT_PACKAGE_NAME@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 27 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 28 | %package devel |
| 29 | Summary: Headers of libnetconf2 library |
| 30 | Requires: %{name} = %{version}-%{release} |
| 31 | Requires: libssh-devel |
| 32 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 33 | %package -n python3-netconf2@COMPAT_PACKAGES@ |
| 34 | Summary: Bindings to python3 |
| 35 | Requires: %{name} = %{version}-%{release} |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 36 | |
| 37 | %description devel |
| 38 | Headers of libnetconf2 library. |
| 39 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 40 | %description -n python3-netconf2@COMPAT_PACKAGES@ |
| 41 | Bindings of libnetconf2 library to python3 language. |
| 42 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 43 | %description |
| 44 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 45 | |
| 46 | %prep |
| 47 | %setup -n libnetconf2-@BRANCH@ |
| 48 | |
| 49 | %build |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 50 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -DENABLE_PYTHON=ON -DENABLE_VALGRIND_TESTS:BOOL=FALSE . |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 51 | make |
| 52 | |
| 53 | %check |
| 54 | ctest --output-on-failure |
| 55 | |
| 56 | %install |
| 57 | make DESTDIR=%{buildroot} install |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 58 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 59 | %post -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 60 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 61 | %postun -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 62 | |
| 63 | %files |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 64 | %defattr(-,root,root) |
| 65 | %{_libdir}/libnetconf2.so.* |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 66 | %{_datadir}/libnetconf2/* |
| 67 | %dir %{_datadir}/libnetconf2/ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 68 | |
| 69 | %files devel |
| 70 | %defattr(-,root,root) |
| 71 | %{_libdir}/libnetconf2.so |
| 72 | %{_libdir}/pkgconfig/libnetconf2.pc |
| 73 | %{_includedir}/libnetconf2/* |
| 74 | %{_includedir}/nc_client.h |
| 75 | %{_includedir}/nc_server.h |
| 76 | %dir %{_includedir}/libnetconf2/ |
| 77 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 78 | %files -n python3-netconf2@COMPAT_PACKAGES@ |
| 79 | %defattr(-,root,root) |
| 80 | %{_libdir}/python* |
| 81 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 82 | %changelog |