blob: d75fa0aee83e65405436b1dd0f736e79bc15b8ca [file] [log] [blame]
Michal Vasko4cb2d722020-04-23 13:49:16 +02001Name: @PACKAGE@
PavolVican384786e2017-07-12 15:31:20 +02002Version: @LIBNETCONF2_VERSION@
3Release: 0
Michal Vasko4cb2d722020-04-23 13:49:16 +02004Summary: @PACKAGE_BRIEF@
5Url: @GITHUB_URL@
6Source: @GITHUB_URL@/archive/master.tar.gz
7Source1: @PACKAGE@.rpmlintrc
PavolVican384786e2017-07-12 15:31:20 +02008License: BSD-3-Clause
9BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
10
Michal Vasko4cb2d722020-04-23 13:49:16 +020011%if 0%{?centos_version} || 0%{?centos_ver} || 0%{?scientificlinux_version}
12Requires: libssh >= 0.7.1
13%else
14%if 0%{?suse_version}
15Requires: libssh4 >= 0.7.1
16Requires: (libssh4 < 0.9.3 or libssh4 > 0.9.4)
17%else
18Requires: libssh >= 0.7.1
19Requires: (libssh < 0.9.3 or libssh > 0.9.4)
20%endif
21%endif
22
Michal Vasko819598b2020-07-29 10:05:11 +020023Requires: libyang@LIBYANG_DEP_SOVERSION_MAJOR@
Michal Vasko4cb2d722020-04-23 13:49:16 +020024Requires: openssl
25
26BuildRequires: cmake
27BuildRequires: doxygen
Michal Vasko819598b2020-07-29 10:05:11 +020028BuildRequires: libyang-devel >= @LIBYANG_DEP_SOVERSION_MAJOR@.0
Michal Vasko4cb2d722020-04-23 13:49:16 +020029BuildRequires: gcc
30BuildRequires: libcmocka-devel
PavolVican384786e2017-07-12 15:31:20 +020031BuildRequires: libssh-devel >= 0.7.1
32BuildRequires: openssl-devel
Michal Vasko4cb2d722020-04-23 13:49:16 +020033
PavolVican384786e2017-07-12 15:31:20 +020034%if 0%{?suse_version}
35BuildRequires: timezone
36%endif
PavolVican384786e2017-07-12 15:31:20 +020037
PavolVican384786e2017-07-12 15:31:20 +020038%package devel
Michal Vasko4cb2d722020-04-23 13:49:16 +020039Summary: @PACKAGE_DEV_BRIEF@
PavolVican384786e2017-07-12 15:31:20 +020040Requires: %{name} = %{version}-%{release}
41Requires: libssh-devel
42
PavolVican384786e2017-07-12 15:31:20 +020043%description devel
Michal Vasko4cb2d722020-04-23 13:49:16 +020044@PACKAGE_DEV_DESC@
PavolVicanb8b7acb2018-02-27 18:33:25 +010045
PavolVican384786e2017-07-12 15:31:20 +020046%description
Michal Vasko4cb2d722020-04-23 13:49:16 +020047@PACKAGE_DESC@
PavolVican384786e2017-07-12 15:31:20 +020048
49%prep
Michal Vasko4cb2d722020-04-23 13:49:16 +020050%setup -n @PACKAGE@-master
51mkdir build
PavolVican384786e2017-07-12 15:31:20 +020052
53%build
Michal Vasko4cb2d722020-04-23 13:49:16 +020054cd build
55cmake -DCMAKE_INSTALL_PREFIX=/usr \
56 -DCMAKE_BUILD_TYPE="Package" \
57 -DENABLE_VALGRIND_TESTS=OFF ..
PavolVican384786e2017-07-12 15:31:20 +020058make
59
60%check
Michal Vasko4cb2d722020-04-23 13:49:16 +020061cd build
PavolVican384786e2017-07-12 15:31:20 +020062ctest --output-on-failure
63
64%install
Michal Vasko4cb2d722020-04-23 13:49:16 +020065cd build
PavolVican384786e2017-07-12 15:31:20 +020066make DESTDIR=%{buildroot} install
PavolVican384786e2017-07-12 15:31:20 +020067
PavolVicanb8b7acb2018-02-27 18:33:25 +010068%post -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020069
PavolVicanb8b7acb2018-02-27 18:33:25 +010070%postun -p /sbin/ldconfig
PavolVican384786e2017-07-12 15:31:20 +020071
72%files
PavolVican384786e2017-07-12 15:31:20 +020073%defattr(-,root,root)
74%{_libdir}/libnetconf2.so.*
75
76%files devel
77%defattr(-,root,root)
78%{_libdir}/libnetconf2.so
79%{_libdir}/pkgconfig/libnetconf2.pc
80%{_includedir}/libnetconf2/*
81%{_includedir}/nc_client.h
82%{_includedir}/nc_server.h
83%dir %{_includedir}/libnetconf2/
84
PavolVican384786e2017-07-12 15:31:20 +020085%changelog