blob: 9295d17e8fd85690f4995d7a3ffbf5dc403561d7 [file] [log] [blame]
PavolVican384786e2017-07-12 15:31:20 +02001Name: libnetconf2-experimental
2Version: @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
10%define debug_package %{nil}
11
12Requires: libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ = %{version}-%{release}
13BuildRequires: libyang@COMPAT_PACKAGES@-devel
14BuildRequires: libssh-devel >= 0.7.1
15BuildRequires: openssl-devel
16BuildRequires: valgrind
17BuildRequires: libcmocka-devel
18BuildRequires: gcc
19%if 0%{?suse_version}
20BuildRequires: timezone
21%endif
22
23%package debuginfo
24Summary: Debug symbol for libnetnconf2 library
25Requires: %{name} = %{version}-%{release}
26
27%if 0%{?suse_version}
28%package debugsource
29Summary: Debug information for libnetnconf2 library
30Requires: %{name} = %{version}-%{release}
31
32%description debugsource
33This package provides debug information for package libnetconf2. Debug information is useful when developing applications that use this package or when debugging this package.
34
35%endif
36
37%package -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
38Summary: Libnetconf2 library
39Requires: libyang
40
41%package devel
42Summary: Headers of libnetconf2 library
43Requires: %{name} = %{version}-%{release}
44Requires: libssh-devel
45
46%description -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
47Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
48
49%description devel
50Headers of libnetconf2 library.
51
52%description debuginfo
53This package provides debug information for package libnetconf2. Debug information is useful when developing applications that use this package or when debugging this package.
54
55%description
56Libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
57
58%prep
59%setup -n libnetconf2-@BRANCH@
60
61%build
62cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" .
63make
64
65%check
66ctest --output-on-failure
67
68%install
69make DESTDIR=%{buildroot} install
70/usr/lib/rpm/find-debuginfo.sh
71
72%post -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig
73
74%postun -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@ -p /sbin/ldconfig
75
76%files
77%{_datadir}/libnetconf2/*
78%dir %{_datadir}/libnetconf2/
79
80%files -n libnetconf2-@LIBNETCONF2_MAJOR_VERSION@_@LIBNETCONF2_MINOR_VERSION@
81%defattr(-,root,root)
82%{_libdir}/libnetconf2.so.*
83
84%files devel
85%defattr(-,root,root)
86%{_libdir}/libnetconf2.so
87%{_libdir}/pkgconfig/libnetconf2.pc
88%{_includedir}/libnetconf2/*
89%{_includedir}/nc_client.h
90%{_includedir}/nc_server.h
91%dir %{_includedir}/libnetconf2/
92
93%if 0%{?suse_version}
94%files debuginfo
95%defattr(-,root,root)
96%{_prefix}/lib/debug/*
97%{_prefix}/lib/debug/.build-id/*
98%{_usrsrc}/debug/*
99
100%files debugsource
101%defattr(-,root,root)
102%{_usrsrc}/debug/*
103
104%else
105%files debuginfo
106%defattr(-,root,root)
107%{_prefix}/lib/debug/*
108%{_prefix}/lib/debug/.build-id/*
109%{_usrsrc}/debug/*
110
111%endif
112
113%changelog
114