1Shipwright::Manual::BuiUlsdeMrulCtoinAtrrcihbVuetSsehsdieplPw(er3ri)lghDto:c:uMmaennutaalt:i:oBnuildMultiArchVessel(3)
2
3
4
6 Shipwright::Manual::BuildMultiArchVessel - Build a vessel with
7 multi-arch support
8
10 In this tutorial, we'll build a vessel with multi-arch support, a.k.a
11 the vessel that I can use on multiple systems, e.g. Mac and Ubuntu.
12
14 Shipwright starts to have multi-arch vessel support since 2.3.0. Since
15 then, all installed bin dirs and lib will live in as/$arch_name,
16 instead of top dir.
17
18 create
19 the vessel source is exactly the same as normal one. The only
20 different part is the way we build vessel with bin/shipwright-builder
21 We need to build the vessel on both Mac and Ubuntu.
22
23 Let's do this on Mac first:
24
25 $ ./bin/shipwright-builder --install-base /tmp/foo --as Mac
26
27 if we don't specify --as, the default name is the system's uname. e.g.
28 the name is Darwin on Mac.
29
30 after we built it on Mac, we need to transfer both shipyard and vessel
31 to ubuntu, then build it again, to let it build to the same vessel dir.
32
33 $ ./bin/shipwright-builder --install-base /tmp/foo --as Ubuntu
34
35 ditto. if we don't specify --as, the as name will be Linux
36
37 Then we're done, the built vessel can run on both Mac and Ubuntu
38 systems now.
39
40 fiddle
41 most CPAN modules are written in Perl, so is cross-platform, this will
42 results in not less redundance in vessel, we can use shipwright-filter
43 to squeeze it:
44
45 $ ./bin/shipwright-filter --squeeze
46
47 This will remove redundant files and link to the left files.
48
49 e.g. as/Mac/lib/perl5/App/SD.pm and as/Ubuntu/lib/perl5/App/SD.pm have
50 the same content, after the above cmd, the latter one will be deleted
51 and (hard) linked to the former one.
52
53 use
54 the multi-arch vessel can't auto-switch between the systems for us, so
55 we need to run a cmd to tell it to, e.g.
56
57 $ cd /tmp/foo
58 # on Mac, we switch to Mac
59 $ ./tools/shipwright-utility --switch Mac
60 # on Ubuntu, we switch to Ubuntu
61 $ ./tools/shipwright-utility --switch Ubuntu
62
64 Shipwright, Shipwright::Manual
65
67 sunnavy "<sunnavy@bestpractical.com>"
68
70 Shipwright is Copyright 2007-2015 Best Practical Solutions, LLC.
71
72 This program is free software; you can redistribute it and/or modify it
73 under the same terms as Perl itself.
74
75
76
77perl v5.38.0 20S2h3i-p0w7r-i2g1ht::Manual::BuildMultiArchVessel(3)