]>
Commit | Line | Data |
---|---|---|
dc01aad8 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
dc01aad8 SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = multipath-tools |
d8602e2a | 7 | version = %{rel_ver}.%{rel_date} |
802ea3af | 8 | release = 1 |
dc01aad8 | 9 | |
d8602e2a SS |
10 | rel_ver = 0.4.9 |
11 | rel_date = 120613 | |
12 | ||
802ea3af MT |
13 | groups = System/Base |
14 | url = http://christophe.varoqui.free.fr/ | |
15 | license = GPL+ | |
16 | summary = Tools to manage multipath devices using device-mapper. | |
dc01aad8 | 17 | |
802ea3af MT |
18 | description |
19 | This package provides tools to manage multipath devices by | |
dc01aad8 | 20 | instructing the device-mapper multipath kernel module what to do. |
802ea3af MT |
21 | end |
22 | ||
d8602e2a SS |
23 | thisapp = %{name}-%{rel_date} |
24 | ||
25 | sources = %{thisapp}.tgz | |
802ea3af MT |
26 | |
27 | build | |
28 | requires | |
29 | gzip | |
30 | libaio-devel | |
31 | libdevmapper-devel | |
d8602e2a | 32 | libudev-devel |
802ea3af MT |
33 | ncurses-devel |
34 | readline-devel | |
35 | end | |
36 | ||
d8602e2a SS |
37 | prepare_cmds |
38 | # Fix hardcoded install location for udev rules. | |
39 | sed -e "s@lib/udev@usr/lib/udev@g" -i multipath/Makefile | |
40 | end | |
41 | ||
42 | # Install everything to the correct locations. | |
43 | make_install_targets +=\ | |
44 | bindir=%{sbindir} \ | |
45 | syslibdir=%{libdir} \ | |
46 | libdir=%{libdir}/multipath \ | |
47 | unitdir=%{unitdir} | |
802ea3af MT |
48 | |
49 | install_cmds | |
d8602e2a | 50 | # Remove old SysV init script and folder. |
802ea3af | 51 | rm -rf %{BUILDROOT}/etc/rc.d |
d8602e2a SS |
52 | |
53 | # Install configuration file. | |
54 | install -m 0664 %{DIR_SOURCE}/multipath.conf %{BUILDROOT}%{sysconfdir}/multipath.conf | |
802ea3af MT |
55 | end |
56 | end | |
57 | ||
58 | packages | |
59 | package %{name} | |
d8602e2a SS |
60 | configfiles |
61 | /etc/multipath.conf | |
62 | end | |
63 | ||
64 | script postin | |
65 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
66 | end | |
67 | ||
68 | script preun | |
69 | /usr/bin/systemctl --no-reload disable multipathd.service >/dev/null 2>&1 || : | |
70 | /usr/bin/systemctl stop multipathd.service >/dev/null 2>&1 || : | |
71 | end | |
72 | ||
73 | script postun | |
74 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
75 | end | |
76 | ||
77 | script postup | |
78 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
79 | /usr/bin/systemctl try-restart multipathd.service >/dev/null 2>&1 || : | |
80 | end | |
81 | end | |
82 | ||
83 | package kpartx | |
84 | summary = Partition manager for device-mapper devices. | |
85 | description | |
86 | kpartx manages partition creation and removal for device-mapper devices. | |
87 | end | |
88 | ||
89 | files | |
90 | %{sbindir}/kpartx | |
91 | %{mandir}/man8/kpartx.8* | |
92 | end | |
93 | end | |
1f9bc2f0 | 94 | |
802ea3af MT |
95 | package %{name}-devel |
96 | template DEVEL | |
97 | end | |
1f9bc2f0 MT |
98 | |
99 | package %{name}-debuginfo | |
100 | template DEBUGINFO | |
101 | end | |
802ea3af | 102 | end |