|
| 1 | +Name: libnetconf2 |
| 2 | +Version: {{ version }} |
| 3 | +Release: {{ release }}%{?dist} |
| 4 | +Summary: NETCONF protocol library |
| 5 | +Url: https://github.com/CESNET/libnetconf2 |
| 6 | +Source: libnetconf2-%{version}.tar.gz |
| 7 | +License: BSD-3-Clause |
| 8 | + |
| 9 | +BuildRequires: cmake |
| 10 | +BuildRequires: make |
| 11 | +BuildRequires: gcc |
| 12 | +BuildRequires: libssh-devel |
| 13 | +BuildRequires: libyang2-devel |
| 14 | +BuildRequires: openssl-devel |
| 15 | + |
| 16 | +%package -n libnetconf2-devel |
| 17 | +Summary: Headers of libnetconf2 library |
| 18 | +Conflicts: libnetconf-devel |
| 19 | +Requires: %{name} = %{version}-%{release} |
| 20 | + |
| 21 | +%description -n libnetconf2-devel |
| 22 | +Headers of libnetconf library. |
| 23 | + |
| 24 | +%description |
| 25 | +libnetconf2 is a NETCONF library in C intended for building NETCONF clients and |
| 26 | +servers. NETCONF is the NETwork CONFiguration protocol introduced by IETF. |
| 27 | + |
| 28 | + |
| 29 | +%prep |
| 30 | +%setup -n libnetconf2-%{version} |
| 31 | +mkdir build |
| 32 | + |
| 33 | +%build |
| 34 | +cd build |
| 35 | +cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ |
| 36 | + -DCMAKE_BUILD_TYPE:String="Release" \ |
| 37 | + -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ |
| 38 | + -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ |
| 39 | + .. |
| 40 | +make |
| 41 | + |
| 42 | +%install |
| 43 | +cd build |
| 44 | +make DESTDIR=%{buildroot} install |
| 45 | + |
| 46 | +%post -p /sbin/ldconfig |
| 47 | + |
| 48 | +%postun -p /sbin/ldconfig |
| 49 | + |
| 50 | + |
| 51 | +%files |
| 52 | +%defattr(-,root,root) |
| 53 | +%{_libdir}/libnetconf2.so.2* |
| 54 | + |
| 55 | +%files -n libnetconf2-devel |
| 56 | +%defattr(-,root,root) |
| 57 | +%{_libdir}/libnetconf2.so |
| 58 | +%{_libdir}/pkgconfig/libnetconf2.pc |
| 59 | +%{_includedir}/*.h |
| 60 | +%{_includedir}/libnetconf2/*.h |
| 61 | +%dir %{_includedir}/libnetconf2/ |
| 62 | + |
| 63 | + |
| 64 | +%changelog |
| 65 | +* Fri Jul 09 2021 Jakub Ružička <[email protected]> - {{ version }}-{{ release }} |
| 66 | +- upstream package |
0 commit comments