diff --git a/0001-opencsd-build-shared-libraries-should-have-x-set.patch b/0001-opencsd-build-shared-libraries-should-have-x-set.patch new file mode 100644 index 0000000..a4d1418 --- /dev/null +++ b/0001-opencsd-build-shared-libraries-should-have-x-set.patch @@ -0,0 +1,37 @@ +From 52160df30b3e785d0904ca4380b298e39eded5bb Mon Sep 17 00:00:00 2001 +From: Jeremy Linton +Date: Mon, 6 Jul 2020 18:28:43 -0500 +Subject: [PATCH] opencsd: build: shared libraries should have +x set + +The default install target is installing the .so files +with owner rw, and r for group and owner. This causes ldd +and various packaging utilities to misunderstand that +this is a shared library. + +Signed-off-by: Jeremy Linton +--- + decoder/build/linux/makefile | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/decoder/build/linux/makefile b/decoder/build/linux/makefile +index 659cf68..05653d5 100644 +--- a/decoder/build/linux/makefile ++++ b/decoder/build/linux/makefile +@@ -118,12 +118,10 @@ install: libs tests + mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_BIN_DIR) + cp -d $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so $(INSTALL_LIB_DIR)/ + cp -d $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_MAJOR_VER) $(INSTALL_LIB_DIR)/ +- $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/ ++ $(INSTALL) --mode=755 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/ + cp -d $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so $(INSTALL_LIB_DIR)/ + cp -d $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_MAJOR_VER) $(INSTALL_LIB_DIR)/ +- $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/ +- $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).a $(INSTALL_LIB_DIR)/ +- $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).a $(INSTALL_LIB_DIR)/ ++ $(INSTALL) --mode=755 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/ + cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make install_inc + $(INSTALL) --mode=755 $(BIN_TEST_TARGET_DIR)/trc_pkt_lister $(INSTALL_BIN_DIR)/ + +-- +2.27.0 + diff --git a/opencsd.spec b/opencsd.spec new file mode 100644 index 0000000..53bc0e0 --- /dev/null +++ b/opencsd.spec @@ -0,0 +1,64 @@ +%global opencsd_tag 3fc611aa5d3c9d6a40a88332903cf4230da74ad3 + +Name: opencsd +Version: 0.14.1 +Release: 1%{?dist} +Summary: An open source CoreSight(tm) Trace Decode library + +License: BSD +URL: https://github.com/Linaro/OpenCSD +Source0: https://github.com/Linaro/OpenCSD/archive/%{opencsd_tag}.tar.gz +Patch0: 0001-opencsd-build-shared-libraries-should-have-x-set.patch + +BuildRequires: patch +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: make + +%description +This library provides an API suitable for the decode of ARM(r) +CoreSight(tm) trace streams. + +%package devel +Summary: Development files for the CoreSight(tm) Trace Decode library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +The opencsd-devel package contains headers and libraries needed +to develop CoreSight(tm) trace decoders. + +%prep +%setup -q -n OpenCSD-%{opencsd_tag} +%patch0 -p1 + +%build +cd decoder/build/linux +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +LIB_PATH=%{_lib} make %{?_smp_mflags} + + +%install +cd decoder/build/linux +PREFIX=%{buildroot}%{_prefix} LIB_PATH=%{_lib} make install + + +%check +# no upstream unit tests yet + +%files +%license LICENSE +%doc HOWTO.md README.md +%{_libdir}/*so\.* +%{_bindir}/* + +%files devel +%doc decoder/docs/prog_guide/* +%{_includedir}/* +# no man files.. +%{_libdir}/*so + +#------------------------------------------------------------------------------ +%changelog +* Wed Jul 08 2020 Jeremy Linton - 0.14.1-1 +- First opencsd package