Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > 2605dadc43d8dfdcc92c8276b9d58c11 > files > 4

jansi-2.4.0-2.mga9.src.rpm

%bcond_with bootstrap

Name:             jansi
Version:          2.4.0
Release:          %mkrel 2
Group:            Development/Java
Summary:          Generate and interpret ANSI escape sequences in Java
License:          ASL 2.0
URL:              http://fusesource.github.io/jansi/
# ./generate-tarball.sh
Source0:          %{name}-%{version}.tar.gz
# Remove bundled binaries which cannot be easily verified for licensing
Source1:          generate-tarball.sh

# Change the location of the native artifact to where Fedora wants it
Patch0:           %{name}-jni.patch

BuildRequires:    gcc
%if %{with bootstrap}
BuildRequires:    javapackages-bootstrap
%else
BuildRequires:    maven-local
BuildRequires:    mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:    mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires:    mvn(org.apache.maven.surefire:surefire-junit-platform)
BuildRequires:    mvn(org.fusesource:fusesource-pom:pom:)
BuildRequires:    mvn(org.junit.jupiter:junit-jupiter-engine)
%endif

%description
Jansi is a small java library that allows you to use ANSI escape sequences
in your Java console applications. It implements ANSI support on platforms
which don't support it like Windows and provides graceful degradation for
when output is being sent to output devices which cannot support ANSI sequences.

%package javadoc
BuildArch:        noarch
Summary:          Javadocs for %{name}

%description javadoc
This package contains the API documentation for %{name}.

%prep
%autosetup -n jansi-jansi-%{version} -p1

# We don't need the Fuse JXR skin
%pom_xpath_remove "pom:build/pom:extensions"

# Plugins not needed for an RPM build
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin :nexus-staging-maven-plugin

# We don't want GraalVM support in Fedora
%pom_remove_plugin :exec-maven-plugin
%pom_remove_dep :picocli-codegen

# Build for JDK 1.8 at a minimum
%pom_xpath_set "//pom:properties/pom:jdkTarget" 1.8

# Remove prebuilt shared objects
rm -fr src/main/resources/org/fusesource/jansi/internal

# Unbundle the JNI headers
rm src/main/native/inc_linux/*.h
ln -s %{java_home}/include/jni.h src/main/native/inc_linux
ln -s %{java_home}/include/linux/jni_md.h src/main/native/inc_linux

# Set the JNI path
sed -i 's,@LIBDIR@,%{_prefix}/lib,' \
    src/main/java/org/fusesource/jansi/internal/JansiLoader.java

%build
%set_build_flags
CC="${CC:-gcc}"
# Build the native artifact
CFLAGS="$CFLAGS -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"
cd src/main/native
$CC $CFLAGS -c jansi.c
$CC $CFLAGS -c jansi_isatty.c
$CC $CFLAGS -c jansi_structs.c
$CC $CFLAGS -c jansi_ttyname.c
$CC $CFLAGS $LDFLAGS -shared -o libjansi.so *.o -lutil
cd -

# Build the Java artifacts
%mvn_build -- -Dlibrary.jansi.path=$PWD/src/main/native

%install
# Install the native artifact
mkdir -p %{buildroot}%{_prefix}/lib/%{name}
cp -p src/main/native/libjansi.so %{buildroot}%{_prefix}/lib/%{name}

# Install the Java artifacts
%mvn_install

%files -f .mfiles
%license license.txt
%doc readme.md changelog.md
%{_prefix}/lib/%{name}/

%files javadoc -f .mfiles-javadoc
%license license.txt




%changelog
* Mon Jul 25 2022 neoclust <neoclust> 2.4.0-2.mga9
+ Revision: 1871036
- Disable bootstrap

* Sat Jul 23 2022 neoclust <neoclust> 2.4.0-1.mga9
+ Revision: 1870539
- New version 2.4.0
+ umeabot <umeabot>
- Mageia 9 Mass Rebuild

* Sun Feb 28 2021 daviddavid <daviddavid> 2.1.1-1.mga9
+ Revision: 1694411
- Version 2.1.1
- Remove package name from Summary
- Add patch to change the location of the JNI shared object
- Use standard variables when compiling native artifact

* Sat Feb 15 2020 umeabot <umeabot> 1.18-2.mga8
+ Revision: 1528624
- Mageia 8 Mass Rebuild

* Sat Aug 24 2019 daviddavid <daviddavid> 1.18-1.mga8
+ Revision: 1431573
- Update to version 1.18

* Sat Nov 17 2018 guillomovitch <guillomovitch> 1.17.1-1.mga7
+ Revision: 1330454
- new version 1.17.1

* Tue Sep 18 2018 umeabot <umeabot> 1.11-13.mga7
+ Revision: 1262869
- Mageia 7 Mass Rebuild

* Wed Mar 02 2016 neoclust <neoclust> 1.11-12.mga6
+ Revision: 982612
- Second rebuild of the java stack

* Thu Feb 25 2016 daviddavid <daviddavid> 1.11-11.mga6
+ Revision: 978950
- rebuild to regenerate Provides list

* Tue Feb 23 2016 neoclust <neoclust> 1.11-10.mga6
+ Revision: 976562
- First rebuild of the java stack
- sync package jansi with fedora
+ umeabot <umeabot>
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 1.11-5.mga5
+ Revision: 744214
- Second Mageia 5 Mass Rebuild
- Mageia 5 Mass Rebuild

* Mon Dec 16 2013 dmorgan <dmorgan> 1.11-3.mga4
+ Revision: 557558
- Rebuild against current java stack

* Tue Oct 22 2013 umeabot <umeabot> 1.11-2.mga4
+ Revision: 541717
- Mageia 4 Mass Rebuild

* Sun Oct 13 2013 dmorgan <dmorgan> 1.11-1.mga4
+ Revision: 496390
- New version

* Sat Jan 12 2013 umeabot <umeabot> 1.6-2.mga3
+ Revision: 354745
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Nov 07 2011 dmorgan <dmorgan> 1.6-1.mga2
+ Revision: 164821
- Remove dot in summary
- Clean spec file
+ gil <gil>
- update to 1.6
- imported package jansi


* Fri May 27 2011 Marek Goldmann <mgoldman@redhat.com> 1.5-1
- Initial packaging