From f200c8bcff05ec8ed28543f8afe6021146c03eb6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 16 Dec 2021 10:09:56 +0100 Subject: [PATCH 1/2] fix: fix german localization template --- .drone.jsonnet | 3 +- .drone.yml | 8 ++---- Makefile | 19 +++++++++++++ cups.spec | 6 ++-- patches/fix-german-localization.patch | 40 +++++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 Makefile create mode 100644 patches/fix-german-localization.patch diff --git a/.drone.jsonnet b/.drone.jsonnet index 22c0db3..158c2c4 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -23,8 +23,7 @@ local DistVersion(version='7') = { name: 'build-el' + version, image: 'thegeeklab/rpmbuild:' + version, commands: [ - 'source /drone/src/.drone.env', - 'rpmbuild -ba --without libusb1 --define "version_ $${CUPS_VERSION##v}" cups.spec', + 'make all', 'ls -l /drone/src/dist/RPMS/x86_64/', ], }; diff --git a/.drone.yml b/.drone.yml index a866248..00c3e76 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,15 +30,13 @@ steps: - name: build-el7 image: thegeeklab/rpmbuild:7 commands: - - source /drone/src/.drone.env - - rpmbuild -ba --without libusb1 --define "version_ $${CUPS_VERSION##v}" cups.spec + - make all - ls -l /drone/src/dist/RPMS/x86_64/ - name: build-el8 image: thegeeklab/rpmbuild:8 commands: - - source /drone/src/.drone.env - - rpmbuild -ba --without libusb1 --define "version_ $${CUPS_VERSION##v}" cups.spec + - make all - ls -l /drone/src/dist/RPMS/x86_64/ - name: checksum @@ -122,6 +120,6 @@ depends_on: --- kind: signature -hmac: e3a4496149a9d12470fe6ccf27240160f1a52e62320541e0828c1bc65e2696e1 +hmac: 88093dd0dd68991c61958ba9412b054a6a0ead47acb8590b5fa775492d2dc7a8 ... diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cab6bd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +WORKDIR := /drone/src +BASEDIR := dist + +.PHONY: all +all: prepare build + +.PHONY: prepare +prepare: + mkdir -p $(WORKDIR)/$(BASEDIR)/{BUILD,RPMS,SOURCES,SPECS,SRPMS}; \ + rsync -avHAX -q --ignore-missing-args $(WORKDIR)/patches/ $(WORKDIR)/$(BASEDIR)/SOURCES/ + +.PHONY: build +build: + source $(WORKDIR)/.drone.env && \ + rpmbuild -ba --without libusb1 --define "version_ $${CUPS_VERSION##v}" cups.spec + +.PHONY: clean +clean: + rm -rf $(WORKDIR)/$(BASEDIR) diff --git a/cups.spec b/cups.spec index 20febe0..5410f78 100644 --- a/cups.spec +++ b/cups.spec @@ -44,13 +44,14 @@ Summary: CUPS Name: cups Version: %{version_} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: GPL Group: System Environment/Daemons Source: https://github.com/OpenPrinting/cups/releases/download/v%{version}/cups-%{version}-source.tar.gz +Patch0: fix-german-localization.patch Url: http://www.cups.org -Packager: Anonymous +Packager: Robert Kaussow Vendor: OpenPrinting # Package names are as defined for Red Hat (and clone) distributions @@ -114,6 +115,7 @@ This package provides LPD client support. %prep %setup +%patch0 -p1 %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \ diff --git a/patches/fix-german-localization.patch b/patches/fix-german-localization.patch new file mode 100644 index 0000000..185d83e --- /dev/null +++ b/patches/fix-german-localization.patch @@ -0,0 +1,40 @@ +From aa2507530076eaff042b096de55442dc8b665abb Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Wed, 1 Dec 2021 12:00:16 +0100 +Subject: [PATCH] de/index.html: Fix missing bracket (fixes issue #299) + +The bracket was unintentionally removed by commit b76a97a. +--- + CHANGES.md | 5 +++++ + doc/de/index.html.in | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/CHANGES.md b/CHANGES.md +index d4eb9aae0..c49b902f5 100644 +--- a/CHANGES.md ++++ b/CHANGES.md +@@ -1,6 +1,11 @@ + CHANGES - OpenPrinting CUPS 2.4.0 - 2021-11-29 + ============================================== + ++Changes in CUPS v2.4.1 (TBA) ++---------------------------- ++ ++- Fixed missing bracket in de/index.html (Issue #299) ++ + Changes in CUPS v2.4.0 (29th November 2021) + ------------------------------------------- + +diff --git a/doc/de/index.html.in b/doc/de/index.html.in +index 30f7d288e..2b3f3a6b1 100644 +--- a/doc/de/index.html.in ++++ b/doc/de/index.html.in +@@ -7,7 +7,7 @@ + + + +- Startseite - CUPS @CUPS_VERSION@/title> ++ <title>Startseite - CUPS @CUPS_VERSION@ + + +
-- 2.45.2 From ab405c11cd6ad9e81cee2006e80d52f0f3e1f97f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 16 Dec 2021 10:58:40 +0100 Subject: [PATCH 2/2] add build command to readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9f87977..8c2070e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,13 @@ This repository is a simple wrapper to provide CI driven RMP builds from upstream releases. +## Build + +```Shell +docker run -v $(pwd):/drone/src --workdir /drone/src -it thegeeklab/rpmbuild:7 make all +docker run -v $(pwd):/drone/src --workdir /drone/src -it thegeeklab/rpmbuild:8 make all +``` + ## License This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/rpmbuild/cups/src/branch/master/LICENSE) file for details. -- 2.45.2