initial import

This commit is contained in:
Neil Horman 2018-09-25 13:32:18 -04:00 committed by Neil Horman
parent c488a465fb
commit 151dc7eadb
5 changed files with 109 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/jitterentropy-library-2.1.2.tar.gz

View File

@ -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

View File

@ -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)

64
jitterentropy.spec Normal file
View File

@ -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 <nhorman@tuxdriver.com> - 2.1.2-3
- Drop static library
- Fix up naming
- Add gcc buildrequires
- Fix files glob
* Thu Sep 13 2018 Neil Horman <nhorman@tuxdriver.com> - 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 <nhorman@tuxdriver.com> - 2.1.2-1
- Initial import

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (jitterentropy-library-2.1.2.tar.gz) = b1ba2fe22c6b7d5bca64bb1611f2da3f53f1979e515a16141ccf330e3ca27a6944f0e45f0db57f4e3963a30ea4b34920ce9173f9c4f3ea82b820dc739cbd95f4