And with some tweaks to the macro file (current version at
https://www.math.uh.edu/~tibbs/fedora/macros.test) and the R-uuid
package is reduced to the following. Not quite as simple, but it shows
how you can still split out the individual sections when you need to add
something, and also cope with a difficult version number. (I switched
the argument order around for %cran_source.)
Sadly you still need %build if not using %r_simple_archful_package. I
could explain why but....
Name: R-uuid
Version: 0.1.2
Release: 6%{?dist}
Summary: Tools for generating and handling of UUIDs
License: MIT
URL: %cran_url
Source0: %cran_source 0.1-2
BuildRequires: libuuid-devel
%description
Tools for generating and handling of UUIDs (Universally Unique
Identifiers).
%r_archful_package
%prep
%r_prep
pushd %{packname}
rm configure.ac configure src/Makevars.in src/[a-z]*.[ch]
sed -i -e '/configure/d' -e '/Makevars/d' -e
'/src\/[a-z].*.[ch]/d' MD5
rm -r src/config.h.in src/win32
sed -i -e '/config.h/d' MD5
cat > src/Makevars << EOF
PKG_CFLAGS = \$(shell pkg-config --cflags uuid)
PKG_LIBS = \$(shell pkg-config --libs uuid)
EOF
popd
%build
%install
%r_install
%check
%r_check
%files -f %packname.files
%changelog