1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/packaging/Example/package-prep
Andreas Schneider 3849802497 packaging: Reformat shell scripts
shfmt -f packaging/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 24 10:13:36 UTC 2022 on sn-devel-184
2022-02-24 10:13:36 +00:00

54 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Extract the skeleton directory structure into which samba will be installed.
tar xvf skeleton.tar
# Now link the skeleton directory structure into the final install tree.
(
cd /usr/local
mv man man.orig
mv samba samba.orig
NOWDIR=$(pwd)
ln -sf $NOWDIR/usr/local/man man
ln -sf $NOWDIR/usr/local/samba samba
)
# Unpack the master source tarball
gunzip samba-X.X.X.tar.gz
tar xvf samba-X.X.X.tar
# Now build the binary files
cd samba-X.X.X/source
./configure
make
make install
# Install into the packaging tree that full reflects the final install tree
cd $NOWDIR/usr/local/samba
cp -pr man ../
rm -rf man
cd $NOWDIR
# Create the package tarball
tar cvf install.tar usr var
# Clean up original sources preserving all configured files
# Note: This will allow installers to check build options
cd samba-X.X.X/source
rm -f ../source/bin/*
make clean
cd ../..
tar cvf samba-X.X.X.tar samba-X.X.X
rm -rf samba-X.X.X
rm -rf usr var
cd ..
tar cvf samba-X.X.X-OS-Version-CPU.tar samba-X.X.X
gzip samba-X.X.X-OS-Version-CPU.tar
# We now have the distribution package, now restore our runtime system
cd samba-X.X.X
tar xcf install.tar
# Please test operation before shipping the binary distribution package
# to the samba-team.