#3 Use standard variables when compiling binary artifact
Merged 3 years ago by jjames. Opened 3 years ago by tbaeder.
rpms/ tbaeder/jansi master  into  master

file modified
+11 -7
@@ -1,6 +1,6 @@ 

  Name:             jansi

  Version:          2.1.1

- Release:          1%{?dist}

+ Release:          2%{?dist}

  Summary:          Generate and interpret ANSI escape sequences in Java

  

  License:          ASL 2.0
@@ -61,14 +61,15 @@ 

      src/main/java/org/fusesource/jansi/internal/JansiLoader.java

  

  %build

+ %set_build_flags

  # Build the native artifact

- CFLAGS="%{build_cflags} -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"

+ CFLAGS="$CFLAGS -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"

  cd src/main/native

- gcc $CFLAGS -c jansi.c

- gcc $CFLAGS -c jansi_isatty.c

- gcc $CFLAGS -c jansi_structs.c

- gcc $CFLAGS -c jansi_ttyname.c

- gcc $CFLAGS %{build_ldflags} -shared -o libjansi.so *.o -lutil

+ $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
@@ -91,6 +92,9 @@ 

  %license license.txt

  

  %changelog

+ * Thu Jan 14 2021 Timm Bäder <tbaeder@redhat.com> - 2.1.1-2

+ - Use standard variables when compiling native artifact

+ 

  * Tue Dec 15 2020 Jerry James <loganjerry@gmail.com> - 2.1.1-1

  - Version 2.1.1

  - Remove package name from Summary

After a %set_build_flags, we can use the standard $CC, $CFLAGS and
$LDFLAGS

@jjames could you take a look? You were the last one to update jansi. LGTM though.

Yes, this looks good to me, too. I'll merge it. Thanks, Timm!

Pull-Request has been merged by jjames

3 years ago