From e08e902303f365906f212a029f7b46423314ce5d Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 1 Dec 2020 01:44:24 +0300 Subject: [PATCH] Add RPM spec --- rpm/gf-complete.spec | 133 +++++++++++++++++++++++++++++++++++++++++++ rpm/make-tarball.sh | 5 ++ 2 files changed, 138 insertions(+) create mode 100644 rpm/gf-complete.spec create mode 100755 rpm/make-tarball.sh diff --git a/rpm/gf-complete.spec b/rpm/gf-complete.spec new file mode 100644 index 0000000..5f9f6c3 --- /dev/null +++ b/rpm/gf-complete.spec @@ -0,0 +1,133 @@ +# +# spec file for package gf-complete +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# (c) 2020 Vitaliy Filippov +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + + +%define libname libgf_complete1 +Name: gf-complete +Version: 1.0.20170410gitea75cdf +Release: 0 +Summary: Galois Field Arithmetic +License: BSD-3-Clause +Group: Development/Libraries/C and C++ +Url: http://jerasure.org/jerasure/gf-complete +Source: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +%description +Galois Field arithmetic forms the backbone of erasure-coded storage systems, +most famously the Reed-Solomon erasure code. A Galois Field is defined over +w-bit words and is termed GF(2w). As such, the elements of a Galois Field are +the integers 0, 1, . . ., 2^w − 1. Galois Field arithmetic defines addition +and multiplication over these closed sets of integers in such a way that they +work as you would hope they would work. Specifically, every number has a +unique multiplicative inverse. Moreover, there is a value, typically the value +2, which has the property that you can enumerate all of the non-zero elements +of the field by taking that value to successively higher powers. + +%package -n %{libname} +Summary: Galois Field Arithmetic development files +Group: Development/Libraries/C and C++ + +%description -n %{libname} +Galois Field arithmetic forms the backbone of erasure-coded storage systems, +most famously the Reed-Solomon erasure code. A Galois Field is defined over +w-bit words and is termed GF(2w). As such, the elements of a Galois Field are +the integers 0, 1, . . ., 2^w − 1. Galois Field arithmetic defines addition +and multiplication over these closed sets of integers in such a way that they +work as you would hope they would work. Specifically, every number has a +unique multiplicative inverse. Moreover, there is a value, typically the value +2, which has the property that you can enumerate all of the non-zero elements +of the field by taking that value to successively higher powers. +This package contains the shared library + + +%package devel +Summary: Galois Field Arithmetic development files +Group: Development/Libraries/C and C++ +Requires: %{libname} = %{version} + +%description devel +Galois Field arithmetic forms the backbone of erasure-coded storage systems, +most famously the Reed-Solomon erasure code. A Galois Field is defined over +w-bit words and is termed GF(2w). As such, the elements of a Galois Field are +the integers 0, 1, . . ., 2^w − 1. Galois Field arithmetic defines addition +and multiplication over these closed sets of integers in such a way that they +work as you would hope they would work. Specifically, every number has a +unique multiplicative inverse. Moreover, there is a value, typically the value +2, which has the property that you can enumerate all of the non-zero elements +of the field by taking that value to successively higher powers. + +%package tools +Summary: CLI tools for %{name} +Group: Development/Libraries/C and C++ + +%description tools +Various utilities that come with the %{name} library. + +%prep +%setup -q -n %{name}-%{version} + +%build +autoreconf --force --install -I m4 +%configure \ + --disable-static \ + --disable-silent-rules \ + --disable-rpath +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install %{?_smp_mflags} + +%post -n %{libname} -p /sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc COPYING README ChangeLog + +%files -n %{libname} +%defattr(-,root,root,-) +%{_libdir}/*.so.* + +%files tools +%defattr(-,root,root) +%doc COPYING README +%{_bindir}/gf_add +%{_bindir}/gf_div +%{_bindir}/gf_inline_time +%{_bindir}/gf_methods +%{_bindir}/gf_mult +%{_bindir}/gf_poly +%{_bindir}/gf_time +%{_bindir}/gf_unit +%{_bindir}/gf_example_1 +%{_bindir}/gf_example_2 +%{_bindir}/gf_example_3 +%{_bindir}/gf_example_4 +%{_bindir}/gf_example_5 +%{_bindir}/gf_example_6 +%{_bindir}/gf_example_7 + +%files devel +%defattr(-,root,root) +%{_includedir}/*h +%{_libdir}/libgf_complete.la +%{_libdir}/libgf_complete.so + +%changelog diff --git a/rpm/make-tarball.sh b/rpm/make-tarball.sh new file mode 100755 index 0000000..9a25b3b --- /dev/null +++ b/rpm/make-tarball.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# prerequisites: yum -y install rpm-build autoconf automake libtool make + +cd `dirname $0`/.. +tar --transform='s#^#gf-complete-1.0.20170410gitea75cdf/#' -cjf ~/rpmbuild/SOURCES/gf-complete-1.0.20170410gitea75cdf.tar.bz2 examples include m4 manual src test tools AUTHORS COPYING ChangeLog License.txt Makefile.am NEWS README README.txt autogen.sh configure.ac