public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qr-code-generator] epel10.3: Initial upload (#1788197).
@ 2026-09-09  5:29 Vitaly Zaitsev
  0 siblings, 0 replies; only message in thread
From: Vitaly Zaitsev @ 2026-09-09  5:29 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/qr-code-generator
Branch : epel10.3
Commit : 4d66e294c431f54f9769bfc34515496be7eba9fe
Author : Vitaly Zaitsev <vitaly@easycoding.org>
Date   : 2020-01-07T08:26:01+01:00
Stats  : +292/-0 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/qr-code-generator/c/4d66e294c431f54f9769bfc34515496be7eba9fe?branch=epel10.3

Log:
Initial upload (#1788197).

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c932bd7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/qr-code-generator-67c6246.tar.gz

diff --git a/qr-code-generator-build-fixes.patch b/qr-code-generator-build-fixes.patch
new file mode 100644
index 0000000..6886215
--- /dev/null
+++ b/qr-code-generator-build-fixes.patch
@@ -0,0 +1,146 @@
+diff --git a/c/Makefile b/c/Makefile
+index fd0c367..3b8e855 100644
+--- a/c/Makefile
++++ b/c/Makefile
+@@ -29,11 +29,13 @@
+ # - CFLAGS: Any extra user-specified compiler flags (can be blank).
+ 
+ # Recommended compiler flags:
+-CFLAGS += -std=c99 -O
++CFLAGS += -std=c99
+ 
+ # Extra flags for diagnostics:
+ # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
+ 
++# Version information
++VERSION = 1.5.0
+ 
+ # ---- Controlling make ----
+ 
+@@ -51,10 +53,18 @@ CFLAGS += -std=c99 -O
+ # ---- Targets to build ----
+ 
+ LIB = qrcodegen
+-LIBFILE = lib$(LIB).a
++LIBFILE = lib$(LIB).so
++# Bump the soname number when the ABI changes and gets incompatible
++SO_NAME = $(LIBFILE).1
++REAL_NAME = $(LIBFILE).$(VERSION)
++HEADERS = qrcodegen.h
+ LIBOBJ = qrcodegen.o
+ MAINS = qrcodegen-demo qrcodegen-test qrcodegen-worker
+ 
++# define paths to install
++INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
++LIBDIR ?= $(DESTDIR)/usr/lib
++
+ # Build all binaries
+ all: $(LIBFILE) $(MAINS)
+ 
+@@ -63,6 +73,18 @@ clean:
+ 	rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS)
+ 	rm -rf .deps
+ 
++install-shared: $(LIBFILE)
++	install -d $(LIBDIR) || true
++	install -m 0755 $(LIBFILE) $(LIBDIR)/$(REAL_NAME)
++	ln -s $(REAL_NAME) $(LIBDIR)/$(SO_NAME)
++	ln -s $(SO_NAME) $(LIBDIR)/$(LIBFILE)
++
++install-header: $(HEADERS)
++	install -d $(INCLUDEDIR) || true
++	install -m 0644 $(HEADERS) $(INCLUDEDIR)/
++
++install: install-shared install-header
++
+ # Executable files
+ %: %.o $(LIBFILE)
+ 	$(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB)
+@@ -73,11 +95,11 @@ qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c)
+ 
+ # The library
+ $(LIBFILE): $(LIBOBJ)
+-	$(AR) -crs $@ -- $^
++	$(CC) $(CXXFLAGS) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $@ $^
+ 
+ # Object files
+ %.o: %.c .deps/timestamp
+-	$(CC) $(CFLAGS) -c -o $@ -MMD -MF .deps/$*.d $<
++	$(CC) $(CFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
+ 
+ # Have a place to store header dependencies automatically generated by compiler
+ .deps/timestamp:
+diff --git a/cpp/Makefile b/cpp/Makefile
+index 1d32943..8807c1a 100644
+--- a/cpp/Makefile
++++ b/cpp/Makefile
+@@ -29,11 +29,13 @@
+ # - CXXFLAGS: Any extra user-specified compiler flags (can be blank).
+ 
+ # Recommended compiler flags:
+-CXXFLAGS += -std=c++11 -O
++CXXFLAGS += -std=c++11
+ 
+ # Extra flags for diagnostics:
+ # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
+ 
++# Version information
++VERSION = 1.5.0
+ 
+ # ---- Controlling make ----
+ 
+@@ -50,11 +52,20 @@ CXXFLAGS += -std=c++11 -O
+ 
+ # ---- Targets to build ----
+ 
+-LIB = qrcodegen
+-LIBFILE = lib$(LIB).a
++LIB = qrcodegencpp
++LIBFILE = lib$(LIB).so
++# Bump the soname number when the ABI changes and gets incompatible
++SO_NAME = $(LIBFILE).1
++REAL_NAME = $(LIBFILE).$(VERSION)
++HEADERS = BitBuffer.hpp QrCode.hpp QrSegment.hpp
+ LIBOBJ = BitBuffer.o QrCode.o QrSegment.o
+ MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
+ 
++# define paths to install
++INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
++LIBDIR ?= $(DESTDIR)/usr/lib
++
++
+ # Build all binaries
+ all: $(LIBFILE) $(MAINS)
+ 
+@@ -63,17 +74,29 @@ clean:
+ 	rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS)
+ 	rm -rf .deps
+ 
++install-shared: $(LIBFILE)
++	install -d $(LIBDIR) || true
++	install -m 0755 $(LIBFILE) $(LIBDIR)/$(REAL_NAME)
++	ln -s $(REAL_NAME) $(LIBDIR)/$(SO_NAME)
++	ln -s $(SO_NAME) $(LIBDIR)/$(LIBFILE)
++
++install-header: $(HEADERS)
++	install -d $(INCLUDEDIR) || true
++	install -m 0644 $(HEADERS) $(INCLUDEDIR)/
++
++install: install-shared install-header
++
+ # Executable files
+ %: %.o $(LIBFILE)
+ 	$(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB)
+ 
+ # The library
+ $(LIBFILE): $(LIBOBJ)
+-	$(AR) -crs $@ -- $^
++	$(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $@ $^
+ 
+ # Object files
+ %.o: %.cpp .deps/timestamp
+-	$(CXX) $(CXXFLAGS) -c -o $@ -MMD -MF .deps/$*.d $<
++	$(CXX) $(CXXFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
+ 
+ # Have a place to store header dependencies automatically generated by compiler
+ .deps/timestamp:

diff --git a/qr-code-generator.spec b/qr-code-generator.spec
new file mode 100644
index 0000000..ecca01e
--- /dev/null
+++ b/qr-code-generator.spec
@@ -0,0 +1,144 @@
+%global richname QR-Code-generator
+
+%global commit0 67c62461d380352500fc39557fd9f046b7fe1d18
+%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
+%global date 20191014
+
+Name: qr-code-generator
+Version: 1.5.0
+Release: 1.%{date}git%{shortcommit0}%{?dist}
+
+License: MIT
+Summary: High-quality QR Code generator library
+URL: https://github.com/nayuki/%{richname}
+Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
+
+# https://github.com/nayuki/QR-Code-generator/pull/72
+Patch100: %{name}-build-fixes.patch
+
+BuildRequires: python3-devel
+BuildRequires: gcc-c++
+BuildRequires: gcc
+
+%description
+This project aims to be the best, clearest QR Code generator library in
+multiple languages.
+
+The primary goals are flexible options and absolute correctness.
+Secondary goals are compact implementation size and good documentation
+comments.
+
+%package -n libqrcodegen
+Summary: High-quality QR Code generator library (plain C version)
+
+%description -n libqrcodegen
+This project aims to be the best, clearest QR Code generator library in
+multiple languages.
+
+The primary goals are flexible options and absolute correctness.
+Secondary goals are compact implementation size and good documentation
+comments.
+
+%package -n libqrcodegen-devel
+Summary: Development files for libqrcodegen
+Requires: libqrcodegen%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description -n libqrcodegen-devel
+Development files and headers for high-quality QR Code generator library
+(plain C version).
+
+%package -n libqrcodegencpp
+Summary: High-quality QR Code generator library (C++ version)
+
+%description -n libqrcodegencpp
+This project aims to be the best, clearest QR Code generator library in
+multiple languages.
+
+The primary goals are flexible options and absolute correctness.
+Secondary goals are compact implementation size and good documentation
+comments.
+
+%package -n libqrcodegencpp-devel
+Summary: Development files for libqrcodegencpp
+Requires: libqrcodegencpp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+%description -n libqrcodegencpp-devel
+Development files and headers for high-quality QR Code generator library
+(C++ version).
+
+%package -n python3-qrcodegen
+Summary: High-quality QR Code generator library (Python version)
+BuildArch: noarch
+%{?python_provide:%python_provide python3-qrcodegen}
+
+%description -n python3-qrcodegen
+This project aims to be the best, clearest QR Code generator library in
+multiple languages.
+
+The primary goals are flexible options and absolute correctness.
+Secondary goals are compact implementation size and good documentation
+comments.
+
+%prep
+%autosetup -n %{richname}-%{commit0} -p1
+
+%build
+# Exporting correct build flags...
+%set_build_flags
+
+# Building plain C version...
+pushd c
+%make_build
+popd
+
+# Building C++ version...
+pushd cpp
+%make_build
+popd
+
+# Building Python version...
+pushd python
+%py3_build
+popd
+
+%install
+# Installing plain C version...
+pushd c
+%make_install LIBDIR=%{buildroot}%{_libdir} INCLUDEDIR=%{buildroot}%{_includedir}/qrcodegen
+popd
+
+# Installing C++ version...
+pushd cpp
+%make_install LIBDIR=%{buildroot}%{_libdir} INCLUDEDIR=%{buildroot}%{_includedir}/qrcodegencpp
+popd
+
+# Installing Python version...
+pushd python
+%py3_install
+popd
+
+%files -n libqrcodegen
+%license Readme.markdown
+%{_libdir}/libqrcodegen.so.1*
+
+%files -n libqrcodegen-devel
+%{_includedir}/qrcodegen/
+%{_libdir}/libqrcodegen.so
+
+%files -n libqrcodegencpp
+%license Readme.markdown
+%{_libdir}/libqrcodegencpp.so.1*
+
+%files -n libqrcodegencpp-devel
+%{_includedir}/qrcodegencpp/
+%{_libdir}/libqrcodegencpp.so
+
+%files -n python3-qrcodegen
+%license Readme.markdown
+%{python3_sitelib}/qrcodegen.py
+%{python3_sitelib}/__pycache__/*
+%{python3_sitelib}/qrcodegen-*.egg-info/
+
+%changelog
+* Mon Jan 06 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 1.5.0-1.20191014git67c6246
+- Initial SPEC release.

diff --git a/sources b/sources
new file mode 100644
index 0000000..9942909
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (qr-code-generator-67c6246.tar.gz) = eba8ed9c289d918f0e677783bec6d6fe4b80eab1328083140c572ad5b8df8e36baca638dd9864616ccbf45038467a97be6004a9366a06778f50827e456ee1df8

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-09  5:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09  5:29 [rpms/qr-code-generator] epel10.3: Initial upload (#1788197) Vitaly Zaitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox