PavolVican | e639b15 | 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 | 3b73a08 | 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 | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 21 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 22 | %if 0%{?suse_version} + 0%{?fedora} > 0 |
| 23 | BuildRequires: python3-devel |
| 24 | %else |
| 25 | BuildRequires: python34-devel |
| 26 | %endif |
PavolVican | c5568a9 | 2018-02-05 12:13:17 +0100 | [diff] [blame] | 27 | Conflicts: @CONFLICT_PACKAGE_NAME@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 28 | |
| 29 | %package devel |
| 30 | Summary: Headers of libnetconf2 library |
| 31 | Requires: %{name} = %{version}-%{release} |
| 32 | Requires: libssh-devel |
| 33 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 34 | %package -n python3-netconf2@COMPAT_PACKAGES@ |
| 35 | Summary: Bindings to python3 |
| 36 | Requires: %{name} = %{version}-%{release} |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 37 | |
| 38 | %description devel |
| 39 | Headers of libnetconf2 library. |
| 40 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 41 | %description -n python3-netconf2@COMPAT_PACKAGES@ |
| 42 | Bindings of libnetconf2 library to python3 language. |
| 43 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 44 | %description |
| 45 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 46 | |
| 47 | %prep |
| 48 | %setup -n libnetconf2-@BRANCH@ |
| 49 | |
| 50 | %build |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 51 | 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] | 52 | make |
| 53 | |
| 54 | %check |
| 55 | ctest --output-on-failure |
| 56 | |
| 57 | %install |
| 58 | make DESTDIR=%{buildroot} install |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 59 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 60 | %post -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 61 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 62 | %postun -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 63 | |
| 64 | %files |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 65 | %defattr(-,root,root) |
| 66 | %{_libdir}/libnetconf2.so.* |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 67 | %{_datadir}/libnetconf2/* |
| 68 | %dir %{_datadir}/libnetconf2/ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 69 | |
| 70 | %files devel |
| 71 | %defattr(-,root,root) |
| 72 | %{_libdir}/libnetconf2.so |
| 73 | %{_libdir}/pkgconfig/libnetconf2.pc |
| 74 | %{_includedir}/libnetconf2/* |
| 75 | %{_includedir}/nc_client.h |
| 76 | %{_includedir}/nc_server.h |
| 77 | %dir %{_includedir}/libnetconf2/ |
| 78 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 79 | %files -n python3-netconf2@COMPAT_PACKAGES@ |
| 80 | %defattr(-,root,root) |
Radek Krejci | bf60383 | 2018-03-20 15:35:31 +0100 | [diff] [blame] | 81 | /usr/lib*/python*/*-packages/* |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 82 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 83 | %changelog |