-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile.dist
41 lines (34 loc) · 1.06 KB
/
Makefile.dist
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
34
35
36
37
38
39
40
41
##
## Usage:
##
## If the released version is tagged in the main repository, use:
##
## make -f Makefile.dist
##
## If the tag has not been pushed, use:
##
## make -f Makefile.dist REPO=${PWD}
##
## otherwise, use:
##
## make -f Makefile.dist REPO=${PWD} VERSION=master
##
#VERSION?=$(shell grep Version: _oasis | cut -d ' ' -f 2)
VERSION=$(shell cat VERSION)
REPO?=https://github.com/ocsigen/ocsigenserver
all: dist sign
dist:
@rm -rf ocsigenserver-${VERSION} \
ocsigenserver-${VERSION}.tar.gz \
ocsigenserver-${VERSION}.tar.gz.asc
git clone --local -b ${VERSION} ${REPO} ocsigenserver-${VERSION}
# oasis -C ocsigenserver-${VERSION} setup
# sed -i "s/SETUP := setup-dev.exe/SETUP := setup.exe/" \
# ocsigenserver-${VERSION}/Makefile
cd ocsigenserver-${VERSION} && rm -rf .git .gitignore Makefile.dist
tar cvzf ocsigenserver-${VERSION}.tar.gz ocsigenserver-${VERSION}
@rm -rf ocsigenserver-${VERSION}
sign: ocsigenserver-${VERSION}.tar.gz.asc
ocsigenserver-${VERSION}.tar.gz.asc: ocsigenserver-${VERSION}.tar.gz
gpg --armor -b $^
.PHONY: dist sign