Browse Source

drpm package creation

Signed-off-by: basebuilder_pel7ppc64lebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64lebuilder0 5 years ago
parent
commit
ec338c6423
  1. 39
      SOURCES/drpm-0.3.0-workaround-ppc64le-gcc.patch
  2. 80
      SPECS/drpm.spec

39
SOURCES/drpm-0.3.0-workaround-ppc64le-gcc.patch

@ -0,0 +1,39 @@
diff -up drpm-0.3.0/CMakeLists.txt.than drpm-0.3.0/CMakeLists.txt
diff -up drpm-0.3.0/src/CMakeLists.txt.than drpm-0.3.0/src/CMakeLists.txt
--- drpm-0.3.0/src/CMakeLists.txt.than 2017-03-23 13:32:42.043858861 -0400
+++ drpm-0.3.0/src/CMakeLists.txt 2017-03-23 13:33:07.444304342 -0400
@@ -16,7 +16,7 @@ configure_file(config.h.in ${CMAKE_BINAR
add_library(drpm SHARED ${DRPM_SOURCES})
set_source_files_properties(${DRPM_SOURCES} PROPERTIES
- COMPILE_FLAGS "-std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
+ COMPILE_FLAGS "-std=c99 -fno-builtin-strcmp -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
)
target_link_libraries(drpm ${DRPM_LINK_LIBRARIES})
diff -up drpm-0.3.0/test/CMakeLists.txt.than drpm-0.3.0/test/CMakeLists.txt
--- drpm-0.3.0/test/CMakeLists.txt.than 2017-03-23 13:38:06.729554341 -0400
+++ drpm-0.3.0/test/CMakeLists.txt 2017-03-23 13:38:42.840187780 -0400
@@ -33,7 +33,7 @@ endif()
add_executable(drpm_api_tests ${DRPM_TEST_SOURCES})
set_source_files_properties(${DRPM_TEST_SOURCES} PROPERTIES
- COMPILE_FLAGS "-std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
+ COMPILE_FLAGS "-std=c99 -fno-builtin-strcmp -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
)
target_link_libraries(drpm_api_tests ${DRPM_LINK_LIBRARIES} ${CMOCKA_LIBRARIES})
@@ -52,13 +52,3 @@ if (BASH_PROGRAM)
)
set_tests_properties(drpm_cmp_files PROPERTIES DEPENDS drpm_api_tests)
endif()
-
-
-if (VALGRIND_PROGRAM)
- add_test(
- NAME drpm_memcheck
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND valgrind ${DRPM_TEST_ARGS_VALGRIND} ./drpm_api_tests
- )
-endif()
-

80
SPECS/drpm.spec

@ -0,0 +1,80 @@
Name: drpm
Version: 0.5.0
Release: 1%{?dist}
Summary: A library for making, reading and applying deltarpm packages
# the entire source code is LGPLv2+, except src/drpm_diff.c and src/drpm_search.c which are BSD
License: LGPLv2+ and BSD
URL: https://github.com/rpm-software-management/%{name}
Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.bz2
# add workaround for gcc7 on ppc64le temporary before it's fixed in gcc
# https://bugzilla.redhat.com/show_bug.cgi?id=1420350
Patch1: drpm-0.3.0-workaround-ppc64le-gcc.patch
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.8.5
BuildRequires: gcc
BuildRequires: rpm-devel
BuildRequires: openssl-devel
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: xz-devel
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig
BuildRequires: doxygen
BuildRequires: libcmocka-devel >= 1.0
BuildRequires: valgrind


%description
The drpm package provides a library for making, reading and applying deltarpms,
compatible with the original deltarpm packages.


%package devel
Summary: C interface for the drpm library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The drpm-devel package provides a C interface (drpm.h) for the drpm library.


%prep
%autosetup -p1
mkdir build


%build
pushd build
%cmake .. -DWITH_ZSTD:BOOL=ON -DHAVE_LZLIB_DEVEL:BOOL=OFF
%make_build
make doc
popd


%install
pushd build
%make_install
popd


%check
pushd build
ctest -VV
popd


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files
%{_libdir}/lib%{name}.so.*
%license COPYING LICENSE.BSD


%files devel
%doc build/doc/html/
%{_libdir}/lib%{name}.so
%{_includedir}/%{name}.h
%{_libdir}/pkgconfig/%{name}.pc


%changelog
Loading…
Cancel
Save