]> www.wagner.pp.ru Git - openssl-gost/debpkg.git/blob - Makefile
Added manual pages to gostsum package
[openssl-gost/debpkg.git] / Makefile
1
2 # Use make BRANCH=something to build specific branch
3 # Upstrimv version is by default set to build date.
4 # Use make VERSION= something to override
5 #
6 BRANCH=master
7 VERSION := $(shell date +%Y%m%d)
8 PKGNAME=libengine-gost-openssl1.1
9 ARCH := $(shell dpkg --print-architecture)
10 all: $(PKGNAME)_$(VERSION)-1_$(ARCH).deb
11
12 tar: $(PKGNAME)_$(VERSION).orig.tar.bz2
13
14 #
15 # This rule updates GIT repository and creates tarball with
16 # original (upstream, i.e. distribution-agnostic) sources of engine
17 #
18 $(PKGNAME)_$(VERSION).orig.tar.bz2: engine/README.md
19         cd engine; git pull
20         cd engine; git archive --format tar \
21                 --prefix=$(PKGNAME)-$(VERSION)/ \
22                 master |bzip2 > ../$(PKGNAME)_$(VERSION).orig.tar.bz2
23 #
24 # This rule does intital clone of engine git repository should it be
25 # absent
26 #
27 engine/README.md:
28         git clone https://github.com/gost-engine/engine.git
29
30 #
31 # This rule actually build source and binare package starting with
32 # unpacked debian source directory
33 #
34
35 $(PKGNAME)_$(VERSION)-1_$(ARCH).deb: $(PKGNAME)-$(VERSION)/debian/changelog
36         cd $(PKGNAME)-$(VERSION); debuild
37 #
38 # This rule creates unpacked Debian source by copiing debian
39 # subdirectory from this git module into unpacked distribution-agnostic
40 # source.
41 # Note - change debian subdirectory here and not inside
42 # $(PKGNAME)-$(VERSION) if you want you changes survive invocation of
43 # this rule
44 #
45 $(PKGNAME)-$(VERSION)/debian/changelog: $(PKGNAME)_$(VERSION).orig.tar.bz2 $(wildcard debian/*) 
46                 rm -rf $(PKGNAME)-$(VERSION)
47                 tar xf $(PKGNAME)_$(VERSION).orig.tar.bz2
48                 cp -r debian $(PKGNAME)-$(VERSION)/debian
49                 cd $(PKGNAME)-$(VERSION); dch -v $(VERSION)-1 "Build for $(ARCH)"
50