| Name: @PACKAGE@ |
| Version: @LIBNETCONF2_VERSION@ |
| Release: 0 |
| Summary: @PACKAGE_BRIEF@ |
| Url: @GITHUB_URL@ |
| Source: @GITHUB_URL@/archive/master.tar.gz |
| Source1: @PACKAGE@.rpmlintrc |
| License: BSD-3-Clause |
| BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
| |
| %if 0%{?centos_version} || 0%{?centos_ver} || 0%{?scientificlinux_version} |
| Requires: libssh >= 0.7.1 |
| %else |
| %if 0%{?suse_version} |
| Requires: libssh4 >= 0.7.1 |
| Requires: (libssh4 < 0.9.3 or libssh4 > 0.9.4) |
| %else |
| Requires: libssh >= 0.7.1 |
| Requires: (libssh < 0.9.3 or libssh > 0.9.4) |
| %endif |
| %endif |
| |
| Requires: libyang@LIBYANG_DEP_SOVERSION_MAJOR@ |
| Requires: openssl |
| |
| BuildRequires: cmake |
| BuildRequires: doxygen |
| BuildRequires: libyang-devel >= @LIBYANG_DEP_SOVERSION_MAJOR@.0 |
| BuildRequires: gcc |
| BuildRequires: libcmocka-devel |
| BuildRequires: libssh-devel >= 0.7.1 |
| BuildRequires: openssl-devel |
| |
| %if 0%{?suse_version} |
| BuildRequires: timezone |
| %endif |
| |
| %package devel |
| Summary: @PACKAGE_DEV_BRIEF@ |
| Requires: %{name} = %{version}-%{release} |
| Requires: libssh-devel |
| |
| %description devel |
| @PACKAGE_DEV_DESC@ |
| |
| %description |
| @PACKAGE_DESC@ |
| |
| %prep |
| %setup -n @PACKAGE@-master |
| mkdir build |
| |
| %build |
| cd build |
| cmake -DCMAKE_INSTALL_PREFIX=/usr \ |
| -DCMAKE_BUILD_TYPE="Package" \ |
| -DENABLE_VALGRIND_TESTS=OFF .. |
| make |
| |
| %check |
| cd build |
| ctest --output-on-failure |
| |
| %install |
| cd build |
| make DESTDIR=%{buildroot} install |
| |
| %post -p /sbin/ldconfig |
| |
| %postun -p /sbin/ldconfig |
| |
| %files |
| %defattr(-,root,root) |
| %{_libdir}/libnetconf2.so.* |
| |
| %files devel |
| %defattr(-,root,root) |
| %{_libdir}/libnetconf2.so |
| %{_libdir}/pkgconfig/libnetconf2.pc |
| %{_includedir}/libnetconf2/* |
| %{_includedir}/nc_client.h |
| %{_includedir}/nc_server.h |
| %dir %{_includedir}/libnetconf2/ |
| |
| %changelog |