-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
33 lines (25 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 gostsum-$(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)/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
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)