BuildRequires: xz
BuildRequires: m4 >= 1.4.6
BuildRequires: guile guile-devel libguile guile-modules gmp-devel
-BuildRequires: libgc-devel libffi-devel
+BuildRequires: libgc-devel-static libffi-devel-static
+BuildRequires: libunistring-devel-static
Url: http://www.gnu.org/software/autogen
Requires: m4 >= 1.4.6
Requires: perl >= 5.6
Group: Development/Tools/Building
Source: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
-ExcludeArch: %arm aarch64
%description
AutoGen is a tool designed to simplify the creation and maintenance of programs that contain large amounts of repetitious text. It is especially valuable in programs that have several blocks of text that must be kept synchronized.
cp %{SOURCE1001} .
%build
-CFLAGS='-Wno-error=format-truncation' \
-%reconfigure --disable-dependency-tracking LDFLAGS="-lgmp"
+export PKG_CONFIG="pkg-config --static"
+export GUILE_LINK=$(guile-config link --static | sed -e 's|[[:space:]][^[:space:]]\+libunistring.so[^[:space:]]*[[:space:]]| -lunistring |')
+
+%reconfigure --disable-dependency-tracking \
+ --enable-static --disable-shared \
+ GUILE_LIBS="-Wl,--whole-archive -Wl,--allow-multiple-definition ${GUILE_LINK} -Wl,--no-whole-archive" \
+ CFLAGS="-Wno-error=format-overflow"
%{__make} %{?_smp_mflags} V=1
%check
-trap 'test $? -ne 0 && cat tests/testsuite.log' EXIT
-make check
+%{?run_tests:
+ trap 'test $? -ne 0 && cat tests/testsuite.log' EXIT
+ %{__make} check
+}
%install
%{?make_install} %{!?make_install:%{__make} install DESTDIR=%{buildroot}}
%{_prefix}/bin/*
%{_prefix}/share/%{name}
%{_includedir}/autoopts/*
-%{_libdir}/libopts*
+%{_libdir}/*
%{_datadir}/aclocal/autoopts.m4
%{_libdir}/pkgconfig/autoopts.pc
%{_libdir}/autogen/tpl-config.tlib