Files
jslt/jslt.spec
Fridrich Strba 0ad8da1927 Accepting request 1159165 from home:urbic:branches:Java:packages
- Update to v0.1.14
  * Release 0.1.14: Bug fix
    + Issue #160 was fixed in this release, solving a relatively
      serious bug, so upgrading is recommended.
    + The Jackson dependencies were also upgraded, to avoid
      versions with known vulnerabilities.
  * Release 0.1.13: Bug fixes
    + This version was released to fix a threading issue in the
      sha256-hex function (issue #261).
    + In addition, it also removes usage of some deprecated Jackson
      APIs.
    + There are no other changes.
  * Release 0.1.12: Bug fixes and new functions
    + This release adds the uuid() built-in function, and a couple
      of minor improvements. Parsing of decimal numbers in the
      number() function has been improved to handle larger
      decimals. Also, syntax errors in regular expressions are now
      detected at compile time when possible.
    + Thanks to @fuchsst for the design and implementation of the
      uuid() function!
- Reproducible builds: use SOURCE_DATE_EPOCH for timestamp
- Initial packaging with v0.1.11

OBS-URL: https://build.opensuse.org/request/show/1159165
OBS-URL: https://build.opensuse.org/package/show/Java:packages/jslt?expand=0&rev=2
2024-03-19 06:53:42 +00:00

106 lines
3.1 KiB
RPMSpec

#
# spec file for package jslt
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jslt
Version: 0.1.14
Release: 0
Summary: JSON query and transformation language
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/schibsted/%{name}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/com/schibsted/spt/data/%{name}/%{version}/%{name}-%{version}.pom
Source2: %{name}.pod
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
BuildRequires: mvn(net.java.dev.javacc:javacc)
BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildArch: noarch
%description
JSLT is a complete query and transformation language for JSON. The language
design is inspired by jq, XPath, and XQuery.
JSLT can be used as:
a query language to extract values from JSON (.foo.bar[0]),
a filter/check language to test JSON objects
(starts-with(.foo.bar[0], "http://")) ,
a transformation language to convert between JSON formats.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
pushd core
cp %{SOURCE1} pom.xml
%pom_change_dep com.fasterxml.jackson.core:jackson-databind::runtime :::compile
%{mvn_file} : %{name}
popd
%build
pushd core
jjtree \
-OUTPUT_DIRECTORY=src/main/java/schibsted/spt/data/jslt/parser \
src/main/jjtree/jslt.jjt
javacc \
-OUTPUT_DIRECTORY=src/main/java/schibsted/spt/data/jslt/parser \
src/main/java/schibsted/spt/data/jslt/parser/jslt.jj
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)
popd
pod2man \
--release='%{name} %{version}' \
--section=1 \
--center='User Commands' \
--quotes=none \
%{SOURCE2} \
%{name}.1
%install
pushd core
%mvn_install
popd
%fdupes %{buildroot}%{_javadocdir}/%{name}
%jpackage_script com.schibsted.spt.data.jslt.cli.JSLT '' '' %{name}:jackson-core:jackson-databind:jackson-annotations %{name} true
install -dm0755 %{buildroot}/%{_mandir}/man1
install -m0644 %{name}.1 %{buildroot}/%{_mandir}/man1
%files -f core/.mfiles
%license LICENSE
%doc README.md docs/*.md examples ideas language-design.txt tutorial.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%files javadoc -f core/.mfiles-javadoc
%license LICENSE
%changelog