[packages/libjwt1] Initial release.

arekm arekm at pld-linux.org
Tue Aug 11 19:33:22 CEST 2026


commit 2c3997e99f21500374ddea86753089a62c1c62f1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Aug 11 19:31:55 2026 +0200

    Initial release.
    
    1.x line; Asterisk needs the jwt_new()/jwt_decode() API that 3.x removed.

 libjwt1.spec | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)
---
diff --git a/libjwt1.spec b/libjwt1.spec
new file mode 100644
index 0000000..e945e2b
--- /dev/null
+++ b/libjwt1.spec
@@ -0,0 +1,119 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+%bcond_without	tests		# unit tests
+#
+# NOTE: this package tracks the 1.x line - libjwt 2.x/3.x dropped the
+# jwt_new()/jwt_decode() API that Asterisk still requires (all Asterisk
+# branches pin libjwt >= 1.15.3). Newer libjwt belongs in a separate
+# package; the runtime libraries coexist (soname 2 here vs 14 in 3.x),
+# but the -devel files share unversioned paths and conflict.
+#
+Summary:	C library for JSON Web Tokens
+Summary(pl.UTF-8):	Biblioteka C do obsługi tokenów JSON Web Token
+Name:		libjwt1
+Version:	1.18.3
+Release:	1
+License:	MPL v2.0
+Group:		Libraries
+#Source0Download: https://github.com/benmcollins/libjwt/releases
+Source0:	https://github.com/benmcollins/libjwt/releases/download/v%{version}/libjwt-%{version}.tar.bz2
+# Source0-md5:	812f905aa12474b0b7dd2b76ee77e295
+URL:		https://github.com/benmcollins/libjwt
+BuildRequires:	jansson-devel >= 2.0
+BuildRequires:	openssl-devel >= 0.9.8
+BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.752
+%{?with_tests:BuildRequires:	check-devel >= 0.9.4}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libjwt is a C library for JSON Web Tokens (JWT). It supports creating,
+signing, verifying and decoding tokens using the HMAC, RSA, ECDSA and
+EdDSA algorithms. Cryptographic operations are provided by OpenSSL or
+GnuTLS, and JSON handling by Jansson.
+
+This package provides the 1.x API.
+
+%description -l pl.UTF-8
+libjwt to biblioteka C do obsługi tokenów JSON Web Token (JWT).
+Pozwala tworzyć, podpisywać, weryfikować i dekodować tokeny przy użyciu
+algorytmów HMAC, RSA, ECDSA oraz EdDSA. Operacje kryptograficzne
+realizuje przy użyciu OpenSSL-a lub GnuTLS-a, a dane JSON przetwarza
+przy użyciu biblioteki Jansson.
+
+Ten pakiet dostarcza API w wersji 1.x.
+
+%package devel
+Summary:	Header files for %{name} library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+Requires:	jansson-devel >= 2.0
+Requires:	openssl-devel >= 0.9.8
+Conflicts:	libjwt-devel
+
+%description devel
+Header files for %{name} library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki %{name}.
+
+%package static
+Summary:	Static %{name} library
+Summary(pl.UTF-8):	Statyczna biblioteka %{name}
+Group:		Development/Libraries
+Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
+Conflicts:	libjwt-static
+
+%description static
+Static %{name} library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka %{name}.
+
+%prep
+%setup -q -n libjwt-%{version}
+
+%build
+%configure \
+	--without-examples \
+	%{!?with_static_libs:--disable-static}
+
+%{__make}
+
+%if %{with tests}
+%{__make} check
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libjwt.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%{_libdir}/libjwt.so.*.*.*
+%ghost %{_libdir}/libjwt.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libjwt.so
+%{_includedir}/jwt.h
+%{_pkgconfigdir}/libjwt.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libjwt.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libjwt1.git/commitdiff/2c3997e99f21500374ddea86753089a62c1c62f1



More information about the pld-cvs-commit mailing list