--- /dev/null
+--- libtommath-1.0.1/makefile.shared.orig 2017-08-29 22:27:36.000000000 +0200
++++ libtommath-1.0.1/makefile.shared 2018-04-13 18:32:50.038012830 +0200
+@@ -64,7 +64,7 @@
+ install -d $(DESTDIR)$(INCPATH)
+ $(LT) --mode=install install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
+ install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
+- sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtommath.pc.in > libtommath.pc
++ sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^libdir=.*,libdir=$(LIBPATH),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtommath.pc.in > libtommath.pc
+ install -d $(DESTDIR)$(LIBPATH)/pkgconfig
+ install -m 644 libtommath.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
+
Summary: LibTomMath - routines for integer based number theoretic applications
Summary(pl.UTF-8): LibTomMath - procedury do zastosowaĆ teorii liczb z zakresu liczb caĆkowitych
Name: libtommath
-Version: 1.0
+Version: 1.0.1
Release: 1
License: Public Domain or WTFPL v2
Group: Libraries
#Source0Download: https://github.com/libtom/libtommath/releases
Source0: https://github.com/libtom/libtommath/releases/download/v%{version}/ltm-%{version}.tar.xz
-# Source0-md5: a95dc984d8409a6f355efb0831009a66
-URL: http://www.libtom.org/LibTomMath/
+# Source0-md5: 72f4dd9dcde8338e5e3507f7bbea7582
+Patch0: %{name}-pc.patch
+URL: http://www.libtom.net/LibTomMath/
BuildRequires: libtool >= 2:1.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q
+%patch0 -p1
%build
# IGNORE_SPEED avoids overriding rpmcflags
%{__make} -f makefile.shared install \
DESTDIR=$RPM_BUILD_ROOT \
+ PREFIX=%{_prefix} \
LIBPATH=%{_libdir}
%clean
%files devel
%defattr(644,root,root,755)
-%doc bn.pdf tommath.pdf
+%doc doc/{bn.pdf,poster.pdf,tommath.pdf}
%attr(755,root,root) %{_libdir}/libtommath.so
%{_libdir}/libtommath.la
%{_includedir}/tommath*.h
+%{_pkgconfigdir}/libtommath.pc
%files static
%defattr(644,root,root,755)