-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (43 loc) · 1.42 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
NAME=gnt-storage-eql
BUILD_SUFFIX :=$(shell if [ -n "$(BUILD_NUMBER)" ]; then echo "-build$(BUILD_NUMBER)"; else echo ""; fi)
VERSION :=$(shell git describe --tags --always|sed 's/^v//g')$(BUILD_SUFFIX)
DIR=$(NAME)-$(VERSION)
PREFIX=/
.PHONY: default
default: deb
package: deb
.PHONY: clean
clean:
rm -fr $(NAME)-* || true
rm -f *.deb
rm -f *.rpm
$(DIR):
mkdir "$(DIR)"
mkdir -p "$(DIR)/usr/share/ganeti/extstorage/eql/common"
mkdir -p "$(DIR)/etc/ganeti/extstorage"
cp -r common/*.py "$(DIR)/usr/share/ganeti/extstorage/eql/common"
cp eql.conf "$(DIR)/etc/ganeti/extstorage/eql.conf"
cp attach "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp create "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp detach "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp grow "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp remove "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp setinfo "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp verify "$(DIR)/usr/share/ganeti/extstorage/eql/"
cp parameters.list "$(DIR)/usr/share/ganeti/extstorage/eql/"
.PHONY: deb
deb: $(DIR)
fpm -s dir -t deb -v $(VERSION) -n $(NAME) \
-d "ganeti (>= 2.10.0)" \
-d "open-iscsi" \
-d "multipath-tools" \
-d "python-paramiko" \
-a all --prefix $(PREFIX) -C $(DIR) .
.PHONY: rpm
rpm: $(DIR)
fpm -s dir -t rpm -v $(VERSION) -n $(NAME) \
-d "ganeti >= 2.10.0" \
-d "open-iscsi" \
-d "multipath-tools" \
-d "python-paramiko" \
-a all --prefix $(PREFIX) -C $(DIR) .