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 | |
| 10 | %define debug_package %{nil} |
| 11 | |
| 12 | Requires: libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ = %{version}-%{release} |
| 13 | BuildRequires: libyang@COMPAT_PACKAGES@-devel |
| 14 | BuildRequires: libssh-devel >= 0.7.1 |
| 15 | BuildRequires: openssl-devel |
| 16 | BuildRequires: valgrind |
| 17 | BuildRequires: libcmocka-devel |
| 18 | BuildRequires: gcc |
| 19 | %if 0%{?suse_version} |
| 20 | BuildRequires: timezone |
| 21 | %endif |
| 22 | |
| 23 | %package debuginfo |
| 24 | Summary: Debug symbol for libnetnconf2 library |
| 25 | Requires: %{name} = %{version}-%{release} |
| 26 | |
| 27 | %if 0%{?suse_version} |
| 28 | %package debugsource |
| 29 | Summary: Debug information for libnetnconf2 library |
| 30 | Requires: %{name} = %{version}-%{release} |
| 31 | |
| 32 | %description debugsource |
| 33 | This package provides debug information for package libnetconf2. Debug information is useful when developing applications that use this package or when debugging this package. |
| 34 | |
| 35 | %endif |
| 36 | |
| 37 | %package -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 38 | Summary: Libnetconf2 library |
| 39 | Requires: libyang |
| 40 | |
| 41 | %package devel |
| 42 | Summary: Headers of libnetconf2 library |
| 43 | Requires: %{name} = %{version}-%{release} |
| 44 | Requires: libssh-devel |
| 45 | |
| 46 | %description -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 47 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 48 | |
| 49 | %description devel |
| 50 | Headers of libnetconf2 library. |
| 51 | |
| 52 | %description debuginfo |
| 53 | This package provides debug information for package libnetconf2. Debug information is useful when developing applications that use this package or when debugging this package. |
| 54 | |
| 55 | %description |
| 56 | Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers. |
| 57 | |
| 58 | %prep |
| 59 | %setup -n libnetconf2-@BRANCH@ |
| 60 | |
| 61 | %build |
| 62 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" . |
| 63 | make |
| 64 | |
| 65 | %check |
| 66 | ctest --output-on-failure |
| 67 | |
| 68 | %install |
| 69 | make DESTDIR=%{buildroot} install |
| 70 | /usr/lib/rpm/find-debuginfo.sh |
| 71 | |
| 72 | %post -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig |
| 73 | |
| 74 | %postun -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig |
| 75 | |
| 76 | %files |
| 77 | %{_datadir}/libnetconf2/* |
| 78 | %dir %{_datadir}/libnetconf2/ |
| 79 | |
| 80 | %files -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ |
| 81 | %defattr(-,root,root) |
| 82 | %{_libdir}/libnetconf2.so.* |
| 83 | |
| 84 | %files devel |
| 85 | %defattr(-,root,root) |
| 86 | %{_libdir}/libnetconf2.so |
| 87 | %{_libdir}/pkgconfig/libnetconf2.pc |
| 88 | %{_includedir}/libnetconf2/* |
| 89 | %{_includedir}/nc_client.h |
| 90 | %{_includedir}/nc_server.h |
| 91 | %dir %{_includedir}/libnetconf2/ |
| 92 | |
| 93 | %if 0%{?suse_version} |
| 94 | %files debuginfo |
| 95 | %defattr(-,root,root) |
| 96 | %{_prefix}/lib/debug/* |
| 97 | %{_prefix}/lib/debug/.build-id/* |
| 98 | %{_usrsrc}/debug/* |
| 99 | |
| 100 | %files debugsource |
| 101 | %defattr(-,root,root) |
| 102 | %{_usrsrc}/debug/* |
| 103 | |
| 104 | %else |
| 105 | %files debuginfo |
| 106 | %defattr(-,root,root) |
| 107 | %{_prefix}/lib/debug/* |
| 108 | %{_prefix}/lib/debug/.build-id/* |
| 109 | %{_usrsrc}/debug/* |
| 110 | |
| 111 | %endif |
| 112 | |
| 113 | %changelog |
| 114 | |