From 366809d9347a6848e2ca0cf4bca3915b9b89e126 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Wed, 2 Aug 2017 14:02:36 +0300 Subject: [PATCH] Initial build --- Makefile | 33 ++++++++++++++++++++++++++++++++ openssl-gost-engine.spec | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 Makefile create mode 100644 openssl-gost-engine.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ff41ace --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +VERSION:=$(shell date +%Y%m%d) +RPMTOP:=$(shell rpm --eval '%_topdir') +ARCH:=$(shell rpm --eval '%_arch') +DIST:=$(shell rpm --eval '%dist') +BRANCH=master + +rpm: openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm + +openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm: $(RPMTOP)/RPMS/$(ARCH)/openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm + cp $^ $@ + +$(RPMTOP)/RPMS/$(ARCH)/openssl-gost-engine-$(VERSION)-1.$(ARCH).rpm: $(RPMTOP)/SOURCES/openssl-gost-engine-$(VERSION).tar.bz2 $(RPMTOP)/SPECS/openssl-gost-engine.spec + mkdir -p $(RPMTOP)/RPMS/$(ARCH) || true + mkdir -p $(RPMTOP)/SRPMS + rpmbuild -ba $(RPMTOP)/SPECS/openssl-gost-engine.spec + +$(RPMTOP)/SPECS/openssl-gost-engine.spec: openssl-gost-engine.spec + mkdir -p $(RPMTOP)/SPECS || true + sed 's/^Version: .*$$/Version: $(VERSION)/' $^> $@ + +$(RPMTOP)/SOURCES/openssl-gost-engine-$(VERSION).tar.bz2: engine/README.md + mkdir -p $(RPMTOP)/SOURCES || true + cd engine; git pull + cd engine; git archive --format tar --prefix=openssl-gost-engine-$(VERSION)/ $(BRANCH) > $@ + +engine/README.md: + git clone https://github.com/gost-engine/engine.git + + +envtest: + : ARCH=$(ARCH) + : VERSION=$(VERSION) + : RPMTOP=$(RPMTOP) diff --git a/openssl-gost-engine.spec b/openssl-gost-engine.spec new file mode 100644 index 0000000..310d1ce --- /dev/null +++ b/openssl-gost-engine.spec @@ -0,0 +1,41 @@ +Name: openssl-gost-engine +Version: +Release: 1%{?dist} +Summary: Loadable module for openssl implementing GOST cryptoalgoritms + +Group: Libraries/Cryptography +License: OpenSSL +URL: https://github.com/gost-engine/engine +Source0: %{name}-%{version}.tar.bz2 + +BuildRequires: cmake, openssl-devel +Requires: openssl-libs + +%description + +This package contains openssl module with software implementation of GOST cryptoalgorithms. + +%prep +%setup -q + + +%build +cmake . +make %{?_smp_mflags} + + +%install +install -d -m 755 %{buildroot}%{_libdir}/engines-1.1 +install -c -m 755 bin/gost.so %{buildroot}%{_libdir}/engines-1.1 + +%files +%doc README.gost +%doc README.md +%dir %{_libdir}/engines-1.1 +%{_libdir}/engines-1.1/gost.so + +%changelog + +* Wed Aug 2 2017 Victor Wagner +- initial release + -- 2.39.5