a
This commit is contained in:
56
packaging/package-deb.sh
Executable file
56
packaging/package-deb.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
PLAYGROUND_DIR=/home/doryan/Bloom/packaging/deb/playground;
|
||||
DEBIAN_DIR=${PLAYGROUND_DIR}/DEBIAN
|
||||
BLOOM_INSTALLATION_PREFIX=/opt/bloom/
|
||||
BLOOM_INSTALLATION_DIR=${PLAYGROUND_DIR}/${BLOOM_INSTALLATION_PREFIX}
|
||||
BLOOM_PACKAGE_PATH=/home/doryan/Bloom/packaging/Bloom-2.0.0-Linux-x86_64.deb
|
||||
|
||||
if [ ! -f /home/doryan/Bloom/bin/bloom ]; then
|
||||
echo "Build files not found. Did you forget to build?"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Preparing playground directory...";
|
||||
rm -fr ${PLAYGROUND_DIR};
|
||||
|
||||
mkdir -p ${PLAYGROUND_DIR};
|
||||
mkdir -p ${DEBIAN_DIR};
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR};
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR}/bin;
|
||||
|
||||
mkdir -p ${PLAYGROUND_DIR}/lib/udev/rules.d/;
|
||||
mkdir -p ${PLAYGROUND_DIR}/usr/bin/;
|
||||
|
||||
echo "Copying Debian control file...";
|
||||
cp -a /home/doryan/Bloom/packaging/deb/control ${DEBIAN_DIR}/;
|
||||
|
||||
echo "Copying Bloom binary...";
|
||||
cp -a /home/doryan/Bloom/bin/bloom ${BLOOM_INSTALLATION_DIR}/bin/;
|
||||
|
||||
echo "Copying Bloom invocation script...";
|
||||
cp -a /home/doryan/Bloom/packaging/bloom.sh ${BLOOM_INSTALLATION_DIR}/bin/;
|
||||
|
||||
echo "Copying resources...";
|
||||
cp -a /home/doryan/Bloom/resources ${BLOOM_INSTALLATION_DIR}/;
|
||||
cp -a /home/doryan/Bloom/build/distributed/fonts ${BLOOM_INSTALLATION_DIR}/resources/;
|
||||
|
||||
echo "Copying distributed binaries...";
|
||||
cp -a /home/doryan/Bloom/build/distributed/bin/lib ${BLOOM_INSTALLATION_DIR}/;
|
||||
|
||||
echo "Copying udev rules...";
|
||||
cp -a /home/doryan/Bloom/build/distributed/udevrules/99-bloom.rules ${PLAYGROUND_DIR}/lib/udev/rules.d/;
|
||||
|
||||
echo "Adjusting permissions...";
|
||||
chmod u=rwx,g=rx,o=rx -R ${BLOOM_INSTALLATION_DIR}/bin/;
|
||||
chmod u=rwx,g=rx,o=rx -R ${BLOOM_INSTALLATION_DIR}/lib/;
|
||||
|
||||
chmod u=rwX,g=rX,o=rX -R ${BLOOM_INSTALLATION_DIR}/resources/;
|
||||
|
||||
chmod u=rw,g=r,o=r ${PLAYGROUND_DIR}/lib/udev/rules.d/99-bloom.rules;
|
||||
|
||||
echo "Creating symbolic link for Bloom's invocation script..."
|
||||
ln -s -f ${BLOOM_INSTALLATION_PREFIX}./bin/bloom.sh ${PLAYGROUND_DIR}/usr/bin/bloom;
|
||||
|
||||
echo "Building Debian package...";
|
||||
dpkg-deb --build ${PLAYGROUND_DIR} ${BLOOM_PACKAGE_PATH};
|
||||
Reference in New Issue
Block a user