Blame SPECS/libyang.spec

44b5c0
# valgrind finds invalid writes in libcmocka on arm
44b5c0
# see bug #1699304 for more information
44b5c0
%ifarch %arm ppc64le
44b5c0
%global run_valgrind_tests OFF
44b5c0
%else
44b5c0
%global run_valgrind_tests ON
44b5c0
%endif
44b5c0
44b5c0
Name: libyang
44b5c0
Version: 1.0.184
44b5c0
Release: 1%{?dist}
44b5c0
Summary: YANG data modeling language library
44b5c0
Url: https://github.com/CESNET/libyang
44b5c0
Source: %{url}/archive/libyang-%{version}.tar.gz
44b5c0
License: BSD
44b5c0
44b5c0
Requires:  pcre
44b5c0
BuildRequires:  cmake
44b5c0
BuildRequires:  doxygen
44b5c0
BuildRequires:  pcre-devel
44b5c0
BuildRequires:  gcc
44b5c0
BuildRequires:  valgrind
44b5c0
BuildRequires:  gcc-c++
44b5c0
BuildRequires:  swig >= 3.0.12
44b5c0
BuildRequires:  libcmocka-devel
44b5c0
BuildRequires:  python3-devel
44b5c0
BuildRequires:  flex
44b5c0
BuildRequires:  bison
44b5c0
BuildRequires:  graphviz
44b5c0
44b5c0
%package devel
44b5c0
Summary:    Development files for libyang
44b5c0
Requires:   %{name}%{?_isa} = %{version}-%{release}
44b5c0
Requires:   pcre-devel
44b5c0
44b5c0
%package devel-doc
44b5c0
Summary:    Documentation of libyang API
44b5c0
Requires:   %{name} = %{version}-%{release}
44b5c0
BuildArch:  noarch
44b5c0
44b5c0
%package -n libyang-cpp
44b5c0
Summary:    C++ bindings for libyang
44b5c0
Requires:   %{name}%{?_isa} = %{version}-%{release}
44b5c0
44b5c0
%package -n libyang-cpp-devel
44b5c0
Summary:    Development files for libyang-cpp
44b5c0
Requires:   libyang-cpp%{?_isa} = %{version}-%{release}
44b5c0
Requires:   pcre-devel
44b5c0
44b5c0
%package -n python3-libyang
44b5c0
Summary:    Python3 bindings for libyang
44b5c0
Requires:   libyang-cpp%{?_isa} = %{version}-%{release}
44b5c0
%{?python_provide:%python_provide python3-libyang}
44b5c0
44b5c0
%description -n libyang-cpp
44b5c0
Bindings of libyang library to C++ language.
44b5c0
44b5c0
%description -n libyang-cpp-devel
44b5c0
Headers of bindings to c++ language.
44b5c0
44b5c0
%description -n python3-libyang
44b5c0
Bindings of libyang library to python language.
44b5c0
44b5c0
%description devel
44b5c0
Headers of libyang library.
44b5c0
44b5c0
%description devel-doc
44b5c0
Documentation of libyang API.
44b5c0
44b5c0
%description
44b5c0
Libyang is YANG data modeling language parser and toolkit
44b5c0
written (and providing API) in C.
44b5c0
44b5c0
%prep
44b5c0
%autosetup -S git
44b5c0
mkdir build
44b5c0
44b5c0
%build
44b5c0
cd build
44b5c0
%cmake \
44b5c0
   %{?_smp_mflags} \
44b5c0
   -DCMAKE_INSTALL_PREFIX:PATH=/usr \
44b5c0
   -DCMAKE_BUILD_TYPE:String="Package" \
44b5c0
   -DENABLE_LYD_PRIV=ON \
44b5c0
   -DGEN_JAVA_BINDINGS=OFF \
44b5c0
   -DGEN_JAVASCRIPT_BINDINGS=OFF \
44b5c0
   -DGEN_LANGUAGE_BINDINGS=ON \
44b5c0
   -DENABLE_VALGRIND_TESTS=%{run_valgrind_tests} ..
