From 8ec6ad22e5155d5dd55cc2256bdf1dd46aa8c281 Mon Sep 17 00:00:00 2001 From: laokz Date: Fri, 3 Mar 2023 20:36:55 +0800 Subject: [PATCH] fix build error for loongarch64 and riscv64 Enable %check --- fix-build-error-for-loongarch64-and-riscv64.patch | 11 +++++++++++ isomd5sum.spec | 12 ++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 fix-build-error-for-loongarch64-and-riscv64.patch diff --git a/fix-build-error-for-loongarch64-and-riscv64.patch b/fix-build-error-for-loongarch64-and-riscv64.patch new file mode 100644 index 0000000..4aac88c --- /dev/null +++ b/fix-build-error-for-loongarch64-and-riscv64.patch @@ -0,0 +1,11 @@ +--- isomd5sum-1.2.3/Makefile 2018-04-11 01:30:32.000000000 +0800 ++++ isomd5sum-1.2.3/Makefile.new 2023-02-18 19:45:13.543992122 +0800 +@@ -4,7 +4,7 @@ + + VERSION=1.2.3 + +-ifneq (,$(filter sparc64 ppc64 ppc64le x86_64 s390x aarch64,$(shell uname -m))) ++ifneq (,$(filter sparc64 ppc64 ppc64le x86_64 s390x aarch64 loongarch64 riscv64,$(shell uname -m))) + LIBDIR = lib64 + else + LIBDIR = lib diff --git a/isomd5sum.spec b/isomd5sum.spec index 28efdc9..ba7b778 100644 --- a/isomd5sum.spec +++ b/isomd5sum.spec @@ -1,18 +1,19 @@ Name: isomd5sum Version: 1.2.3 -Release: 6 +Release: 7 Epoch: 1 Summary: Utilities for working with md5sum implanted in ISO images License: GPLv2+ URL: https://github.com/rhinstaller/isomd5sum Source0: https://github.com/rhinstaller/%{name}/archive/%{version}.tar.gz +Patch1: fix-build-error-for-loongarch64-and-riscv64.patch %global common_description %{expand: isomd5sum provides a way of making use of the ISO9660 application data area to store md5sum data about the iso. This allows you to check the iso given nothing more than the iso itself.} -BuildRequires: gcc popt-devel python3-devel +BuildRequires: gcc popt-devel python3-devel genisoimage %description %{common_description} @@ -46,6 +47,9 @@ PYTHON=%{__python3} make checkisomd5 implantisomd5 pyisomd5sum.so %install PYTHON=%{__python3} make DESTDIR=%{buildroot} install-bin install-devel install-python +%check +make test + %files %license COPYING %{_bindir}/* @@ -62,6 +66,10 @@ PYTHON=%{__python3} make DESTDIR=%{buildroot} install-bin install-devel install- %{_mandir}/man1/* %changelog +* Mon Mar 06 2023 laokz - 1:1.2.3-7 +- fix build error for loongarch64(PR#9) and riscv64 +- add %check + * Wed Oct 19 2022 zhangruifang - 1:1.2.3-6 - remove redundant macros -- Gitee