Install native artifact into a fixed location

Related: rhbz#1994935
This commit is contained in:
Marian Koncek 2021-08-19 17:28:12 +02:00
parent 931c4c2679
commit 0f54db0341

View File

@ -2,7 +2,7 @@
Name: jansi
Version: 2.3.3
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Generate and interpret ANSI escape sequences in Java
License: ASL 2.0
URL: http://fusesource.github.io/jansi/
@ -68,7 +68,7 @@ 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@,%{_libdir},' \
sed -i 's,@LIBDIR@,%{_prefix}/lib,' \
src/main/java/org/fusesource/jansi/internal/JansiLoader.java
%build
@ -88,8 +88,8 @@ cd -
%install
# Install the native artifact
mkdir -p %{buildroot}%{_libdir}/%{name}
cp -p src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_prefix}/lib/%{name}
cp -p src/main/native/libjansi.so %{buildroot}%{_prefix}/lib/%{name}
# Install the Java artifacts
%mvn_install
@ -97,12 +97,16 @@ cp -p src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name}
%files -f .mfiles
%license license.txt
%doc readme.md changelog.md
%{_libdir}/%{name}/
%{_prefix}/lib/%{name}/
%files javadoc -f .mfiles-javadoc
%license license.txt
%changelog
* Thu Aug 19 2021 Marian Koncek <mkoncek@redhat.com> - 2.3.3-5
- Install native artifact into a fixed location
- Related: rhbz#1994935
* Wed Aug 18 2021 Marian Koncek <mkoncek@redhat.com> - 2.3.3-4
- Avoid possible NullPointerException
- Resolves: rhbz#1993889