This repository has been archived by the owner on Jun 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (61 loc) · 2.51 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Builds a tarball with the cvmfs client that can
# Requires a cvmfs build and source tree
SOURCE_TREE =
BUILD_TREE =
TARBALL_PREFIX = cvmfs-mini
TARBALL_VERSION = 0.1
TARBALL_ARCH = amd64
TARBALL_NAME = $(TARBALL_PREFIX)-$(TARBALL_VERSION)-$(TARBALL_ARCH).tar.bz2
CONTENT_DIR = $(TARBALL_PREFIX)-$(TARBALL_VERSION)-$(TARBALL_ARCH)
CVMFS_TARGETS = $(CONTENT_DIR)/bin/cvmfs2 \
$(CONTENT_DIR)/bin/libcvmfs_fuse_stub.so \
$(CONTENT_DIR)/bin/libcvmfs_fuse.so
CVMFS_HELPERS = $(CONTENT_DIR)/mount_cvmfs.sh \
$(CONTENT_DIR)/default.conf \
$(CONTENT_DIR)/default.local
CVMFS_KEYS = $(CONTENT_DIR)/keys/cern.ch.pub \
$(CONTENT_DIR)/keys/cern-it1.cern.ch.pub \
$(CONTENT_DIR)/keys/cern-it4.cern.ch.pub \
$(CONTENT_DIR)/keys/cern-it5.cern.ch.pub
all: $(TARBALL_NAME)
clean:
rm -f $(TARBALL_NAME)
rm -rf $(CONTENT_DIR)
$(TARBALL_NAME): $(CONTENT_DIR)/CONTENTS
tar cfJ $@ $(CONTENT_DIR)
rm -rf $(CONTENT_DIR)
$(CONTENT_DIR)/CONTENTS: $(CONTENT_DIR)/.done_bin $(CVMFS_HELPERS) $(CVMFS_KEYS) | $(SOURCE_TREE)/.git
echo "Tarball version: $(TARBALL_VERSION)" >> $@
echo "Git revision: $(shell cd $(SOURCE_TREE) && git rev-parse HEAD)" >> $@
echo "CernVM-FS version: $(shell cd $(BUILD_TREE)/cvmfs && ./cvmfs2 --version)" >> $@
$(CONTENT_DIR):
mkdir -p $@
$(CONTENT_DIR)/.done_minbase: | $(CONTENT_DIR)
mkdir -p $(CONTENT_DIR)/bin \
$(CONTENT_DIR)/lib \
$(CONTENT_DIR)/keys
ln -s lib $(CONTENT_DIR)/lib64
touch $@
$(CONTENT_DIR)/default.conf: default.conf | $(CONTENT_DIR)
cp $< $@
$(CONTENT_DIR)/default.local: | $(CONTENT_DIR)
touch $@
$(CONTENT_DIR)/mount_cvmfs.sh: mount_cvmfs.sh | $(CONTENT_DIR)
cp $< $@
$(CONTENT_DIR)/.done_bin: $(CVMFS_TARGETS)
./libs.sh $(CONTENT_DIR)
touch $@
$(CONTENT_DIR)/bin/cvmfs2: $(BUILD_TREE)/cvmfs/cvmfs2 $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/bin/libcvmfs_fuse_stub.so: $(BUILD_TREE)/cvmfs/libcvmfs_fuse_stub.so $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/bin/libcvmfs_fuse.so: $(BUILD_TREE)/cvmfs/libcvmfs_fuse.so $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/keys/cern.ch.pub: $(SOURCE_TREE)/mount/keys/cern.ch.pub $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/keys/cern-it1.cern.ch.pub: $(SOURCE_TREE)/mount/keys/cern-it1.cern.ch.pub $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/keys/cern-it4.cern.ch.pub: $(SOURCE_TREE)/mount/keys/cern-it4.cern.ch.pub $(CONTENT_DIR)/.done_minbase
cp $< $@
$(CONTENT_DIR)/keys/cern-it5.cern.ch.pub: $(SOURCE_TREE)/mount/keys/cern-it5.cern.ch.pub $(CONTENT_DIR)/.done_minbase
cp $< $@