diff --git a/.gitignore b/.gitignore index e69de29..c9ac452 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/mpdecimal-*.tar.gz +/dectest.zip diff --git a/mpdecimal.spec b/mpdecimal.spec new file mode 100644 index 0000000..d94ce6f --- /dev/null +++ b/mpdecimal.spec @@ -0,0 +1,86 @@ +Name: mpdecimal +Version: 2.4.2 +Release: 4%{?dist} +Summary: Library for general decimal arithmetic +License: BSD + +URL: http://www.bytereef.org/mpdecimal/index.html +Source0: http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz +Source1: http://speleotrove.com/decimal/dectest.zip + +BuildRequires: gcc +BuildRequires: unzip + +%description +The package contains a library limpdec implementing General Decimal Arithmetic +Specification. The specification, written by Mike Cowlishaw from IBM, defines +a general purpose arbitrary precision data type together with rigorously +specified functions and rounding behavior. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Development headers for mpdecimal library + +%description devel +The package contains development headers for the mpdecimal library. + +%package doc +Summary: Documentation for mpdecimal library +# docs is FBSDDL +# bundles underscore.js: MIT +# bundles jquery: MIT or GPLv2 +# jquery bundles sizzle.js: MIT and BSD and GPL +License: FBSDDL and BSD and GPL +BuildArch: noarch +Provides: bundled(js-jquery) = 1.7.2 +Provides: bundled(js-underscore) = 1.4.4 + +%description doc +The package contains documentation for the mpdecimal library. + +%prep +%autosetup +unzip -d tests/testdata %{SOURCE1} + +%build +%configure +make %{?_smp_mflags} + +%check +make check + +%install +%make_install +rm -f %{buildroot}%{_libdir}/*.a +rm -f %{buildroot}%{_pkgdocdir}/LICENSE.txt + +%files +%license LICENSE.txt +%{_libdir}/libmpdec.so.* + +%files devel +%{_libdir}/libmpdec.so +%{_includedir}/mpdecimal.h + +%files doc +%license doc/LICENSE.txt +%doc %{_pkgdocdir} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%changelog +* Tue Aug 30 2016 Jan Vcelak - 2.4.2-4 +- doc: use versioned Provides for bundled libraries + +* Mon Aug 22 2016 Jan Vcelak - 2.4.2-3 +- add ldconfig in post and postun +- doc: add license file and fix License field +- doc: add Provides for bundled JavaScript libraries + +* Fri Aug 12 2016 Jan Vcelak - 2.4.2-2 +- fix build on EPEL 7 + +* Fri Jul 15 2016 Jan Vcelak - 2.4.2-1 +- initial package diff --git a/sources b/sources index e69de29..6caa92a 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +aa63cab5d06a96855a44da2db90a29d9 mpdecimal-2.4.2.tar.gz +5bad77b2007040b4fbd2c6a25a57731b dectest.zip