aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-10-29 22:54:10 +0100
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-10-29 23:10:15 +0100
commitede9e9aa00e5b58c5bfe9c8abf48b449c75fe35a (patch)
treeda02fcc9e93a34b9a214fcf14eb5c5b09b928ee6
parent228927bcc0931c8e5279bc10a649cb59d18575a5 (diff)
downloadlibrb-ede9e9aa00e5b58c5bfe9c8abf48b449c75fe35a.tar.gz
librb-ede9e9aa00e5b58c5bfe9c8abf48b449c75fe35a.tar.bz2
librb-ede9e9aa00e5b58c5bfe9c8abf48b449c75fe35a.zip
add debug package in rpm spec, to build debygsymbols on opensuse
no_buildbot
-rw-r--r--pkg/rpm/create-pkg.sh9
-rw-r--r--pkg/rpm/librb.spec.template7
2 files changed, 16 insertions, 0 deletions
diff --git a/pkg/rpm/create-pkg.sh b/pkg/rpm/create-pkg.sh
index 58d91fa..e49f1a2 100644
--- a/pkg/rpm/create-pkg.sh
+++ b/pkg/rpm/create-pkg.sh
@@ -42,6 +42,15 @@ sed -i "s/@{GIT_VERSION}/${git_version}/" SPECS/${project}-${pkg_version}.spec
sed -i "s/@{LIB_VERSION}/${lib_version}/" SPECS/${project}-${pkg_version}.spec
sed -i "s/@{ABI_VERSION}/${abi_version}/" SPECS/${project}-${pkg_version}.spec
+
+if cat /etc/os-release | grep "NAME=openSUSE Leap"
+then
+ # opensuse doesn't generate debug symbols by defaul, check spec file
+ # for comment
+ sed -i 's/# __DEBUG_PACKAGE_/%debug_package/' \
+ SPECS/${project}-${pkg_version}.spec
+fi
+
rpmbuild -ba SPECS/${project}-${pkg_version}.spec || exit 1
###
diff --git a/pkg/rpm/librb.spec.template b/pkg/rpm/librb.spec.template
index 57fe06e..8ae2eec 100644
--- a/pkg/rpm/librb.spec.template
+++ b/pkg/rpm/librb.spec.template
@@ -31,6 +31,13 @@ librb development package containing headers and manuals
%prep
%setup -q -n librb-@{GIT_VERSION}
+# debug packge macro, it is commented by default as rhel and centos
+# automatically build debug package, but open suse does not. Change it to
+# "@debug_package" (just change that @ to percent %% character)
+# when debug symbols are not automatically installed
+
+# __DEBUG_PACKAGE__
+
%build
./autogen.sh
%configure