44b5c0
%make_build
44b5c0
make doc
44b5c0
44b5c0
%check
44b5c0
cd build
44b5c0
ctest --output-on-failure -V %{?_smp_mflags}
44b5c0
44b5c0
%install
44b5c0
pushd build
44b5c0
%make_install DESTDIR=%{buildroot}
44b5c0
popd
44b5c0
mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang
44b5c0
cp -r doc/html %{buildroot}/%{_docdir}/libyang/html
44b5c0
44b5c0
%files
44b5c0
%license LICENSE
44b5c0
%{_bindir}/yanglint
44b5c0
%{_bindir}/yangre
44b5c0
%{_datadir}/man/man1/yanglint.1.gz
44b5c0
%{_datadir}/man/man1/yangre.1.gz
44b5c0
%{_libdir}/libyang.so.*
44b5c0
%{_libdir}/libyang1
44b5c0
44b5c0
%files devel
44b5c0
%{_libdir}/libyang.so
44b5c0
%{_libdir}/pkgconfig/libyang.pc
44b5c0
%{_includedir}/libyang/*.h
44b5c0
%dir %{_includedir}/libyang/
44b5c0
44b5c0
%files devel-doc
44b5c0
%{_docdir}/libyang
44b5c0
44b5c0
%files -n libyang-cpp
44b5c0
%{_libdir}/libyang-cpp.so.*
44b5c0
44b5c0
%files -n libyang-cpp-devel
44b5c0
%{_libdir}/libyang-cpp.so
44b5c0
%{_includedir}/libyang/*.hpp
44b5c0
%{_libdir}/pkgconfig/libyang-cpp.pc
44b5c0
%dir %{_includedir}/libyang/
44b5c0
44b5c0
%files -n python3-libyang
44b5c0
%{python3_sitearch}/yang.py
44b5c0
%{python3_sitearch}/_yang.so
44b5c0
%{python3_sitearch}/__pycache__/yang*
44b5c0
44b5c0
%changelog
44b5c0
* Thu Jan 07 2021 Michal Ruprich <mruprich@redhat.com> - 1.0.184-1
44b5c0
- Resolves: #1910046 - [RFE] Rebase libyang to 1.0.184
44b5c0
44b5c0
* Mon Dec 16 2019 Michal Ruprich <mruprich@redhat.com> - 0.16.105-5
44b5c0
- Related: #1780311 - Fixing a few covscan issues
44b5c0
44b5c0
* Tue Dec 10 2019 Michal Ruprich <mruprich@redhat.com> - 0.16.105-4
44b5c0
- Resolves: #1780311 - CVE-2019-19333 libyang: stack-based buffer overflow in make_canonical when bits leaf type is used
44b5c0
- Resolves: #1780313 - CVE-2019-19334 libyang: stack-based buffer overflow in make_canonical when identityref leaf type is used
44b5c0
44b5c0
* Mon May 27 2019 Michal Ruprich <mruprich@redhat.com> - 0.16.105-3
44b5c0
- Related: #1698076 - Adding gating file
44b5c0
44b5c0
* Tue May 14 2019 Michal Ruprich <mruprich@redhat.com> - 0.16.105-2
44b5c0
- Related: #1698076 - turning off valgrind on tests on ppc64le
44b5c0
44b5c0
* Mon May 13 2019 Michal Ruprich <mruprich@redhat.com> - 0.16.105-1
44b5c0
- Resolves: #1698076 - [RFE] Add libyang package as a build-time dependency for FRR
44b5c0
44b5c0
* Fri Apr 26 2019 Tomas Korbar <tkorbar@redhat.com> - 0.16.105-1
44b5c0
- Change specfile accordingly to mosvald's review
44b5c0
- Remove obsolete ldconfig scriptlets
44b5c0
- libyang-devel-doc changed to noarch package
44b5c0
- Add python_provide macro to python3-libyang subpackage
44b5c0
- Remove obsolete Requires from libyang-cpp-devel
44b5c0
- Start using cmake with smp_mflags macro
44b5c0
44b5c0
* Wed Apr 03 2019 Tomas Korbar <tkorbar@redhat.com> - 0.16.105-1
44b5c0
- Initial commit of package after editation of specfile