blob: b491e599ac91fb034f1f4c56871343a15a0a8c73 [file] [log] [blame]
Jakub Ružička891b73a2021-07-14 17:26:48 +02001Name: libnetconf2
2Version: {{ version }}
3Release: {{ release }}%{?dist}
4Summary: NETCONF protocol library
5Url: https://github.com/CESNET/libnetconf2
6Source: libnetconf2-%{version}.tar.gz
Jakub Ružička37380c92021-10-12 12:27:09 +02007License: BSD
Jakub Ružička891b73a2021-07-14 17:26:48 +02008
9BuildRequires: cmake
10BuildRequires: make
11BuildRequires: gcc
12BuildRequires: libssh-devel
Jakub Ružička891b73a2021-07-14 17:26:48 +020013BuildRequires: openssl-devel
Jakub Ružička37380c92021-10-12 12:27:09 +020014BuildRequires: pkgconfig(libyang) >= 2
Jakub Ružička891b73a2021-07-14 17:26:48 +020015
Jakub Ružička37380c92021-10-12 12:27:09 +020016%package devel
Jakub Ružička891b73a2021-07-14 17:26:48 +020017Summary: Headers of libnetconf2 library
18Conflicts: libnetconf-devel
Jakub Ružička37380c92021-10-12 12:27:09 +020019Requires: %{name}%{?_isa} = %{version}-%{release}
Jakub Ružička891b73a2021-07-14 17:26:48 +020020
Jakub Ružička37380c92021-10-12 12:27:09 +020021%description devel
Jakub Ružička891b73a2021-07-14 17:26:48 +020022Headers of libnetconf library.
23
24%description
25libnetconf2 is a NETCONF library in C intended for building NETCONF clients and
26servers. NETCONF is the NETwork CONFiguration protocol introduced by IETF.
27
28
29%prep
Jakub Ružička37380c92021-10-12 12:27:09 +020030%autosetup -p1
Jakub Ružička891b73a2021-07-14 17:26:48 +020031mkdir build
32
33%build
34cd build
Jakub Ružička37380c92021-10-12 12:27:09 +020035cmake \
36 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
Jakub Ružička891b73a2021-07-14 17:26:48 +020037 -DCMAKE_BUILD_TYPE:String="Release" \
38 -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
39 -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
40 ..
41make
42
43%install
44cd build
45make DESTDIR=%{buildroot} install
46
Jakub Ružička891b73a2021-07-14 17:26:48 +020047%files
Jakub Ružička37380c92021-10-12 12:27:09 +020048%license LICENSE
Jakub Ružička891b73a2021-07-14 17:26:48 +020049%{_libdir}/libnetconf2.so.2*
50
Jakub Ružička37380c92021-10-12 12:27:09 +020051%files devel
Jakub Ružička891b73a2021-07-14 17:26:48 +020052%{_libdir}/libnetconf2.so
53%{_libdir}/pkgconfig/libnetconf2.pc
54%{_includedir}/*.h
55%{_includedir}/libnetconf2/*.h
56%dir %{_includedir}/libnetconf2/
57
58
59%changelog
Jakub Ružička37380c92021-10-12 12:27:09 +020060* Tue Oct 12 2021 Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
Jakub Ružička891b73a2021-07-14 17:26:48 +020061- upstream package