bump to 0.0.4, address packaging review issues
This commit is contained in:
parent
581bde9d2c
commit
e47699ff65
@ -1,121 +1,30 @@
|
|||||||
diff -ru blisp-0.0.2/CMakeLists.txt blisp-0.0.2-b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
--- blisp-0.0.2/CMakeLists.txt 2023-01-12 05:49:04.000000000 -0500
|
index 693dc6b..2d4d7d8 100644
|
||||||
+++ blisp-0.0.2-b/CMakeLists.txt 2023-01-12 14:31:14.092073606 -0500
|
--- a/CMakeLists.txt
|
||||||
@@ -32,30 +32,19 @@
|
+++ b/CMakeLists.txt
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "static"
|
@@ -90,7 +90,17 @@ else()
|
||||||
OUTPUT_NAME "blisp")
|
endif()
|
||||||
|
|
||||||
-target_sources(libblisp_obj PRIVATE
|
|
||||||
- ${CMAKE_SOURCE_DIR}/vendor/libserialport/serialport.c
|
|
||||||
- ${CMAKE_SOURCE_DIR}/vendor/libserialport/timing.c)
|
|
||||||
-
|
|
||||||
-target_include_directories(libblisp_obj PRIVATE ${CMAKE_SOURCE_DIR}/vendor/libserialport)
|
|
||||||
-
|
|
||||||
if(WIN32)
|
|
||||||
target_link_libraries(libblisp PRIVATE Setupapi.lib)
|
|
||||||
target_link_libraries(libblisp_static PRIVATE Setupapi.lib)
|
|
||||||
target_compile_definitions(libblisp_obj PRIVATE LIBSERIALPORT_MSBUILD)
|
|
||||||
target_sources(libblisp_obj PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/vendor/libserialport/windows.c)
|
|
||||||
elseif(UNIX AND NOT APPLE)
|
|
||||||
- target_sources(libblisp_obj PRIVATE
|
|
||||||
- ${CMAKE_SOURCE_DIR}/vendor/libserialport/linux.c
|
|
||||||
- ${CMAKE_SOURCE_DIR}/vendor/libserialport/linux_termios.c)
|
|
||||||
- target_compile_definitions(libblisp_obj PRIVATE
|
|
||||||
- LIBSERIALPORT_ATBUILD
|
|
||||||
- HAVE_TERMIOS2_SPEED
|
|
||||||
- HAVE_STRUCT_TERMIOS2
|
|
||||||
- HAVE_DECL_BOTHER
|
|
||||||
- "SP_API=__attribute__((visibility(\"default\")))"
|
|
||||||
- "SP_PRIV=__attribute__((visibility(\"hidden\")))")
|
|
||||||
- write_file(${CMAKE_SOURCE_DIR}/vendor/libserialport/config.h "// bypass errors.")
|
|
||||||
+ find_package(PkgConfig)
|
|
||||||
+ pkg_check_modules(LIBSP REQUIRED libserialport>=0.1.1)
|
|
||||||
+
|
|
||||||
+ target_link_libraries(libblisp_obj PRIVATE ${LIBSP_LIBRARIES})
|
|
||||||
+ target_include_directories(libblisp_obj PRIVATE ${LIBSP_INCLUDE_DIRS})
|
|
||||||
+ target_compile_options(libblisp_obj PUBLIC ${LIBSP_CFLAGS_OTHER})
|
|
||||||
elseif(APPLE)
|
|
||||||
target_sources(libblisp_obj PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/vendor/libserialport/macosx.c)
|
|
||||||
@@ -67,6 +56,49 @@
|
|
||||||
write_file(${CMAKE_SOURCE_DIR}/vendor/libserialport/config.h "// bypass errors.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
+set(BLISP_PACKAGE_NAME Blisp)
|
-install(TARGETS libblisp libblisp_static DESTINATION lib)
|
||||||
+set(BLISP_VERSION 0.0.2)
|
|
||||||
+include(GNUInstallDirs)
|
+include(GNUInstallDirs)
|
||||||
+if(UNIX OR MSYS OR MINGW)
|
+install(TARGETS libblisp libblisp_static
|
||||||
+ set(BLISP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/blisp)
|
|
||||||
+elseif(WIN32)
|
|
||||||
+ set(BLISP_INSTALL_CMAKEDIR "cmake")
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
if(BLISP_BUILD_CLI)
|
|
||||||
add_subdirectory(tools/blisp)
|
|
||||||
+ install(TARGETS blisp
|
|
||||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
+ )
|
|
||||||
endif()
|
|
||||||
+
|
|
||||||
+install(TARGETS libblisp
|
|
||||||
+ EXPORT ${BLISP_PACKAGE_NAME}Config
|
|
||||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
+)
|
+)
|
||||||
+
|
+
|
||||||
+file(GLOB HEADER_FILES
|
+install(FILES ${BLISP_PUBLIC_HEADERS}
|
||||||
+ "${PROJECT_SOURCE_DIR}/include/*.h"
|
|
||||||
+ "${PROJECT_SOURCE_DIR}/data/*.h"
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+install(FILES ${HEADER_FILES}
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
+)
|
+)
|
||||||
+
|
|
||||||
+install(EXPORT ${BLISP_PACKAGE_NAME}Config
|
|
||||||
+ NAMESPACE ${BLISP_PROJECT_NAME}::
|
|
||||||
+ DESTINATION ${BLISP_INSTALL_CMAKEDIR}
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+include(CMakePackageConfigHelpers)
|
|
||||||
+write_basic_package_version_file("${PROJECT_BINARY_DIR}/${BLISP_PACKAGE_NAME}ConfigVersion.cmake"
|
|
||||||
+ VERSION ${BLISP_VERSION}
|
|
||||||
+ COMPATIBILITY SameMajorVersion
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+install(FILES "${PROJECT_BINARY_DIR}/${BLISP_PACKAGE_NAME}ConfigVersion.cmake"
|
|
||||||
+ DESTINATION ${BLISP_INSTALL_CMAKEDIR}
|
|
||||||
+)
|
|
||||||
--- blisp-0.0.2/tools/blisp/CMakeLists.txt 2023-01-12 05:49:04.000000000 -0500
|
|
||||||
+++ blisp-0.0.2-b/tools/blisp/CMakeLists.txt 2023-01-12 14:20:35.839890965 -0500
|
|
||||||
@@ -1,20 +1,21 @@
|
|
||||||
set(ARGTABLE3_ENABLE_TESTS OFF CACHE BOOL "Enable unit tests")
|
|
||||||
set(ARGTABLE3_ENABLE_EXAMPLES OFF CACHE BOOL "Enable examples")
|
|
||||||
#set(ARGTABLE3_REPLACE_GETOPT OFF CACHE BOOL "Replace getopt in the system C library")
|
|
||||||
-add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/argtable3 ${CMAKE_CURRENT_BINARY_DIR}/argtable3)
|
|
||||||
|
|
||||||
add_executable(blisp src/main.c src/cmd/write.c src/util.c src/common.c src/cmd/iot.c)
|
if(BLISP_BUILD_CLI)
|
||||||
|
add_subdirectory(tools/blisp)
|
||||||
|
@@ -99,4 +109,4 @@ endif()
|
||||||
|
|
||||||
-target_include_directories(blisp PRIVATE
|
if(COMPILE_TESTS)
|
||||||
- "${CMAKE_SOURCE_DIR}/include"
|
add_subdirectory(tools/blisp/src/cmd/dfu/tests)
|
||||||
- "${CMAKE_SOURCE_DIR}/vendor/argtable3/src")
|
-endif(COMPILE_TESTS)
|
||||||
+find_package(Argtable3 REQUIRED)
|
|
||||||
+target_include_directories(blisp PRIVATE
|
|
||||||
+ "${CMAKE_SOURCE_DIR}/include")
|
|
||||||
|
|
||||||
target_link_libraries(blisp PRIVATE
|
|
||||||
- argtable3
|
|
||||||
+ argtable3::argtable3
|
|
||||||
+ ${LIBSP_LIBRARIES}
|
|
||||||
libblisp_static)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
target_link_libraries(blisp PRIVATE Setupapi.lib)
|
|
||||||
elseif (APPLE)
|
|
||||||
target_link_libraries(blisp PRIVATE "-framework IOKit" "-framework CoreFoundation")
|
|
||||||
-endif ()
|
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+endif ()
|
+endif(COMPILE_TESTS)
|
||||||
+
|
|
||||||
|
46
blisp.spec
46
blisp.spec
@ -1,18 +1,25 @@
|
|||||||
Name: blisp
|
Name: blisp
|
||||||
Version: 0.0.3
|
Version: 0.0.4
|
||||||
Release: 0%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Bouffalo Labs ISP tool/library for flashing Bouffalo RISC-V MCUs
|
Summary: Bouffalo Labs ISP tool/library for flashing Bouffalo RISC-V MCUs
|
||||||
URL: https://github.com/pine64/blisp
|
URL: https://github.com/pine64/blisp
|
||||||
License: MIT, Apache
|
License: MIT, Apache-2.0
|
||||||
|
|
||||||
Source0: https://github.com/pine64/%{name}/archive/refs/tags/v%{version}.tar.gz
|
Source: https://github.com/pine64/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-Fix-cmake.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc cmake make
|
Patch: 0001-Fix-cmake.patch
|
||||||
BuildRequires: libserialport, libserialport-devel
|
|
||||||
BuildRequires: argtable3, argtable3-devel
|
|
||||||
|
|
||||||
Requires: libserialport, argtable3
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
BuildRequires: argtable3
|
||||||
|
BuildRequires: argtable3-devel
|
||||||
|
BuildRequires: libserialport
|
||||||
|
BuildRequires: libserialport-devel
|
||||||
|
|
||||||
|
Requires: argtable3
|
||||||
|
Requires: libserialport
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
Bouffalo Labs ISP tool & library
|
Bouffalo Labs ISP tool & library
|
||||||
@ -28,29 +35,38 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
Header and development files for using blisp
|
Header and development files for using blisp
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: Libraries for blisp
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
Shared libraries for blisp
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p 1 -n %{name}-%{version}
|
%autosetup -p 1 -n %{name}-%{version}
|
||||||
rm -rv vendor/
|
rm -rv vendor/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DBLISP_BUILD_CLI=ON
|
%cmake -DBLISP_BUILD_CLI=ON -DBLISP_USE_SYSTEM_LIBRARIES=ON -DCMAKE_INSTALL_LIBDIR=lib64
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/libblisp.so*
|
|
||||||
%{_bindir}/blisp
|
%{_bindir}/blisp
|
||||||
|
|
||||||
|
%files libs
|
||||||
|
%{_libdir}/libblisp.so*
|
||||||
|
%{_libdir}/libblisp.a
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/blisp*.h
|
%{_includedir}/blisp*.h
|
||||||
%{_includedir}/bl?0x_eflash_loader.h
|
|
||||||
%{_libdir}/cmake/blisp/*
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 07 2023 Neil Hanlon <neil@shrug.pw> - 0.0.4-1
|
||||||
|
- Update to upstream 0.0.4
|
||||||
|
|
||||||
* Thu Jan 26 2023 Neil Hanlon <neil@shrug.pw> - 0.0.3-0
|
* Thu Jan 26 2023 Neil Hanlon <neil@shrug.pw> - 0.0.3-0
|
||||||
- Update to upstream 0.0.3
|
- Update to upstream 0.0.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user