From 1363afa0435877c73139614598f64444b5b453ec Mon Sep 17 00:00:00 2001 From: hongrongxuan <389817374@qq.com> Date: Mon, 5 Sep 2022 15:35:13 +0800 Subject: [PATCH 1/2] support debug package --- 0001-add-g-option-to-compile-the-code.patch | 36 +++++++++++++++++++++ astream.spec | 15 +++++---- 2 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 0001-add-g-option-to-compile-the-code.patch diff --git a/0001-add-g-option-to-compile-the-code.patch b/0001-add-g-option-to-compile-the-code.patch new file mode 100644 index 0000000..b3f614c --- /dev/null +++ b/0001-add-g-option-to-compile-the-code.patch @@ -0,0 +1,36 @@ +From 04743b469ff68fe20ec15262458325bf9406d387 Mon Sep 17 00:00:00 2001 +From: hongrongxuan <389817374@qq.com> +Date: Fri, 2 Sep 2022 20:20:20 +0800 +Subject: [PATCH] add -g option to compile the code + +--- + src/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 854993d..0f87943 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -4,10 +4,10 @@ PREFIX=/usr + BINDIR=$(PREFIX)/bin + + astream : astream.c astream.h astream_log.o +- cc -Wall -o astream astream.c astream_log.o ++ cc -g -Wall -o astream astream.c astream_log.o + + astream_log.o : astream_log.c astream_log.h +- cc -Wall -c astream_log.c ++ cc -g -Wall -c astream_log.c + + install: + install -d $(DESTDIR)$(BINDIR) +@@ -16,4 +16,4 @@ install: + uninstall: + rm -f $(DESTDIR)$(BINDIR)/$(PROG) + clean: +- rm -f astream astream.o astream_log.o +\ No newline at end of file ++ rm -f astream astream.o astream_log.o +-- +2.35.1.windows.2 + diff --git a/astream.spec b/astream.spec index ac62939..3b8f7ee 100644 --- a/astream.spec +++ b/astream.spec @@ -1,20 +1,18 @@ Name: astream Version: v1.0 -Release: 1 +Release: 2 Summary: an automatic multi-stream implementation tool for openEuler License: MulanPSL-2.0 URL: https://gitee.com/openeuler/astream - Source0: %{name}-%{version}.tar.gz +Patch0: 0001-add-g-option-to-compile-the-code.patch + %description astream is an automatic multi-stream implementation tool for openEuler -# skip debuginfo packages -%global debug_package %{nil} - %prep -%autosetup -n %{name}-%{version} +%autosetup -n %{name}-%{version} -p1 %build cd src @@ -30,7 +28,10 @@ cp src/astream %{buildroot}/%{_bindir} %doc README.md %changelog -* Mon Aug 29 2022 hongrongxuan <389817374@qq.com> - v1.0-1 +* Mon Sep 5 2022 hongrongxuan - v1.0-2 +- add -g option to compiler the code + +* Mon Aug 29 2022 hongrongxuan - v1.0-1 - Type:Init - ID:NA - SUG:NA From 57c19fd21abe330fb6e5bab72aed6bcce0f3b80c Mon Sep 17 00:00:00 2001 From: hongrongxuan <389817374@qq.com> Date: Mon, 5 Sep 2022 16:52:11 +0800 Subject: [PATCH 2/2] update the patch --- 0001-add-g-option-to-compile-the-code.patch | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/0001-add-g-option-to-compile-the-code.patch b/0001-add-g-option-to-compile-the-code.patch index b3f614c..9d64700 100644 --- a/0001-add-g-option-to-compile-the-code.patch +++ b/0001-add-g-option-to-compile-the-code.patch @@ -1,6 +1,6 @@ -From 04743b469ff68fe20ec15262458325bf9406d387 Mon Sep 17 00:00:00 2001 +From aa5bfaa117ebe48366e614177abeaddbeb1fb0c0 Mon Sep 17 00:00:00 2001 From: hongrongxuan <389817374@qq.com> -Date: Fri, 2 Sep 2022 20:20:20 +0800 +Date: Mon, 5 Sep 2022 16:50:52 +0800 Subject: [PATCH] add -g option to compile the code --- @@ -8,29 +8,29 @@ Subject: [PATCH] add -g option to compile the code 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 854993d..0f87943 100644 +index 1d9d63e..b1f20c0 100755 --- a/src/Makefile +++ b/src/Makefile @@ -4,10 +4,10 @@ PREFIX=/usr - BINDIR=$(PREFIX)/bin - - astream : astream.c astream.h astream_log.o -- cc -Wall -o astream astream.c astream_log.o -+ cc -g -Wall -o astream astream.c astream_log.o - - astream_log.o : astream_log.c astream_log.h -- cc -Wall -c astream_log.c -+ cc -g -Wall -c astream_log.c - - install: - install -d $(DESTDIR)$(BINDIR) + BINDIR=$(PREFIX)/bin + + astream : astream.c astream.h astream_log.o +- cc -Wall -o astream astream.c astream_log.o ++ cc -g -Wall -o astream astream.c astream_log.o + + astream_log.o : astream_log.c astream_log.h +- cc -Wall -c astream_log.c ++ cc -g -Wall -c astream_log.c + + install: + install -d $(DESTDIR)$(BINDIR) @@ -16,4 +16,4 @@ install: - uninstall: - rm -f $(DESTDIR)$(BINDIR)/$(PROG) - clean: + uninstall: + rm -f $(DESTDIR)$(BINDIR)/$(PROG) + clean: - rm -f astream astream.o astream_log.o \ No newline at end of file -+ rm -f astream astream.o astream_log.o ++ rm -f astream astream.o astream_log.o -- -2.35.1.windows.2 +2.36.1