PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 1 | Name: libnetconf2-experimental |
| 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 | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 10 | Requires: libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ = %{version}-%{release} |
| 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 | 3b73a08 | 2018-02-05 12:13:17 +0100 | [diff] [blame^] | 21 | Conflicts: @CONFLICT_PACKAGE_NAME@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 22 | |
| 23 | %package -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 24 | Summary: Libnetconf2 library |
PavolVican | 3b73a08 | 2018-02-05 12:13:17 +0100 | [diff] [blame^] | 25 | Requires: libyang@COMPAT_PACKAGES@ |
| 26 | Requires: %{name} = %{version}-%{release} |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 27 | |
| 28 | %package devel |
| 29 | Summary: Headers of libnetconf2 library |
| 30 | Requires: %{name} = %{version}-%{release} |
| 31 | Requires: libssh-devel |
| 32 | |
| 33 | %description -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 34 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 35 | |
| 36 | %description devel |
| 37 | Headers of libnetconf2 library. |
| 38 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 39 | %description |
| 40 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 41 | |
| 42 | %prep |
| 43 | %setup -n libnetconf2-@BRANCH@ |
| 44 | |
| 45 | %build |
PavolVican | 3b73a08 | 2018-02-05 12:13:17 +0100 | [diff] [blame^] | 46 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -D ENABLE_VALGRIND_TESTS:BOOL=FALSE . |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 47 | make |
| 48 | |
| 49 | %check |
| 50 | ctest --output-on-failure |
| 51 | |
| 52 | %install |
| 53 | make DESTDIR=%{buildroot} install |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 54 | |
| 55 | %post -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig |
| 56 | |
| 57 | %postun -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig |
| 58 | |
| 59 | %files |
| 60 | %{_datadir}/libnetconf2/* |
| 61 | %dir %{_datadir}/libnetconf2/ |
| 62 | |
| 63 | %files -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 64 | %defattr(-,root,root) |
| 65 | %{_libdir}/libnetconf2.so.* |
| 66 | |
| 67 | %files devel |
| 68 | %defattr(-,root,root) |
| 69 | %{_libdir}/libnetconf2.so |
| 70 | %{_libdir}/pkgconfig/libnetconf2.pc |
| 71 | %{_includedir}/libnetconf2/* |
| 72 | %{_includedir}/nc_client.h |
| 73 | %{_includedir}/nc_server.h |
| 74 | %dir %{_includedir}/libnetconf2/ |
| 75 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 76 | %changelog |