blob: 5700ac97c21ee97ffdbb8cbb32bb7db581b0fb43 [file] [log] [blame]
PavolVican29948b12018-02-05 12:34:15 +01001Name: @PACKAGE_NAME@
PavolVican384786e2017-07-12 15:31:20 +02002Version: @LIBNETCONF2_VERSION@
3Release: 0
4Summary: Libnetconf2 library
5Url: https://github.com/CESNET/libnetconf2
6Source: %{url}/archive/@BRANCH@.tar.gz
7License: BSD-3-Clause
8BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
9
PavolVicanb8b7acb2018-02-27 18:33:25 +010010Requires: libyang@COMPAT_PACKAGES@
PavolVican384786e2017-07-12 15:31:20 +020011BuildRequires: libyang@COMPAT_PACKAGES@-devel
12BuildRequires: libssh-devel >= 0.7.1
13BuildRequires: openssl-devel
14BuildRequires: valgrind
PavolVicanc5568a92018-02-05 12:13:17 +010015BuildRequires: cmake
PavolVican384786e2017-07-12 15:31:20 +020016BuildRequires: libcmocka-devel
17BuildRequires: gcc
18%if 0%{?suse_version}
19BuildRequires: timezone
20%endif
PavolVicanb8b7acb2018-02-27 18:33:25 +010021%if 0%{?suse_version} + 0%{?fedora} > 0
22BuildRequires: python3-devel
23%else
24BuildRequires: python34-devel
25%endif
PavolVicanc5568a92018-02-05 12:13:17 +010026Conflicts: @CONFLICT_PACKAGE_NAME@
PavolVican384786e2017-07-12 15:31:20 +020027
PavolVican384786e2017-07-12 15:31:20 +020028%package devel
29Summary: Headers of libnetconf2 library
30Requires: %{name} = %{version}-%{release}
31Requires: libssh-devel
32
PavolVicanb8b7acb2018-02-27 18:33:25 +010033%package -n python3-netconf2@COMPAT_PACKAGES@
34Summary: Bindings to python3
35Requires: %{name} = %{version}-%{release}
PavolVican384786e2017-07-12 15:31:20 +020036
37%description devel
38Headers of libnetconf2 library.
39
PavolVicanb8b7acb2018-02-27 18:33:25 +010040%description -n python3-netconf2@COMPAT_PACKAGES@
41Bindings of libnetconf2 library to python3 language.
42
PavolVican384786e2017-07-12 15:31:20 +020043%description
44Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
45
46%prep
47%setup -n libnetconf2-@BRANCH@
48
49%build
PavolVicanb8b7acb2018-02-27 18:33:25 +010050cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -DENABLE_PYTHON=ON -DENABLE_VALGRIND_TESTS:BOOL=FALSE .
PavolVican384786e2017-07-12 15:31:20 +020051make
52
53%check
54ctest --output-on-failure
55
56%install
57make DESTDIR=%{buildroot} install
PavolVican384786e2017-07-12 15:31:20 +020058
PavolVicanb8b7acb2018-02-27 18:33:25 +010059%post -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020060
PavolVicanb8b7acb2018-02-27 18:33:25 +010061%postun -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020062
63%files
PavolVican384786e2017-07-12 15:31:20 +020064%defattr(-,root,root)
65%{_libdir}/libnetconf2.so.*
PavolVicanb8b7acb2018-02-27 18:33:25 +010066%{_datadir}/libnetconf2/*
67%dir %{_datadir}/libnetconf2/
PavolVican384786e2017-07-12 15:31:20 +020068
69%files devel
70%defattr(-,root,root)
71%{_libdir}/libnetconf2.so
72%{_libdir}/pkgconfig/libnetconf2.pc
73%{_includedir}/libnetconf2/*
74%{_includedir}/nc_client.h
75%{_includedir}/nc_server.h
76%dir %{_includedir}/libnetconf2/
77
PavolVicanb8b7acb2018-02-27 18:33:25 +010078%files -n python3-netconf2@COMPAT_PACKAGES@
79%defattr(-,root,root)
Radek Krejcibf603832018-03-20 15:35:31 +010080/usr/lib*/python*/*-packages/*
PavolVicanb8b7acb2018-02-27 18:33:25 +010081
PavolVican384786e2017-07-12 15:31:20 +020082%changelog