634aee7
Name:             jansi
3a898d8
Version:          2.1.1
3a898d8
Release:          1%{?dist}
3a898d8
Summary:          Generate and interpret ANSI escape sequences in Java
3a898d8
634aee7
License:          ASL 2.0
d15a37e
URL:              http://fusesource.github.io/jansi/
3a898d8
Source0:          https://github.com/fusesource/jansi/archive/jansi-%{version}.tar.gz
3a898d8
# Change the location of the native artifact to where Fedora wants it
3a898d8
Patch0:           %{name}-jni.patch
634aee7
3a898d8
BuildRequires:    gcc
Stanislav Ochotnicky 11d9a98
BuildRequires:    maven-local
d15a37e
BuildRequires:    mvn(org.apache.felix:maven-bundle-plugin)
3a898d8
BuildRequires:    mvn(org.apache.maven.plugins:maven-source-plugin)
3a898d8
BuildRequires:    mvn(org.apache.maven.surefire:surefire-junit-platform)
d15a37e
BuildRequires:    mvn(org.fusesource:fusesource-pom:pom:)
3a898d8
BuildRequires:    mvn(org.junit.jupiter:junit-jupiter-engine)
634aee7
634aee7
%description
634aee7
Jansi is a small java library that allows you to use ANSI escape sequences
634aee7
in your Java console applications. It implements ANSI support on platforms
634aee7
which don't support it like Windows and provides graceful degradation for
f14a0ea
when output is being sent to output devices which cannot support ANSI sequences.
634aee7
634aee7
%package javadoc
634aee7
Summary:          Javadocs for %{name}
634aee7
634aee7
%description javadoc
634aee7
This package contains the API documentation for %{name}.
634aee7
634aee7
%prep
3a898d8
%autosetup -n jansi-jansi-%{version} -p1
f4bc0f1
3a898d8
# We don't need the Fuse JXR skin
f4bc0f1
%pom_xpath_remove "pom:build/pom:extensions"
f4bc0f1
3a898d8
# Plugins not needed for an RPM build
3a898d8
%pom_remove_plugin :maven-gpg-plugin
3a898d8
%pom_remove_plugin :maven-javadoc-plugin
3a898d8
%pom_remove_plugin :nexus-staging-maven-plugin
3a898d8
3a898d8
# We don't want GraalVM support in Fedora
3a898d8
%pom_remove_plugin :exec-maven-plugin
3a898d8
%pom_remove_dep :picocli-codegen
f4bc0f1
3a898d8
# Build for JDK 1.8 at a minimum
3a898d8
%pom_xpath_set "//pom:plugin[pom:artifactId='maven-compiler-plugin']//pom:source" 1.8
3a898d8
%pom_xpath_set "//pom:plugin[pom:artifactId='maven-compiler-plugin']//pom:target" 1.8
634aee7
3a898d8
# Remove prebuilt shared objects
3a898d8
rm -fr src/main/resources/org/fusesource/jansi/internal
Marek Goldmann 4b72e92
3a898d8
# Unbundle the JNI headers
3a898d8
rm src/main/native/inc_linux/*.h
3a898d8
ln -s %{java_home}/include/jni.h src/main/native/inc_linux
3a898d8
ln -s %{java_home}/include/linux/jni_md.h src/main/native/inc_linux
3a898d8
3a898d8
# Set the JNI path
3a898d8
sed -i 's,@LIBDIR@,%{libdir},' \
3a898d8
    src/main/java/org/fusesource/jansi/internal/JansiLoader.java
8cbbca1
634aee7
%build
3a898d8
# Build the native artifact
3a898d8
CFLAGS="%{build_cflags} -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"
3a898d8
cd src/main/native
3a898d8
gcc $CFLAGS -c jansi.c
3a898d8
gcc $CFLAGS -c jansi_isatty.c
3a898d8
gcc $CFLAGS -c jansi_structs.c
3a898d8
gcc $CFLAGS -c jansi_ttyname.c
3a898d8
gcc $CFLAGS %{build_ldflags} -shared -o libjansi.so *.o -lutil
3a898d8
cd -
3a898d8
3a898d8
# Build the Java artifacts
3a898d8
%mvn_build -- -Dlibrary.jansi.path=$PWD/src/main/native
634aee7
634aee7
%install
3a898d8
# Install the native artifact
3a898d8
mkdir -p %{buildroot}%{_libdir}/%{name}
3a898d8
cp -p src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name}
3a898d8
3a898d8
# Install the Java artifacts
Marek Goldmann 4b72e92
%mvn_install
Marek Goldmann 4b72e92
Marek Goldmann 4b72e92
%files -f .mfiles
f14a0ea
%license license.txt
f14a0ea
%doc readme.md changelog.md
3a898d8
%{_libdir}/%{name}/
634aee7
Marek Goldmann 4b72e92
%files javadoc -f .mfiles-javadoc
f14a0ea
%license license.txt
634aee7
634aee7
%changelog
3a898d8
* Tue Dec 15 2020 Jerry James <loganjerry@gmail.com> - 2.1.1-1
3a898d8
- Version 2.1.1
3a898d8
- Remove package name from Summary
3a898d8
- Add patch to change the location of the JNI shared object
3a898d8
5ef43a0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
5ef43a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5ef43a0
6ca9969
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1.18-4
6ca9969
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
6ca9969
0d3a8bc
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-3
0d3a8bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0d3a8bc
30873d3
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-2
30873d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
30873d3
1ca6d9a
* Sat Jun 08 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-1
1ca6d9a
- Update to version 1.18.
1ca6d9a
72b661d
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.1-3
72b661d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
72b661d
fd35bbf
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.1-2
fd35bbf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fd35bbf
4bdd238
* Tue Jun 05 2018 Michael Simacek <msimacek@redhat.com> - 1.17.1-1
4bdd238
- Update to upstream version 1.17.1
4bdd238
d15a37e
* Mon Feb 26 2018 Michael Simacek <msimacek@redhat.com> - 1.17-1
d15a37e
- Update to upstream version 1.17
d15a37e
3424e6a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-3
3424e6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3424e6a
d1cf635
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-2
d1cf635
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d1cf635
f14a0ea
* Wed Jun 14 2017 Michael Simacek <msimacek@redhat.com> - 1.16-1
f14a0ea
- Update to upstream version 1.16
f14a0ea
5126c21
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11-12
5126c21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5126c21
c88f097
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 1.11-11
c88f097
- Remove BR on maven-site-plugin
c88f097
12e01d3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.11-10
12e01d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
12e01d3
9343b9a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-9
9343b9a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9343b9a
8cbbca1
* Thu May 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.11-8
8cbbca1
- Remove maven-javadoc-plugin execution
8cbbca1
b474df4
* Tue Jan 27 2015 Mat Booth <mat.booth@redhat.com> - 1.11-7
b474df4
- Add/remove BRs to fix FTBFS bug
b474df4
ff6ff5c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-6
ff6ff5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ff6ff5c
0bc5340
* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.11-5
0bc5340
- Migrate BuildRequires from junit4 to junit
0bc5340
9a8e765
* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.11-4
9a8e765
- Remove BuildRequires on maven-surefire-provider-junit4
9a8e765
Marek Goldmann 4b72e92
* Wed Sep 11 2013 Marek Goldmann <mgoldman@redhat.com> - 1.11-3
Marek Goldmann 4b72e92
- Using xmvn
Marek Goldmann 4b72e92
- Remove the jboss-native deps with classifiers
Marek Goldmann 4b72e92
df5bbc9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
df5bbc9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
df5bbc9
Marek Goldmann 094eb1f
* Tue May 21 2013 Marek Goldmann <mgoldman@redhat.com> - 1.11-1
Marek Goldmann 094eb1f
- Upstream release 1.11 RHBZ#962761
Marek Goldmann 094eb1f
- CVE-2013-2035 HawtJNI: predictable temporary file name leading to local arbitrary code execution RHBZ#962614
Marek Goldmann 094eb1f
cecdebb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-3
cecdebb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
cecdebb
Stanislav Ochotnicky 11d9a98
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.9-2
Stanislav Ochotnicky 11d9a98
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
Stanislav Ochotnicky 11d9a98
- Replace maven BuildRequires with maven-local
Stanislav Ochotnicky 11d9a98
f4bc0f1
* Tue Oct 09 2012 Marek Goldmann <mgoldman@redhat.com> - 1.9-1
f4bc0f1
- Upstream release 1.9, RHBZ#864490
f4bc0f1
e90dac4
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
e90dac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e90dac4
e53df6b
* Fri May 04 2012 Tomas Radej <tradej@redhat.com> - 1.6-3
e53df6b
- Removed maven-license-plugin BR
e53df6b
97f6763
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2
97f6763
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
97f6763
634aee7
* Thu Aug 25 2011 Marek Goldmann <mgoldman@redhat.com> 1.6-1
634aee7
- Upstream release 1.6
634aee7
- Spec file cleanup
634aee7
634aee7
* Fri May 27 2011 Marek Goldmann <mgoldman@redhat.com> 1.5-1
634aee7
- Initial packaging
634aee7