blob: 9a8ad98dbf5b754bdb990cd1d1a41c8ca9546e27 [file] [log] [blame]
PavolVican8fbbbdc2017-03-25 00:55:44 +01001Name: @PACKAGE_NAME@
2Version: @LIBYANG_VERSION@
3Release: 0
4Summary: Libyang library
5Url: https://github.com/CESNET/libyang
6Source: %{url}/archive/@BRANCH@.tar.gz
7License: BSD-3-Clause
PavolVican80f962b2017-05-29 16:40:16 +02008BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
PavolVican8fbbbdc2017-03-25 00:55:44 +01009
PavolVican80f962b2017-05-29 16:40:16 +020010Requires: pcre
PavolVican8fbbbdc2017-03-25 00:55:44 +010011BuildRequires: cmake
12BuildRequires: doxygen
PavolVican80f962b2017-05-29 16:40:16 +020013BuildRequires: pcre-devel
PavolVican8fbbbdc2017-03-25 00:55:44 +010014BuildRequires: valgrind
PavolVican80f962b2017-05-29 16:40:16 +020015BuildRequires: libcmocka-devel
PavolVican5fd74d92017-06-08 09:38:39 +020016BuildRequires: gcc
PavolVican8fbbbdc2017-03-25 00:55:44 +010017
PavolVican80f962b2017-05-29 16:40:16 +020018Conflicts: @CONFLICT_PACKAGE_NAME@ = @LIBYANG_MAJOR_VERSION@.@LIBYANG_MINOR_VERSION@
PavolVican8fbbbdc2017-03-25 00:55:44 +010019
20%package devel
21Summary: Headers of libyang library
22Requires: %{name} = %{version}-%{release}
PavolVican80f962b2017-05-29 16:40:16 +020023Requires: pcre-devel
PavolVican8fbbbdc2017-03-25 00:55:44 +010024
25%description devel
26Headers of libyang library.
27
28%description
29Libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
30
31%prep
32%setup -n libyang-@BRANCH@
33
PavolVican8fbbbdc2017-03-25 00:55:44 +010034%build
35cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="@BUILD_TYPE@" .
36make
37
38%check
PavolVican93d80d12017-06-07 15:18:01 +020039ctest --output-on-failure
PavolVican8fbbbdc2017-03-25 00:55:44 +010040
41%install
42make DESTDIR=%{buildroot} install
PavolVican8fbbbdc2017-03-25 00:55:44 +010043
44%post -p /sbin/ldconfig
45
46%postun -p /sbin/ldconfig
47
48%files
PavolVican80f962b2017-05-29 16:40:16 +020049%defattr(-,root,root)
50%{_bindir}/yanglint
Radek Krejci9d4bb982017-07-12 15:20:34 +020051%{_bindir}/yangre
PavolVican80f962b2017-05-29 16:40:16 +020052%{_datadir}/man/man1/yanglint.1.gz
PavolVican8fbbbdc2017-03-25 00:55:44 +010053%{_libdir}/libyang.so.*
54%{_libdir}/libyang/nacm.so
PavolVican8fbbbdc2017-03-25 00:55:44 +010055%{_libdir}/libyang/metadata.so
PavolVican80f962b2017-05-29 16:40:16 +020056%dir %{_libdir}/libyang/
PavolVican8fbbbdc2017-03-25 00:55:44 +010057
58%files devel
PavolVican80f962b2017-05-29 16:40:16 +020059%defattr(-,root,root)
PavolVican8fbbbdc2017-03-25 00:55:44 +010060%{_libdir}/libyang.so
61%{_libdir}/pkgconfig/libyang.pc
62%{_includedir}/libyang/*
PavolVican80f962b2017-05-29 16:40:16 +020063%dir %{_includedir}/libyang/
64
65%changelog