diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:23:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:23:18 +0000 |
commit | 16527d165de55f2727f55b752b30d44a7e61e927 (patch) | |
tree | 0840ee6e0e109a9e85f0d80ff36f92587c6a5538 /distro/pkg/rpm/libyang.spec | |
parent | Releasing progress-linux version 2.1.30-2.1~progress7.99u1. (diff) | |
download | libyang2-16527d165de55f2727f55b752b30d44a7e61e927.tar.xz libyang2-16527d165de55f2727f55b752b30d44a7e61e927.zip |
Merging upstream version 2.1.148.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | distro/pkg/rpm/libyang.spec | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/distro/pkg/rpm/libyang.spec b/distro/pkg/rpm/libyang.spec index 374fc4e..f57ef91 100644 --- a/distro/pkg/rpm/libyang.spec +++ b/distro/pkg/rpm/libyang.spec @@ -1,3 +1,7 @@ +%if 0%{?rhel} == 8 +%undefine __cmake_in_source_build +%endif + Name: libyang Version: {{ version }} Release: {{ release }}%{?dist} @@ -43,27 +47,46 @@ written (and providing API) in C. %prep %autosetup -p1 +%if 0%{?rhel} && 0%{?rhel} < 8 + mkdir build +%endif %build -%cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -%cmake_build - -%if "x%{?suse_version}" == "x" -cd redhat-linux-build +%if 0%{?rhel} && 0%{?rhel} < 8 + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ + -DCMAKE_BUILD_TYPE:String="Release" \ + -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ + .. + make +%else + %cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO + %cmake_build + %if "x%{?suse_version}" == "x" + cd %{__cmake_builddir} + %endif %endif make doc %check -%if "x%{?suse_version}" == "x" -cd redhat-linux-build +%if ( 0%{?rhel} == 0 ) || 0%{?rhel} > 7 + %if "x%{?suse_version}" == "x" + cd %{__cmake_builddir} + %endif %endif ctest --output-on-failure -V %{?_smp_mflags} %install -%cmake_install - mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang -cp -a doc/html %{buildroot}/%{_docdir}/libyang/html +%if 0%{?rhel} && 0%{?rhel} < 8 + cd build + make DESTDIR=%{buildroot} install +%else + %cmake_install + cp -a doc/html %{buildroot}/%{_docdir}/libyang/html +%endif %files %license LICENSE |