blob: 76562ae159d9314444608c3c98dbd352716b9930 [file] [log] [blame]
PavolVicane639b152018-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
PavolVican3b73a082018-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
PavolVican384786e2017-07-12 15:31:20 +020021
PavolVicanb8b7acb2018-02-27 18:33:25 +010022%if 0%{?suse_version} + 0%{?fedora} > 0
23BuildRequires: python3-devel
24%else
25BuildRequires: python34-devel
26%endif
PavolVicanc5568a92018-02-05 12:13:17 +010027Conflicts: @CONFLICT_PACKAGE_NAME@
PavolVican384786e2017-07-12 15:31:20 +020028
29%package devel
30Summary: Headers of libnetconf2 library
31Requires: %{name} = %{version}-%{release}
32Requires: libssh-devel
33
PavolVicanb8b7acb2018-02-27 18:33:25 +010034%package -n python3-netconf2@COMPAT_PACKAGES@
35Summary: Bindings to python3
36Requires: %{name} = %{version}-%{release}
PavolVican384786e2017-07-12 15:31:20 +020037
38%description devel
39Headers of libnetconf2 library.
40
PavolVicanb8b7acb2018-02-27 18:33:25 +010041%description -n python3-netconf2@COMPAT_PACKAGES@
42Bindings of libnetconf2 library to python3 language.
43
PavolVican384786e2017-07-12 15:31:20 +020044%description
45Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
46
47%prep
48%setup -n libnetconf2-@BRANCH@
49
50%build
PavolVicanb8b7acb2018-02-27 18:33:25 +010051cmake -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 +020052make
53
54%check
55ctest --output-on-failure
56
57%install
58make DESTDIR=%{buildroot} install
PavolVican384786e2017-07-12 15:31:20 +020059
PavolVicanb8b7acb2018-02-27 18:33:25 +010060%post -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020061
PavolVicanb8b7acb2018-02-27 18:33:25 +010062%postun -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020063
64%files
PavolVican384786e2017-07-12 15:31:20 +020065%defattr(-,root,root)
66%{_libdir}/libnetconf2.so.*
PavolVicanb8b7acb2018-02-27 18:33:25 +010067%{_datadir}/libnetconf2/*
68%dir %{_datadir}/libnetconf2/
PavolVican384786e2017-07-12 15:31:20 +020069
70%files devel
71%defattr(-,root,root)
72%{_libdir}/libnetconf2.so
73%{_libdir}/pkgconfig/libnetconf2.pc
74%{_includedir}/libnetconf2/*
75%{_includedir}/nc_client.h
76%{_includedir}/nc_server.h
77%dir %{_includedir}/libnetconf2/
78
PavolVicanb8b7acb2018-02-27 18:33:25 +010079%files -n python3-netconf2@COMPAT_PACKAGES@
80%defattr(-,root,root)
Radek Krejcibf603832018-03-20 15:35:31 +010081/usr/lib*/python*/*-packages/*
PavolVicanb8b7acb2018-02-27 18:33:25 +010082
PavolVican384786e2017-07-12 15:31:20 +020083%changelog