blob: a3af285f5565a6dd47adcfdf56d50202939cfad2 [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
PavolVican384786e2017-07-12 15:31:20 +020010Requires: libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ = %{version}-%{release}
11BuildRequires: 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
PavolVican3b73a082018-02-05 12:13:17 +010021Conflicts: @CONFLICT_PACKAGE_NAME@
PavolVican384786e2017-07-12 15:31:20 +020022
23%package -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
24Summary: Libnetconf2 library
PavolVican3b73a082018-02-05 12:13:17 +010025Requires: libyang@COMPAT_PACKAGES@
26Requires: %{name} = %{version}-%{release}
PavolVican384786e2017-07-12 15:31:20 +020027
28%package devel
29Summary: Headers of libnetconf2 library
30Requires: %{name} = %{version}-%{release}
31Requires: libssh-devel
32
33%description -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
34Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
35
36%description devel
37Headers of libnetconf2 library.
38
PavolVican384786e2017-07-12 15:31:20 +020039%description
40Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
41
42%prep
43%setup -n libnetconf2-@BRANCH@
44
45%build
PavolVican3b73a082018-02-05 12:13:17 +010046cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -D ENABLE_VALGRIND_TESTS:BOOL=FALSE .
PavolVican384786e2017-07-12 15:31:20 +020047make
48
49%check
50ctest --output-on-failure
51
52%install
53make DESTDIR=%{buildroot} install
PavolVican384786e2017-07-12 15:31:20 +020054
55%post -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig
56
57%postun -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig
58
59%files
60%{_datadir}/libnetconf2/*
61%dir %{_datadir}/libnetconf2/
62
63%files -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
64%defattr(-,root,root)
65%{_libdir}/libnetconf2.so.*
66
67%files devel
68%defattr(-,root,root)
69%{_libdir}/libnetconf2.so
70%{_libdir}/pkgconfig/libnetconf2.pc
71%{_includedir}/libnetconf2/*
72%{_includedir}/nc_client.h
73%{_includedir}/nc_server.h
74%dir %{_includedir}/libnetconf2/
75
PavolVican384786e2017-07-12 15:31:20 +020076%changelog