packaging: Add RPM spec file for packaging
authorSangjung woo <sangjung.woo@samsung.com>
Wed, 27 Sep 2017 07:36:29 +0000 (16:36 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 13 Mar 2018 07:04:22 +0000 (16:04 +0900)
This patch newly added the RPM spec file to build RPM package.

Signed-off-by: Sangjung woo <sangjung.woo@samsung.com>
Corrected subject format.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
packaging/lapack.spec [new file with mode: 0644]

diff --git a/packaging/lapack.spec b/packaging/lapack.spec
new file mode 100644 (file)
index 0000000..a96763e
--- /dev/null
@@ -0,0 +1,172 @@
+Name:           lapack
+Summary:        Linear Algebra Package
+Version:        3.7.1
+Release:        1
+License:        Public Domain, Freeware
+Group:          Development/Libraries/Parallel
+Source0:        %{name}-%{version}.tar.bz2
+Url:            http://www.netlib.org/lapack/
+
+BuildRequires:  cmake
+BuildRequires:  gcc-fortran
+Requires:       blas  = %{version}
+
+%description
+LAPACK provides routines for solving systems of simultaneous linear
+equations, least-squares solutions of linear systems of equations,
+eigenvalue problems, and singular value problems. The associated matrix
+factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
+also provided, as are related computations such as reordering of the
+Schur factorizations and estimating condition numbers. Dense and banded
+matrices are handled, but not general sparse matrices. In all areas,
+similar functionality is provided for real and complex matrices, in
+both single and double precision.
+
+%package devel
+Summary:        LAPACK development libraries
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       blas-devel = %{version}-%{release}
+%description devel
+LAPACK development libraries (shared).
+
+%package -n liblapacke3
+Summary:        LAPACKE development files
+Group:          Development/Libraries/C and C++
+
+%description -n liblapacke3
+This library provides a native C interface to LAPACK routines available
+at www.netlib.org/lapack to facilitate usage of LAPACK functionality
+for C programmers.
+
+%package     -n lapacke-devel
+Summary:        LAPACKE development files
+Group:          Development/Libraries/C and C++
+Requires:       liblapacke3 = %{version}
+Provides:       lapacke = %{version}
+Provides:       lapacke-devel-static = %{version}
+
+%description -n lapacke-devel
+LAPACKE headers and development files.
+
+%package -n blas
+License:        Public Domain, Freeware
+Summary:        Basic Linear Algebra Subprograms
+Group:          Productivity/Scientific/Math
+Requires:       libblas3 >= %{version}
+
+%description -n blas
+BLAS (Basic Linear Algebra Subprograms) is a standard library for
+numerical algebra. BLAS provides a number of basic algorithms for
+linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77
+and built with gfortran. BLAS manual pages are available in the
+blas-man package.
+
+%description -n blas
+BLAS (Basic Linear Algebra Subprograms) is a standard library which
+provides a number of basic algorithms for numerical algebra. 
+%package -n blas-devel
+Summary:        BLAS development libraries
+Group:          Development/Libraries
+Requires:       blas = %{version}-%{release}
+
+%description -n blas-devel
+BLAS development libraries (shared).
+
+%package -n liblapack3
+License:        Public Domain, Freeware
+Summary:        LAPACK Shared Library
+Group:          Development/Libraries/Parallel
+
+%description -n liblapack3
+LAPACK provides routines for solving systems of simultaneous linear
+equations, least-squares solutions of linear systems of equations,
+eigenvalue problems, and singular value problems. The associated matrix
+factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
+also provided, as are related computations such as reordering of the
+Schur factorizations and estimating condition numbers. Dense and banded
+matrices are handled, but not general sparse matrices. In all areas,
+similar functionality is provided for real and complex matrices, in
+both single and double precision.
+
+%package -n libblas3
+License:        Public Domain, Freeware
+Summary:        BLAS Shared Library
+Group:          Productivity/Scientific/Math
+
+%description -n libblas3
+BLAS (Basic Linear Algebra Subprograms) is a standard library for
+numerical algebra.  BLAS provides a number of basic algorithms for
+linear algebra.
+
+%prep
+%setup -q
+
+%build
+mkdir -p build
+cd build
+
+%cmake .. -DLAPACKE_WITH_TMG=YES -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir}
+make %{?_smp_mflags}
+
+%install
+
+cd build
+make DESTDIR=%{buildroot} install
+
+# Remove unnecessary files
+rm -rf %{buildroot}%{_libdir}/cmake
+
+%post -n libblas3 -p /sbin/ldconfig
+
+%postun -n libblas3 -p /sbin/ldconfig
+
+%post -n liblapack3 -p /sbin/ldconfig
+
+%postun -n liblapack3 -p /sbin/ldconfig
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{_libdir}/liblapack.so.*
+%{_libdir}/liblapacke.so.*
+
+%files devel
+%{_libdir}/liblapack.so
+%{_libdir}/libtmglib.so
+
+%files -n liblapack3
+%defattr(-,root,root)
+%{_libdir}/liblapack.so.%version
+%{_libdir}/liblapack.so.3
+
+%files -n liblapacke3
+%defattr(-,root,root,-)
+%{_libdir}/liblapacke.so.%{version}
+%{_libdir}/liblapacke.so.3
+
+%files -n lapacke-devel
+%defattr(-,root,root,-)
+%{_libdir}/liblapacke.so
+%{_includedir}/*.h
+%{_libdir}/pkgconfig/lapacke.pc
+%{_libdir}/pkgconfig/lapack.pc
+
+%files -n blas
+%defattr(-,root,root)
+%{_libdir}/libblas.so.*
+
+%files -n blas-devel
+%{_libdir}/libblas.so
+%{_libdir}/pkgconfig/blas.pc
+
+%files -n libblas3
+%defattr(-,root,root)
+%{_libdir}/libblas.so.%version
+%{_libdir}/libblas.so.3
+
+%changelog