-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
78 lines (76 loc) · 2.79 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
all:
install:
mkdir -p "$(DESTDIR)/opt/45drives/tools"
mkdir -p "$(DESTDIR)/opt/45drives/ubm"
mkdir -p "$(DESTDIR)/etc/45drives/server_info"
mkdir -p "$(DESTDIR)/opt/45drives/dalias"
mkdir -p "$(DESTDIR)/usr/bin"
mkdir -p "$(DESTDIR)/usr/lib/udev/rules.d"
cp -a tools/* "$(DESTDIR)/opt/45drives/tools"
cp -a dalias/* "$(DESTDIR)/opt/45drives/dalias"
install -m 755 -t "$(DESTDIR)/opt/45drives/ubm" \
ubm/id_disk \
ubm/patch_vdev_id_conf \
ubm/on_enclosure_add \
ubm/on_enclosure_remove \
ubm/slot_led_ctrl \
ubm/ubm_func_wrapper.sh
install -m 644 -t "$(DESTDIR)/opt/45drives/ubm" \
ubm/ubm_funcs.sh \
ubm/slot_name_map.txt
install -m 644 -t "$(DESTDIR)/usr/lib/udev/rules.d" \
udev/61-flash-io-scheduler.rules \
udev/67-ubm.rules \
udev/68-vdev.rules
install -m 644 -t "$(DESTDIR)/opt/45drives/tools" \
udev/68-vdev.rules
ifdef TOOLS_VERSION
echo $(TOOLS_VERSION) > "$(DESTDIR)/etc/45drives/server_info/tools_version"
endif
ln -sf /opt/45drives/tools/cephfs-dir-stats "$(DESTDIR)/usr/bin/cephfs-dir-stats"
ln -sf /opt/45drives/tools/dmap "$(DESTDIR)/usr/bin/dmap"
ln -sf /opt/45drives/tools/findosd "$(DESTDIR)/usr/bin/findosd"
ln -sf /opt/45drives/tools/lsdev "$(DESTDIR)/usr/bin/lsdev"
ln -sf /opt/45drives/tools/server_identifier "$(DESTDIR)/usr/bin/server_identifier"
ln -sf /opt/45drives/tools/zcreate "$(DESTDIR)/usr/bin/zcreate"
ln -sf /opt/45drives/dalias/dalias "$(DESTDIR)/usr/bin/dalias"
ln -sf /opt/45drives/tools/wipedev "$(DESTDIR)/usr/bin/wipedev"
ln -sf /opt/45drives/ubm/slot_led_ctrl "$(DESTDIR)/usr/bin/slot_led_ctrl"
ln -sf /opt/45drives/tools/slot_speeds "$(DESTDIR)/usr/bin/slot_speeds"
for i in \
slot_num_to_slot_name \
slot_name_to_slot_num \
block_dev_to_slot_num \
block_dev_to_slot_name \
slot_num_to_block_dev \
slot_name_to_block_dev \
all_slot_nums \
all_slot_names \
check_ubm_func_support \
; do ln -sf /opt/45drives/ubm/ubm_func_wrapper.sh "$(DESTDIR)/usr/bin/$$i"; done
uninstall:
rm -rf "$(DESTDIR)/etc/45drives/server_info"
rm -rf "$(DESTDIR)/opt/45drives/tools"
rm -rf "$(DESTDIR)/opt/45drives/ubm"
rm -f "$(DESTDIR)/usr/bin/cephfs-dir-stats"
rm -f "$(DESTDIR)/usr/bin/dmap"
rm -f "$(DESTDIR)/usr/bin/findosd"
rm -f "$(DESTDIR)/usr/bin/lsdev"
rm -f "$(DESTDIR)/usr/bin/server_identifier"
rm -f "$(DESTDIR)/usr/bin/zcreate"
rm -f "$(DESTDIR)/usr/lib/udev/rules.d/{61-flash-io-scheduler.rules,67-ubm.rules}"
rm -f "$(DESTDIR)/usr/bin/dalias"
rm -f "$(DESTDIR)/usr/bin/wipedev"
rm -f "$(DESTDIR)/usr/bin/slot_led_ctrl"
rm -f "$(DESTDIR)/usr/bin/slot_speeds"
for i in \
slot_num_to_slot_name \
slot_name_to_slot_num \
block_dev_to_slot_num \
block_dev_to_slot_name \
slot_num_to_block_dev \
slot_name_to_block_dev \
all_slot_nums \
all_slot_names \
check_ubm_func_support \
; do rm -f "$(DESTDIR)/usr/bin/$$i"; done