aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository_TEST_pbin_setup.sh
blob: c33854479a74b36b52858617937db1401f3d874a (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir e_repository_TEST_pbin_dir || exit 1
cd e_repository_TEST_pbin_dir || exit 1

mkdir -p root/etc

mkdir -p vdb
touch vdb/THISISTHEVDB

mkdir -p build
ln -s build symlinked_build

mkdir -p distdir

for e in 0 1 2 3 4 ; do
    mkdir -p repo${e}/{profiles/profile,metadata,eclass} || exit 1
    cd repo${e} || exit 1
    echo "repo${e}" >> profiles/repo_name || exit 1
    echo "cat" >> profiles/categories || exit 1
    cat <<END > profiles/profile/virtuals
END
    cat <<END > profiles/profile/make.defaults
ARCH="cheese"
USERLAND="GNU"
KERNEL="linux"
LIBC="glibc"
CHOST="i286-badger-linux-gnu"
LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
USE_EXPAND="LINGUAS USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_IMPLICIT="USERLAND ARCH"
USE_EXPAND_VALUES_USERLAND="GNU"
USE_EXPAND_VALUES_ARCH="cheese otherarch"
IUSE_IMPLICIT="build"
END
    mkdir -p "cat/simple"
    cat <<END > cat/simple/simple-1.ebuild || exit 1
EAPI="${e}"
DESCRIPTION="The Description"
HOMEPAGE="http://example.com/"
SRC_URI=""
SLOT="0"
IUSE=""
LICENSE="GPL-2"
KEYWORDS="test"
S="\${WORKDIR}"

src_unpack() {
    touch installed-${e}
}

src_install() {
    insinto /
    doins installed-${e}
}
END

    cd ..

    mkdir -p binrepo${e}/{profiles/profile,metadata,eclass} || exit 1
    cd binrepo${e} || exit 1
    echo "binrepo${e}" >> profiles/repo_name || exit 1
    echo > profiles/categories || exit 1
    cat <<END > profiles/profile/virtuals
END
    cat <<END > profiles/profile/make.defaults
ARCH="cheese"
USERLAND="GNU"
KERNEL="linux"
LIBC="glibc"
CHOST="i286-badger-linux-gnu"
LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
USE_EXPAND="LINGUAS USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_IMPLICIT="USERLAND ARCH"
USE_EXPAND_VALUES_USERLAND="GNU"
USE_EXPAND_VALUES_ARCH="cheese otherarch"
IUSE_IMPLICIT="build"
END

    cd ..
done

for e in exheres-0 ; do
    mkdir -p repo${e}/{profiles/profile,metadata,eclass} || exit 1
    cd repo${e} || exit 1
    echo "repo${e}" >> profiles/repo_name || exit 1
    echo "cat" >> profiles/categories || exit 1
    cat <<END > profiles/profile/virtuals
END
    cat <<END > profiles/profile/make.defaults
ARCH="cheese"
USERLAND="GNU"
KERNEL="linux"
LIBC="glibc"
CHOST="i286-badger-linux-gnu"
LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
USE_EXPAND="LINGUAS USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_IMPLICIT="USERLAND ARCH"
USE_EXPAND_VALUES_USERLAND="GNU"
USE_EXPAND_VALUES_ARCH="cheese otherarch"
IUSE_IMPLICIT="build"
END

    mkdir -p "cat/simple"
    cat <<END > cat/simple/simple-1.ebuild || exit 1
EAPI="${e}"
DESCRIPTION="The Description"
HOMEPAGE="http://example.com/"
DOWNLOADS=""
SLOT="0"
MYOPTIONS=""
LICENCES="GPL-2"
PLATFORMS="test"
WORK="\${WORKBASE}"

src_unpack() {
    touch installed-${e}
}

src_install() {
    insinto /
    doins installed-${e}
}
END

    mkdir -p "cat/symlinks"
    cat <<END > cat/symlinks/symlinks-1.ebuild || exit 1
EAPI="${e}"
DESCRIPTION="The Description"
HOMEPAGE="http://example.com/"
DOWNLOADS=""
SLOT="0"
MYOPTIONS=""
LICENCES="GPL-2"
PLATFORMS="test"
WORK="\${WORKBASE}"

src_unpack() {
    touch symlinks-b
}

src_install() {
    insinto /
    dosym symlinks-b symlinks-a
    doins symlinks-b
    dosym /symlinks-b symlinks-c
    find \${IMAGE} | xargs ls -ld
}
END

    cd ..

    mkdir -p binrepo${e}/{profiles/profile,metadata,eclass} || exit 1
    cd binrepo${e} || exit 1
    echo "binrepo${e}" >> profiles/repo_name || exit 1
    echo > profiles/categories || exit 1
    cat <<END > profiles/profile/virtuals
END
    cat <<END > profiles/profile/make.defaults
ARCH="cheese"
USERLAND="GNU"
KERNEL="linux"
LIBC="glibc"
CHOST="i286-badger-linux-gnu"
LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
USE_EXPAND="LINGUAS USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_IMPLICIT="USERLAND ARCH"
USE_EXPAND_VALUES_USERLAND="GNU"
USE_EXPAND_VALUES_ARCH="cheese otherarch"
IUSE_IMPLICIT="build"
END

    cd ..
done

cd ..