From ee6d157a7ad8ff968264e73b33162f00c887c29d Mon Sep 17 00:00:00 2001 From: z00507040 Date: Fri, 10 Jan 2020 11:37:48 +0800 Subject: [PATCH] clean unused patch --- zd1211-firmware-1.4-build__from_headers.patch | 158 ------------------ zd1211-firmware.spec | 11 +- 2 files changed, 6 insertions(+), 163 deletions(-) delete mode 100644 zd1211-firmware-1.4-build__from_headers.patch diff --git a/zd1211-firmware-1.4-build__from_headers.patch b/zd1211-firmware-1.4-build__from_headers.patch deleted file mode 100644 index 299cf7f..0000000 --- a/zd1211-firmware-1.4-build__from_headers.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -uNr zd1211-firmware/create_fw_files.c zd1211rw_fw_2007-03-19_snap/create_fw_files.c ---- zd1211-firmware/create_fw_files.c 1970-01-01 01:00:00.000000000 +0100 -+++ zd1211rw_fw_2007-03-19_snap/create_fw_files.c 2006-12-25 11:02:17.000000000 +0100 -@@ -0,0 +1,116 @@ -+#include -+#include -+#include -+#include -+ -+#define ZD1211 1 -+ -+const uint8_t ws11uph[] -+#include "WS11UPh.h" -+ -+const uint8_t ws11uphr[] -+#include "WS11UPhR.h" -+ -+const uint8_t ws11uphm[] -+#include "WS11UPhm.h" -+ -+const uint8_t ws11ub[] -+#include "WS11Ub.h" -+ -+const uint8_t ws11ur[] -+#include "WS11Ur.h" -+ -+#undef ZD1211 -+ -+#define ZD1211B 1 -+ -+const uint8_t zd1211b_ws11uph[] -+#include "WS11UPh.h" -+ -+const uint8_t zd1211b_ws11uphr[] -+#include "WS11UPhR.h" -+ -+const uint8_t zd1211b_ws11uphm[] -+#include "WS11UPhm.h" -+ -+const uint8_t zd1211b_ws11ub[] -+#include "WS11Ub.h" -+ -+const uint8_t zd1211b_ws11ur[] -+#include "WS11Ur.h" -+ -+#undef ZD1211B -+ -+ -+static int write_fw_file(const char *path, const uint8_t *bytes, size_t size) -+{ -+ FILE *f = NULL; -+ -+ fprintf(stderr,"Write file %s (%zu bytes) ... ", path, size); -+ fflush(stderr); -+ f = fopen(path, "w"); -+ if (!f) { -+ fprintf(stderr, "couldn't open %s - error %s (%d)\n", -+ path, strerror(errno), errno); -+ goto error; -+ } -+ -+ size_t s = fwrite(bytes, 1, size, f); -+ if (s != size) { -+ fprintf(stderr, "Error while writing.\n"); -+ goto error; -+ } -+ -+ fclose(f); -+ fprintf(stderr, "done\n"); -+ return 0; -+error: -+ if (f) -+ fclose(f); -+ return 1; -+} -+ -+int main (void) -+{ -+ int r; -+ -+ r = write_fw_file("zd1211_uph", ws11uph, sizeof(ws11uph)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211_uphr", ws11uphr, sizeof(ws11uphr)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211_uphm", ws11uphm, sizeof(ws11uphm)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211_ub", ws11ub, sizeof(ws11ub)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211_ur", ws11ur, sizeof(ws11ur)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211b_uph", zd1211b_ws11uph, -+ sizeof(zd1211b_ws11uph)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211b_uphr", zd1211b_ws11uphr, -+ sizeof(zd1211b_ws11uphr)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211b_uphm", zd1211b_ws11uphm, -+ sizeof(zd1211b_ws11uphm)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211b_ub", zd1211b_ws11ub, -+ sizeof(zd1211b_ws11ub)); -+ if (r) -+ goto error; -+ r = write_fw_file("zd1211b_ur", zd1211b_ws11ur, -+ sizeof(zd1211b_ws11ur)); -+ if (r) -+ goto error; -+ -+ return 0; -+error: -+ return 1; -+} -diff -uNr zd1211-firmware/Makefile zd1211rw_fw_2007-03-19_snap/Makefile ---- zd1211-firmware/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ zd1211rw_fw_2007-03-19_snap/Makefile 2007-10-12 12:44:58.000000000 +0200 -@@ -0,0 +1,33 @@ -+CC := gcc -+CFLAGS := -Wall -+ -+ifneq ($(USER),root) -+SUDO := -+endif -+ -+FW_DIR := /lib/firmware/zd1211 -+ -+FILES := zd1211_ub zd1211_uph zd1211_uphm zd1211_uphr zd1211_ur \ -+ zd1211b_ub zd1211b_uph zd1211b_uphm zd1211b_uphr zd1211b_ur -+ -+all:: files -+ -+create_fw_files:: create_fw_files.c WS11UPh.h WS11UPhR.h WS11UPhm.h WS11Ub.h \ -+ WS11Ur.h -+ $(CC) $(CFLAGS) $< -o $@ -+ -+.PHONY: files clean tar -+files:: $(FILES) -+ -+$(FILES):: create_fw_files -+ ./create_fw_files -+ -+clean:: -+ rm -f create_fw_files *.o zd1211_u* zd1211b_u* -+ -+distclean:: clean -+ rm -f WS11*.h -+ -+install:: $(FILES) -+ test -d $(FW_DIR) || $(SUDO) mkdir -p $(FW_DIR) -+ $(SUDO) cp $(FILES) $(FW_DIR) - diff --git a/zd1211-firmware.spec b/zd1211-firmware.spec index 4f57b79..44e238a 100644 --- a/zd1211-firmware.spec +++ b/zd1211-firmware.spec @@ -1,11 +1,10 @@ Name: zd1211-firmware Version: 1.5 -Release: 4 +Release: 5 Summary: Firmware for wireless devices based on zd1211 chipset License: GPLv2 URL: https://sourceforge.net/projects/zd1211 Source0: https://downloads.sourceforge.net/zd1211/zd1211-firmware-%{version}.tar.bz2 -Patch0: zd1211-firmware-1.4-build__from_headers.patch BuildArch: noarch BuildRequires: gcc @@ -20,11 +19,10 @@ This package contains the firmware required to work with the zd1211 chipset. sed -i 's/\r//' *.h %build -%make_build CFLAGS="$RPM_OPT_FLAGS" %install -make install FW_DIR=$RPM_BUILD_ROOT/lib/firmware/zd1211 - +install -d -m 755 $RPM_BUILD_ROOT/lib/firmware/zd1211 +install -m 644 zd* $RPM_BUILD_ROOT/lib/firmware/zd1211 %files %defattr(-,root,root) @@ -36,5 +34,8 @@ make install FW_DIR=$RPM_BUILD_ROOT/lib/firmware/zd1211 %doc README %changelog +* Fri Jan 10 2020 openEuler Buildteam - 1.5-5 +- clean unused patch + * Sat Oct 12 2019 openEuler Buildteam - 1.5-4 - Package init