1 |
gordonr |
1.1 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
distname='SME Server' |
4 |
|
|
distvers=$(basename $(pwd)) |
5 |
slords |
1.10 |
distrel=${distvers:0:1} |
6 |
slords |
1.5 |
distarch=$(uname -i) |
7 |
gordonr |
1.1 |
|
8 |
slords |
1.10 |
if ! [ -d $distarch ] |
9 |
|
|
then |
10 |
|
|
echo "No $distarch directory?" |
11 |
|
|
exit 1 |
12 |
|
|
fi |
13 |
|
|
|
14 |
|
|
if [ "$distrel" == "7" ] |
15 |
|
|
then |
16 |
|
|
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
17 |
slords |
1.9 |
--productpath SME \ |
18 |
gordonr |
1.1 |
--withnumbers \ |
19 |
slords |
1.10 |
$(pwd)/$distarch/ |
20 |
gordonr |
1.1 |
|
21 |
slords |
1.10 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
22 |
slords |
1.9 |
--product SME \ |
23 |
slords |
1.10 |
$(pwd)/$distarch \ |
24 |
slords |
1.11 |
$distarch > pkgorder.$distarch |
25 |
gordonr |
1.1 |
|
26 |
slords |
1.10 |
for PKG in /releases/$distrel/smeextras/$distarch/RPMS/*.rpm |
27 |
|
|
do |
28 |
|
|
PKGFILE=$(basename $PKG) |
29 |
|
|
if [ ! -f $(pwd)/$distarch/SME/RPMS/$PKGFILE ] |
30 |
|
|
then |
31 |
|
|
ln -sf $PKG $(pwd)/$distarch/SME/RPMS/ |
32 |
|
|
fi |
33 |
|
|
done |
34 |
gordonr |
1.1 |
|
35 |
slords |
1.10 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
36 |
slords |
1.7 |
--product "$distname" \ |
37 |
|
|
--version "$distrel.0" \ |
38 |
|
|
--release "$distname" \ |
39 |
slords |
1.9 |
--prodpath SME \ |
40 |
slords |
1.11 |
--pkgorder pkgorder.$distarch \ |
41 |
slords |
1.10 |
$(pwd)/$distarch/ |
42 |
|
|
|
43 |
|
|
sed -i 's@1,2,3@1@' $(pwd)/$distarch/.discinfo |
44 |
|
|
else |
45 |
|
|
for PKG in /releases/testing/$distrel/smeextras/$distarch/RPMS/*.rpm |
46 |
|
|
do |
47 |
|
|
PKGFILE=$(basename $PKG) |
48 |
|
|
if [ ! -f $(pwd)/$distarch/SME/$PKGFILE ] |
49 |
|
|
then |
50 |
|
|
ln -sf $PKG $(pwd)/$distarch/SME/ |
51 |
|
|
fi |
52 |
|
|
done |
53 |
|
|
|
54 |
|
|
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
55 |
|
|
--product "$distname" \ |
56 |
|
|
--version "$distrel.0" \ |
57 |
|
|
--release "$distname" \ |
58 |
|
|
--prodpath SME \ |
59 |
|
|
--bugurl http://bugs.contribs.org/ \ |
60 |
|
|
$(pwd)/$distarch/ |
61 |
|
|
fi |
62 |
gordonr |
1.1 |
|
63 |
|
|
# Remove previous linked files |
64 |
slords |
1.10 |
find $(pwd)/$distarch/SME/ -type l | xargs rm -f |
65 |
gordonr |
1.1 |
|
66 |
|
|
# Copy updated isolinux files |
67 |
slords |
1.10 |
sudo cp -f /stage/extra/isolinux/$distrel/* $(pwd)/$distarch/isolinux/ |
68 |
slords |
1.6 |
|
69 |
slords |
1.10 |
sudo chown -R 9000:9001 $(pwd)/$distarch/ |
70 |
|
|
sudo chmod -R u+rwX,g+rwX,o+rX,o-w $(pwd)/$distarch/ |
71 |
slords |
1.8 |
|
72 |
slords |
1.10 |
echo "You now need to run /stage/bin/build_ISO as non-root" |
73 |
gordonr |
1.1 |
|
74 |
|
|
# That's it. |