Skip to content

Commit 5ad8c01

Browse files
committed
build BUGFIX package build issues
Also a link for packages in the README added.
1 parent 8bced38 commit 5ad8c01

File tree

4 files changed

+14
-43
lines changed

4 files changed

+14
-43
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ and it occurs on the `master` branch, the **first response will likely be** to u
3939

4040
## Packages
4141

42-
We are using openSUSE Build Service to automaticaly prepare binary packages for number of GNU/Linux distros. Check
43-
[this](https://software.opensuse.org//download.html?project=home%3Aliberouter&package=libyang) page and follow the
44-
instructions for your distro to install `libyang` package. The `libyang` package is built once a day from the
45-
master branch. If you want the latest code from the devel branch, install `libyang-experimental` package.
42+
We are using openSUSE Build Service to automaticaly prepare binary packages for number of GNU/Linux distros.
43+
There are [libyang](https://software.opensuse.org//download.html?project=home%3Aliberouter&package=libyang)
44+
packages from current `master` branch (latest release) and
45+
[libyang-experimental](https://software.opensuse.org/download/package?package=libyang-experimental&project=home%3Aliberouter)
46+
from the `devel` branch. Both packages are build once per day.
4647

4748
## Requirements
4849

packages/create-package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ if [ "$VERSION" != "$OLDVERSION" ]; then
4141
git log --since="$logtime" --pretty=format:" * %s (%aN)%n" | grep "BUGFIX\|CHANGE\|FEATURE" >>debian.changelog
4242
git log -1 --pretty=format:"%n -- %aN <%aE> %aD%n" >>debian.changelog
4343
echo -e "\n" >>debian.changelog
44+
cat ../debian.changelog >>debian.changelog
4445
fi
45-
cat ../debian.changelog >>debian.changelog
4646

4747
if [ "$VERSION" != "$OLDVERSION" ]; then
4848
git log -1 --date=format:'%a %b %d %Y' --pretty=format:"* %ad %aN <%aE>" | tr -d "\n" >>libyang.spec

packages/debian.rules.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ override_dh_strip:
1212
dh_strip -ppython3-yang@PACKAGE_PART_NAME@ --dbg-package=python3-yang@PACKAGE_PART_NAME@-dbg
1313

1414
override_dh_auto_configure:
15-
mkdir build
16-
cd build
17-
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String="@BUILD_TYPE@" -DGEN_LANGUAGE_BINDINGS=ON ..
15+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_INSRC_BUILD=ON -DCMAKE_BUILD_TYPE="@BUILD_TYPE@" -DENABLE_LYD_PRIV=ON \
16+
-DGEN_LANGUAGE_BINDINGS=ON .
1817

1918
override_dh_auto_test:
2019
ctest --output-on-failure

packages/libyang.spec.in

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
1414
%define with_lang_bind 1
1515
%endif
1616

17-
%if 0%{?rhel} && 0%{?rhel} < 7
18-
# CentOS/RedHat before 7.0 contains old pcre without pcre_free_study().
19-
# With cache disabled, this isn't needed
20-
%define with_enable_cache 0
21-
# CentOS/RedHat before 7.0 contains old valgrind which can't run
22-
# valgrind tests. Disable them
23-
%define with_valgrind 0
24-
%else
25-
%define with_enable_cache 1
26-
%define with_valgrind 1
27-
%endif
28-
2917
Requires: pcre
3018
BuildRequires: cmake
3119
BuildRequires: doxygen
3220
BuildRequires: pcre-devel
3321
BuildRequires: gcc
3422

35-
%if %{with_valgrind}
36-
BuildRequires: valgrind
37-
%endif
38-
3923
%if %{with_lang_bind}
4024
BuildRequires: gcc-c++
4125
BuildRequires: swig >= 3.0.12
@@ -44,12 +28,9 @@ BuildRequires: libcmocka-devel
4428
%if 0%{?suse_version} + 0%{?fedora} > 0
4529
BuildRequires: python3-devel
4630
%else
47-
%if 0%{?rhel} && 0%{?rhel} > 7
4831
BuildRequires: python36-devel
49-
%else
50-
BuildRequires: python34-devel
51-
%endif
5232
%endif
33+
5334
%endif
5435

5536
Conflicts: @CONFLICT_PACKAGE_NAME@ = @LIBYANG_MAJOR_VERSION@.@LIBYANG_MINOR_VERSION@
@@ -101,22 +82,12 @@ cd build
10182
%else
10283
%define cmake_lang_bind "-DGEN_LANGUAGE_BINDINGS=OFF"
10384
%endif
104-
%if %{with_enable_cache}
105-
%define cmake_enable_cache ""
106-
%else
107-
%define cmake_enable_cache "-DENABLE_CACHE=OFF"
108-
%endif
109-
%if %{with_valgrind}
110-
%define cmake_valgrind ""
111-
%else
112-
%define cmake_valgrind "-DENABLE_VALGRIND_TESTS=OFF"
113-
%endif
11485
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
11586
-DCMAKE_BUILD_TYPE:String="@BUILD_TYPE@" \
11687
-DENABLE_LYD_PRIV=ON \
11788
-DGEN_JAVA_BINDINGS=OFF \
11889
-DGEN_JAVASCRIPT_BINDINGS=OFF \
119-
%{cmake_valgrind} %{cmake_lang_bind} %{cmake_enable_cache} ..
90+
%{cmake_lang_bind} ..
12091
make
12192

12293
%check
@@ -129,13 +100,13 @@ make DESTDIR=%{buildroot} install
129100

130101
%post -p /sbin/ldconfig
131102
%if %{with_lang_bind}
132-
%post -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig
133-
%endif
103+
%post -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig
104+
%endif
134105

135106
%postun -p /sbin/ldconfig
136107
%if %{with_lang_bind}
137-
%postun -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig
138-
%endif
108+
%postun -n libyang-cpp@PACKAGE_PART_NAME@ -p /sbin/ldconfig
109+
%endif
139110

140111
%files
141112
%defattr(-,root,root)

0 commit comments

Comments
 (0)