#1 Don't harcode gcc
Opened 3 years ago by tbaeder. Modified 3 years ago
rpms/ tbaeder/pngcrush master  into  rawhide

file modified
+2 -1
@@ -27,9 +27,10 @@ 

  cp %{SOURCE1} . 

  

  %build

+ %set_build_flags

  rm -f z*.h crc32.h deflate.h inf*.h trees.h png*.h # force using system headers

  pngflags=$(pkg-config --cflags --libs libpng)

- gcc %{optflags} $pngflags -lz -o %{name} %{name}.c

+ ${CC} %{optflags} $pngflags -lz $RPM_LD_FLAGS -o %{name} %{name}.c

  docbook2man %{name}.sgml

  

  %install

Use %set_build_flags and then ${CC} to get the compiler in use. Also
pass $RPM_LD_FLAGS for good measure.