summaryrefslogtreecommitdiffstats
path: root/examples/packages/README.md
blob: 838dc53eb8064f6d182f0636af30eeb5a2125b94 (plain)
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
82
# Example package tree

This subtree contains a large number of "packages", whereas each "package" is
nothing more than a number piped to a file.
This can be used to test out butido and how it works.


## The packages

Each package has a single-letter name ('a'..'z') and a version number that
increases for each package, so 'a' has version '1', and 'b' has version '2' and
so on.

The hierarchy of packages is described as follows:

                              A
                              +
                              |
              +---------------+----------------+
              |                                |
              v                                v
              B                                C
              +                                +
              |                      +--------------------+
       +-------------+               |         |          |
       v      v      v               v         v          v
       D      E      F+--------+     G         H          I
       +      +      +         |     +                    +
       |      |      |         |     |                +---+---+
       v      v      v         +---+-+-+---+          v       v
       J      K      L         |   |   |   |          Q       R
       +      +      +         v   v   v   v          +
    +--+---+  |      |         M   N   O   P          |
    v      v  |      v                 +   +          v
    S      T  +----->U                 |   |          V
                     +                 |   |          +
                     |                 |   |          |
                     |                 |   |          v
                     |                 |   |          W
                     |                 |   |          +
                     |                 |   |          |
                     |                 |   |          v
                     +-----------------+---+------->  X
                                                      +
                                                      |
                                                      v
                                                      Y
                                                      +
                                                      |
                                                      v
                                                      Z


The important features here:

* A simple chain of dependencies: Q -> V -> W -> X -> Y -> Z
* DAG-Features (non-treeish dependencies):
    * F -> M
    * K -> U
    * O -> X
    * P -> X


The order of builds should be opposite of the arrows, with builds for Z, R, H,
N, M, T and S starting right away.


Multiple versions of one package are not yet considered in this setup.


# The packaging

The packaging script does the following:

* In the "sourcecheck" phase, it checks whether the input is present (that would
  be the .tar.gz file of the package to compile)
* In the "depcheck" phase, it checks whether all dependencies are present. This
  is done to demonstrate what could be done, not because it makes a great deal
  of sense
* In the "build" phase, it "builds" a package, by piping the version number of
  the package itself to the output file.