[packages/jwt-cpp] new
atler
atler at pld-linux.org
Wed May 7 02:47:32 CEST 2025
commit f1100e1c3dd5919cc5ac57aee4281abcd7f7e503
Author: Jan Palus <atler at pld-linux.org>
Date: Wed May 7 00:57:29 2025 +0200
new
jwt-cpp.spec | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++
system-picojson.patch | 42 +++++++++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+)
---
diff --git a/jwt-cpp.spec b/jwt-cpp.spec
new file mode 100644
index 0000000..fbf5717
--- /dev/null
+++ b/jwt-cpp.spec
@@ -0,0 +1,58 @@
+Summary: Header only library for JSON Web Tokens in C++11
+Name: jwt-cpp
+Version: 0.7.1
+Release: 1
+License: MIT
+Group: Development/Libraries
+Source0: https://github.com/Thalhammer/jwt-cpp/releases/download/v%{version}/%{name}-v%{version}.tar.gz
+# Source0-md5: c1bdbd8284cce73e0a21d093b32415b5
+Patch0: system-picojson.patch
+URL: https://thalhammer.github.io/jwt-cpp/
+BuildRequires: cmake >= 3.14
+BuildRequires: libstdc++-devel
+BuildRequires: openssl-devel >= 1.0.1
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Header only library for creating and validating JSON Web Tokens in
+C++11.
+
+%package devel
+Summary: Header only library for JSON Web Tokens in C++11
+Group: Development/Libraries
+Requires: libstdc++-devel
+Requires: openssl-devel >= 1.0.1
+Requires: picojson-devel
+
+%description devel
+Header only library for creating and validating JSON Web Tokens in
+C++11.
+
+%prep
+%setup -qc
+%patch -P0 -p1
+
+%build
+%cmake -B build \
+ -DJWT_CMAKE_FILES_INSTALL_DIR:PATH=%{_datadir}/cmake/jwt-cpp \
+ -DJWT_BUILD_EXAMPLES:BOOL=OFF \
+ -DJWT_DISABLE_PICOJSON:BOOL=ON
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files devel
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%{_includedir}/jwt-cpp
+%{_datadir}/cmake/jwt-cpp
diff --git a/system-picojson.patch b/system-picojson.patch
new file mode 100644
index 0000000..b8fb548
--- /dev/null
+++ b/system-picojson.patch
@@ -0,0 +1,42 @@
+--- jwt-cpp-0.7.1/include/jwt-cpp/jwt.h.orig 2025-03-10 06:03:41.000000000 +0100
++++ jwt-cpp-0.7.1/include/jwt-cpp/jwt.h 2025-05-05 19:44:24.290104547 +0200
+@@ -5,7 +5,7 @@
+ #ifndef PICOJSON_USE_INT64
+ #define PICOJSON_USE_INT64
+ #endif
+-#include "picojson/picojson.h"
++#include <picojson.h>
+ #endif
+
+ #ifndef JWT_DISABLE_BASE64
+--- jwt-cpp-0.7.1/include/jwt-cpp/traits/kazuho-picojson/traits.h.orig 2025-03-10 06:03:41.000000000 +0100
++++ jwt-cpp-0.7.1/include/jwt-cpp/traits/kazuho-picojson/traits.h 2025-05-05 19:45:01.340086226 +0200
+@@ -4,7 +4,7 @@
+ #ifndef PICOJSON_USE_INT64
+ #define PICOJSON_USE_INT64
+ #endif
+-#include "picojson/picojson.h"
++#include <picojson.h>
+
+ #ifndef JWT_DISABLE_PICOJSON
+ #define JWT_DISABLE_PICOJSON
+--- jwt-cpp-0.7.1/CMakeLists.txt.orig 2025-03-10 06:03:41.000000000 +0100
++++ jwt-cpp-0.7.1/CMakeLists.txt 2025-05-05 23:19:06.445696207 +0200
+@@ -70,7 +70,7 @@
+ endif()
+
+ if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
+- find_package(picojson 1.3.0 REQUIRED)
++#find_package(picojson 1.3.0 REQUIRED)
+ endif()
+
+ if(JWT_BUILD_EXAMPLES OR JWT_BUILD_TESTS)
+@@ -132,7 +132,7 @@
+ endif()
+
+ if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
+- target_link_libraries(jwt-cpp INTERFACE picojson::picojson>)
++#target_link_libraries(jwt-cpp INTERFACE picojson::picojson>)
+ endif()
+
+ # Hunter needs relative paths so the files are placed correctly
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/jwt-cpp.git/commitdiff/f1100e1c3dd5919cc5ac57aee4281abcd7f7e503
More information about the pld-cvs-commit
mailing list