aboutsummaryrefslogtreecommitdiff
path: root/pkg.bld
blob: cd9f545bd800901c8f880a405e049ccf8366c5ec (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
action "default"
{
    build: targets("pkg");
}

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

target PKG_BASE
{
    input [
        "LICENSE",
        "README.md",
        "Doxyfile",
        "Makefile",
        "version",
        files("*.bld"),
        "support/vim/syntax/taf.vim",
        "support/vim/ftdetect/taf.vim",
        "support/vim/ftplugin/taf.vim",
        files("*.sh"),
        files("autoconfig.cpp"),
        files("src/*.cpp"),
        files("src/*.h"),
        files("src/stable/*.cpp"),
        files("src/stable/*.h"),
        files("src/unstable/*.cpp"),
        files("src/unstable/*.h"),
        files("src/experimental/*.cpp"),
        files("src/experimental/*.h"),
        files("src/tests/*.cpp"),
        files("src/tests*.h"),
        files("src/tools/*.cpp"),
        files("src/tools/*.h"),
        files("src/unit/*.unit"),
        files("src/doxy/*.dox"),
        files("src/compat/*.cpp"),
        files("src/compat/*.h"),
        files("src/extra/*.cpp"),
        files("src/extra/*.h"),
        files("pregen/*"),
        "api"
        ];
    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("LICENSE", "*.md", "Makefile", "*.cpp", "*.h", "*.conf",
        "*.bld", "Doxyfile", "*.vim", "*.sh", "*.unit", "api", "version");
    profile "build"
    {
        OUTDIR = OUTPUT.replace(".tar","");
        execute("tar -f ./${OUTPUT} --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT}");
    }
}