aboutsummaryrefslogtreecommitdiff
path: root/pkg.bld
blob: ea2f2840ba40688b620d34e9b2647b0f132183c9 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
 * Copyright (C) 2007-2014 Xagasoft, All rights reserved.
 *
 * This file is part of the Xagasoft Build and is released under the
 * terms of the license contained in the file LICENSE.
 */


action "default"
{
    build: targets("pkg");
}

target "minibu"
{
    profile "build"
    {
        condition always;
        execute("./build.sh setup");
    }
}

PKG_BASE = "build-$(cat version)-r$(svnversion "-n").tar";

target PKG_BASE
{
    input [
        "Doxyfile",
        files("*.bld"),
        "docs/build.1",
        "docs/build.7",
        files("docs/build-manual.*"),
        files("docs/html-multi/*"),
        files("docs/html-single/*"),
        "build.sh",
        "version",
        "support/vim/syntax/build.vim",
        "support/vim/ftdetect/build.vim",
        "support/vim/ftplugin/build.vim",
        files("src/*.y"),
        files("src/*.l"),
        files("src/*.c"),
        files("src/*.cpp"),
        files("src/*.h"),
        files("share/autoinclude/*"),
        files("share/include/*"),
        "minibu",
        files("minibu/bu/*"),
        files("minibu/src/*"),
        files("bootstrap/*")
        ];
    rule "tarball";
    tag "pkg";
}

target PKG_BASE + ".gz"
{
    input PKG_BASE;
    tag "pkg";
    display "gzip";
    profile "build"
    {
        execute("gzip -9 < ${INPUT} > ${OUTPUT}");
    }
}

target PKG_BASE + ".bz2"
{
    input PKG_BASE;
    tag "pkg";
    display "bzip2";
    profile "build"
    {
        execute("bzip2 -9 < ${INPUT} > ${OUTPUT}");
    }
}

target PKG_BASE + ".xz"
{
    input PKG_BASE;
    tag "pkg";
    display "xz";
    profile "build"
    {
        execute("xz -9vv < ${INPUT} > ${OUTPUT}");
    }
}

rule "tarball"
{
    input matches("*.cpp", "*.h", "*.c", "*.y", "*.l", "*.bld", "Doxyfile",
        "*.1", "*.7", "*.vim", "*.sh", "version", "*.tex", "*.pdf", "*.html",
        "*.css");
    profile "build"
    {
        OUTDIR = OUTPUT.replace(".tar","");
        execute("tar -f ./${OUTPUT} --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT}");
    }
}