DIST:=$(shell rpm --eval '%dist')
BRANCH=master
-rpm: openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm
+rpm: openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm gostsum-$(VERSION)-1$(DIST).$(ARCH).rpm
-openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm: $(RPMTOP)/RPMS/$(ARCH)/openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm
+%-$(VERSION)-1$(DIST).$(ARCH).rpm: $(RPMTOP)/RPMS/$(ARCH)/%-$(VERSION)-1$(DIST).$(ARCH).rpm
cp $^ $@
-$(RPMTOP)/RPMS/$(ARCH)/openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm: $(RPMTOP)/SOURCES/openssl-gost-engine-$(VERSION).tar.bz2 $(RPMTOP)/SPECS/openssl-gost-engine.spec
+$(RPMTOP)/RPMS/$(ARCH)/openssl-gost-engine-$(VERSION)-1$(DIST).$(ARCH).rpm $(RPMTOP)/RPMS/$(ARCH)/gostsum-$(VERSION)-1$(DIST).$(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
- CXX=/bin/true rpmbuild -ba $(RPMTOP)/SPECS/openssl-gost-engine.spec
+ rpmbuild -ba $(RPMTOP)/SPECS/openssl-gost-engine.spec
$(RPMTOP)/SPECS/openssl-gost-engine.spec: openssl-gost-engine.spec
mkdir -p $(RPMTOP)/SPECS || true
-# rpm
-spec files to build rpm package for gost engine
+GOST ENGINE RPM
+===============
+
+This repository contain spec files to build rpm package for gost engine
+
+Separate GOST engine package can be build for systems with openssl 1.1.0 and
+above.
+
+You should have installed rpm-build, git, openssl-devel and cmake in order
+to build RPM package
+
+Type make in this directory and it would
+
+1. Clone gost-engine/engine repository
+2. Prepare source tarball
+3. Copy it and spec file out into rpm build tree
+4. Build RPM
+5. Copy it back here.
+
BuildRequires: cmake, openssl-devel
Requires: openssl-libs
+
%description
This package contains openssl module with software implementation of GOST cryptoalgorithms.
+%package -n gostsum
+Summary: utilities to compute GOST hashes
+Group: Utilities/Cryptography
+License: OpenSSL
+
+%description -n gostsum
+Gostsum and gost12sum are utilities, similar to md5sum or sha1sum which computes
+
+
%prep
%setup -q
%install
install -d -m 755 %{buildroot}%{_libdir}/engines-1.1
install -c -m 755 bin/gost.so %{buildroot}%{_libdir}/engines-1.1
+install -d -m 755 %{buildroot}%{_bindir}
+install -d -m 755 %{buildroot}%{_mandir}/man1
+install -c -m 755 bin/gostsum %{buildroot}%{_bindir}
+install -c -m 755 bin/gost12sum %{buildroot}%{_bindir}
+install -c -m 644 gostsum.1 %{buildroot}%{_mandir}/man1
+install -c -m 644 gost12sum.1 %{buildroot}%{_mandir}/man1
%files
%doc README.gost
%dir %{_libdir}/engines-1.1
%{_libdir}/engines-1.1/gost.so
+%files -n gostsum
+%{_bindir}/gostsum
+%{_bindir}/gost12sum
+%{_mandir}/man1/gostsum.1*
+%{_mandir}/man1/gost12sum.1*
+
%changelog
* Wed Aug 2 2017 Victor Wagner <vitus@wagner.pp.ru>