Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 1 | Name: @PACKAGE@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 2 | Version: @LIBNETCONF2_VERSION@ |
| 3 | Release: 0 |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 4 | Summary: @PACKAGE_BRIEF@ |
| 5 | Url: @GITHUB_URL@ |
| 6 | Source: @GITHUB_URL@/archive/master.tar.gz |
| 7 | Source1: @PACKAGE@.rpmlintrc |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 8 | License: BSD-3-Clause |
| 9 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
| 10 | |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 11 | %if 0%{?centos_version} || 0%{?centos_ver} || 0%{?scientificlinux_version} |
| 12 | Requires: libssh >= 0.7.1 |
| 13 | %else |
| 14 | %if 0%{?suse_version} |
| 15 | Requires: libssh4 >= 0.7.1 |
| 16 | Requires: (libssh4 < 0.9.3 or libssh4 > 0.9.4) |
| 17 | %else |
| 18 | Requires: libssh >= 0.7.1 |
| 19 | Requires: (libssh < 0.9.3 or libssh > 0.9.4) |
| 20 | %endif |
| 21 | %endif |
| 22 | |
Michal Vasko | 819598b | 2020-07-29 10:05:11 +0200 | [diff] [blame] | 23 | Requires: libyang@LIBYANG_DEP_SOVERSION_MAJOR@ |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 24 | Requires: openssl |
| 25 | |
| 26 | BuildRequires: cmake |
| 27 | BuildRequires: doxygen |
Michal Vasko | 819598b | 2020-07-29 10:05:11 +0200 | [diff] [blame] | 28 | BuildRequires: libyang-devel >= @LIBYANG_DEP_SOVERSION_MAJOR@.0 |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 29 | BuildRequires: gcc |
| 30 | BuildRequires: libcmocka-devel |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 31 | BuildRequires: libssh-devel >= 0.7.1 |
| 32 | BuildRequires: openssl-devel |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 33 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 34 | %if 0%{?suse_version} |
| 35 | BuildRequires: timezone |
| 36 | %endif |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 37 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 38 | %package devel |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 39 | Summary: @PACKAGE_DEV_BRIEF@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 40 | Requires: %{name} = %{version}-%{release} |
| 41 | Requires: libssh-devel |
| 42 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 43 | %description devel |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 44 | @PACKAGE_DEV_DESC@ |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 45 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 46 | %description |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 47 | @PACKAGE_DESC@ |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 48 | |
| 49 | %prep |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 50 | %setup -n @PACKAGE@-master |
| 51 | mkdir build |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 52 | |
| 53 | %build |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 54 | cd build |
| 55 | cmake -DCMAKE_INSTALL_PREFIX=/usr \ |
| 56 | -DCMAKE_BUILD_TYPE="Package" \ |
| 57 | -DENABLE_VALGRIND_TESTS=OFF .. |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 58 | make |
| 59 | |
| 60 | %check |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 61 | cd build |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 62 | ctest --output-on-failure |
| 63 | |
| 64 | %install |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 65 | cd build |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 66 | make DESTDIR=%{buildroot} install |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 67 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 68 | %post -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 69 | |
PavolVican | b8b7acb | 2018-02-27 18:33:25 +0100 | [diff] [blame] | 70 | %postun -p /sbin/ldconfig |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 71 | |
| 72 | %files |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 73 | %defattr(-,root,root) |
| 74 | %{_libdir}/libnetconf2.so.* |
| 75 | |
| 76 | %files devel |
| 77 | %defattr(-,root,root) |
| 78 | %{_libdir}/libnetconf2.so |
| 79 | %{_libdir}/pkgconfig/libnetconf2.pc |
| 80 | %{_includedir}/libnetconf2/* |
| 81 | %{_includedir}/nc_client.h |
| 82 | %{_includedir}/nc_server.h |
| 83 | %dir %{_includedir}/libnetconf2/ |
| 84 | |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 85 | %changelog |