| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Extract the skeleton directory structure into which samba will be installed. |
| 4 |
tar xvf skeleton.tar |
| 5 |
|
| 6 |
# Now link the skeleton directory structure into the final install tree. |
| 7 |
( |
| 8 |
cd /usr/local |
| 9 |
mv man man.orig |
| 10 |
mv samba samba.orig |
| 11 |
NOWDIR=$(pwd) |
| 12 |
ln -sf $NOWDIR/usr/local/man man |
| 13 |
ln -sf $NOWDIR/usr/local/samba samba |
| 14 |
) |
| 15 |
|
| 16 |
# Unpack the master source tarball |
| 17 |
gunzip samba-X.X.X.tar.gz |
| 18 |
tar xvf samba-X.X.X.tar |
| 19 |
|
| 20 |
# Now build the binary files |
| 21 |
cd samba-X.X.X/source |
| 22 |
./configure |
| 23 |
make |
| 24 |
make install |
| 25 |
|
| 26 |
# Install into the packaging tree that full reflects the final install tree |
| 27 |
cd $NOWDIR/usr/local/samba |
| 28 |
cp -pr man ../ |
| 29 |
rm -rf man |
| 30 |
cd $NOWDIR |
| 31 |
|
| 32 |
# Create the package tarball |
| 33 |
tar cvf install.tar usr var |
| 34 |
|
| 35 |
# Clean up original sources preserving all configured files |
| 36 |
# Note: This will allow installers to check build options |
| 37 |
cd samba-X.X.X/source |
| 38 |
rm -f ../source/bin/* |
| 39 |
make clean |
| 40 |
cd ../.. |
| 41 |
tar cvf samba-X.X.X.tar samba-X.X.X |
| 42 |
rm -rf samba-X.X.X |
| 43 |
rm -rf usr var |
| 44 |
cd .. |
| 45 |
tar cvf samba-X.X.X-OS-Version-CPU.tar samba-X.X.X |
| 46 |
gzip samba-X.X.X-OS-Version-CPU.tar |
| 47 |
|
| 48 |
# We now have the distribution package, now restore our runtime system |
| 49 |
cd samba-X.X.X |
| 50 |
tar xcf install.tar |
| 51 |
|
| 52 |
# Please test operation before shipping the binary distribution package |
| 53 |
# to the samba-team. |