From 151dc7eadb408168f6ae53a0984f25ca362e7ed9 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Tue, 25 Sep 2018 13:32:18 -0400 Subject: [PATCH] initial import --- .gitignore | 1 + jitterentropy-install-macro.patch | 31 +++++++++++++++ jitterentropy-nostrip.patch | 12 ++++++ jitterentropy.spec | 64 +++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 109 insertions(+) create mode 100644 .gitignore create mode 100644 jitterentropy-install-macro.patch create mode 100644 jitterentropy-nostrip.patch create mode 100644 jitterentropy.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..124a49e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/jitterentropy-library-2.1.2.tar.gz diff --git a/jitterentropy-install-macro.patch b/jitterentropy-install-macro.patch new file mode 100644 index 0000000..b49799c --- /dev/null +++ b/jitterentropy-install-macro.patch @@ -0,0 +1,31 @@ +diff -up ./Makefile.install ./Makefile +--- ./Makefile.install 2018-09-13 14:06:05.234120069 -0400 ++++ ./Makefile 2018-09-13 14:07:19.622835587 -0400 +@@ -1,6 +1,7 @@ + # Compile Noise Source as user space application + + CC ?= gcc ++INSTALL ?= install + CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 + #Hardening + CFLAGS +=-fstack-protector-all -fwrapv --param ssp-buffer-size=4 +@@ -47,13 +48,13 @@ scan: $(OBJS) + scan-build --use-analyzer=/usr/bin/clang $(CC) -shared -Wl,-soname,lib$(NAME).so.$(LIBMAJOR) -o lib$(NAME).so.$(LIBVERSION) $(OBJS) $(LDFLAGS) + + install: +- install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3 +- install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3 ++ $(INSTALL) -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ + gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3 +- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) +- install -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ +- install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ +- install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) ++ $(INSTALL) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ ++ $(INSTALL) -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ ++ $(INSTALL) -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ + $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) + ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) + ln -s lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so diff --git a/jitterentropy-nostrip.patch b/jitterentropy-nostrip.patch new file mode 100644 index 0000000..7bb694d --- /dev/null +++ b/jitterentropy-nostrip.patch @@ -0,0 +1,12 @@ +diff -up ./Makefile.strip ./Makefile +--- ./Makefile.strip 2018-09-10 12:15:41.193220198 -0400 ++++ ./Makefile 2018-09-10 12:15:54.606161249 -0400 +@@ -51,7 +51,7 @@ install: + install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ + gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3 + install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) +- install -m 0755 -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ ++ install -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ + install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ + install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/ + $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) diff --git a/jitterentropy.spec b/jitterentropy.spec new file mode 100644 index 0000000..7a9040a --- /dev/null +++ b/jitterentropy.spec @@ -0,0 +1,64 @@ +Name: jitterentropy +Version: 2.1.2 +Release: 3%{?dist} +Summary: Library implementing the jitter entropy source + +License: BSD or GPLv2 +URL: https://github.com/smuellerDD/jitterentropy-library +Source0: %url/archive/%{name}-library-%{version}.tar.gz + +BuildRequires: gcc + +# Disable Upstream Makefiles debuginfo strip on install +Patch0: jitterentropy-nostrip.patch +# Allow the Makefile to make use of an $(INSTALL) macro +Patch1: jitterentropy-install-macro.patch +%description +Library implementing the CPU jitter entropy source + +%package devel +Summary: Development headers for jitterentropy library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development headers and libraries for jitterentropy + +%prep +%autosetup -n %{name}-library-%{version} + +%build +%set_build_flags +%make_build + +%install +mkdir -p %{buildroot}/usr/include/ +%make_install PREFIX=/usr LIBDIR=%{_lib} + +%ldconfig_scriptlets + +%files +%doc README.md +%license COPYING COPYING.bsd COPYING.gplv2 +%{_libdir}/libjitterentropy.so.2* + + +%files devel +%{_includedir}/* +%{_libdir}/libjitterentropy.so +%{_mandir}/man3/* + +%changelog +* Fri Sep 21 2018 Neil Horman - 2.1.2-3 +- Drop static library +- Fix up naming +- Add gcc buildrequires +- Fix files glob + +* Thu Sep 13 2018 Neil Horman - 2.1.2-2 +- Fixed license +- Fixed up some macro usage in spec file +- Documented patches +- Modified makefile to use $(INSTALL) macro + +* Thu Sep 06 2018 Neil Horman - 2.1.2-1 +- Initial import diff --git a/sources b/sources new file mode 100644 index 0000000..98e8c9e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (jitterentropy-library-2.1.2.tar.gz) = b1ba2fe22c6b7d5bca64bb1611f2da3f53f1979e515a16141ccf330e3ca27a6944f0e45f0db57f4e3963a30ea4b34920ce9173f9c4f3ea82b820dc739cbd95f4