diff --git a/.gitignore b/.gitignore index e69de29..03b3307 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cmpfit-1.2.zip diff --git a/cmpfit.spec b/cmpfit.spec new file mode 100644 index 0000000..3f5befb --- /dev/null +++ b/cmpfit.spec @@ -0,0 +1,68 @@ +# We keep track manually of the library version +%global liblongver 0.0.0 +%global libshortver 0 + +Name: cmpfit +Version: 1.2 +Release: 2%{?dist} +Summary: A MINPACK-1 Least Squares Fitting Library in C + +License: BSD +URL: http://cow.physics.wisc.edu/~craigm/idl/cmpfit.html +Source0: http://cow.physics.wisc.edu/~craigm/idl/down/%{name}-%{version}.zip + +%description +CMPFIT uses the Levenberg-Marquardt technique to solve the least-squares +problem. In its typical use, CMPFIT will be used to fit a user-supplied +function (the "model") to user-supplied data points (the "data") by adjusting +a set of parameters. CMPFIT is based upon MINPACK-1 (LMDIF.F) by More' and +collaborators. + +%package devel +Summary: Headers for developing programs that will use %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +These are the header files and libraries needed to develop a %{name} +application. + +%prep +%setup -q + +%build +# Manual build, makefile only does static library +gcc %{optflags} -fpic -c -o mpfit.o mpfit.c +gcc -shared -Wl,-soname,libmpfit.so.%{libshortver} -o libmpfit.so.%{liblongver} mpfit.o -lm + +%install +mkdir -p %{buildroot}/%{_includedir} +mkdir -p %{buildroot}/%{_libdir} + +cp mpfit.h %{buildroot}/%{_includedir} +cp libmpfit.so.%{liblongver} %{buildroot}/%{_libdir} +pushd %{buildroot}/%{_libdir} +ln -s libmpfit.so.%{liblongver} libmpfit.so.%{libshortver} +ln -s libmpfit.so.%{liblongver} libmpfit.so +popd + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc README DISCLAIMER +%{_libdir}/libmpfit.so.%{liblongver} +%{_libdir}/libmpfit.so.%{libshortver} + +%files devel +%{_includedir}/mpfit.h +%{_libdir}/libmpfit.so + +%changelog +* Fri Mar 07 2014 Sergio Pascual - 1.2-2 +- Add license in DISCLAIMER +- Update requires in cmpfit-devel + +* Fri Aug 16 2013 Sergio Pascual - 1.2-1 +- Initial spec diff --git a/sources b/sources index e69de29..a48455e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +efa731f55f4ebe29598e5f6d3f04bd2a cmpfit-1.2.zip