a
This commit is contained in:
7
packaging/bloom.sh
Normal file
7
packaging/bloom.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
BloomInstallationDir=/opt/bloom
|
||||
|
||||
LD_LIBRARY_PATH=/opt/bloom/lib:$LD_LIBRARY_PATH;
|
||||
export LD_LIBRARY_PATH;
|
||||
exec $BloomInstallationDir/bin/bloom "$@";
|
||||
20
packaging/deb/control
Normal file
20
packaging/deb/control
Normal file
@@ -0,0 +1,20 @@
|
||||
Package: bloom
|
||||
Version: 2.0.0
|
||||
Architecture: amd64
|
||||
Description: On-chip debugging for AVR and RISC-V microcontrollers
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Homepage: https://bloom.oscillate.io
|
||||
Maintainer: Nav Mohammed <support@bloom.oscillate.io>
|
||||
Depends: libc6 (>= 2.18),
|
||||
libudev1 (>= 183),
|
||||
libgcc1 (>= 1:4.2),
|
||||
libsystemd0,
|
||||
libqt6core6,
|
||||
libqt6network6,
|
||||
libqt6xml6,
|
||||
qt6-qpa-plugins,
|
||||
libqt6gui6,
|
||||
libqt6widgets6,
|
||||
libqt6uitools6,
|
||||
libqt6svg6
|
||||
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};
|
||||
61
packaging/package-pkgbuild.sh
Executable file
61
packaging/package-pkgbuild.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
PLAYGROUND_DIR=/home/doryan/Bloom/packaging/pkgbuild/playground;
|
||||
BUILD_ROOT_DIR=${PLAYGROUND_DIR}/build_root
|
||||
BLOOM_INSTALLATION_PREFIX=/opt/bloom/
|
||||
BLOOM_INSTALLATION_DIR=${BUILD_ROOT_DIR}/${BLOOM_INSTALLATION_PREFIX}
|
||||
BLOOM_PACKAGE_PATH=/home/doryan/Bloom/packaging/Bloom-2.0.0-Linux-x86_64.pkg.tar.gz
|
||||
|
||||
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 ${BUILD_ROOT_DIR};
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR};
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR}/bin;
|
||||
|
||||
mkdir -p ${BUILD_ROOT_DIR}/usr/lib/udev/rules.d/;
|
||||
mkdir -p ${BUILD_ROOT_DIR}/usr/bin/;
|
||||
|
||||
echo "Copying PKGBUILD control file...";
|
||||
cp -a /home/doryan/Bloom/packaging/pkgbuild/PKGBUILD ${PLAYGROUND_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}/;
|
||||
|
||||
# We don't ship libstdc++ shared objects in Arch packages - the package manager will install the one we need
|
||||
rm -f ${BLOOM_INSTALLATION_DIR}/lib/libstdc++.so.*;
|
||||
|
||||
echo "Copying udev rules...";
|
||||
cp -a /home/doryan/Bloom/build/distributed/udevrules/99-bloom.rules ${BUILD_ROOT_DIR}/usr/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 ${BUILD_ROOT_DIR}/usr/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 ${BUILD_ROOT_DIR}/usr/bin/bloom;
|
||||
|
||||
echo "Building Arch package...";
|
||||
cd ${PLAYGROUND_DIR};
|
||||
makepkg;
|
||||
mv ./bloom-2.0.0-1-x86_64.pkg.tar.gz ${BLOOM_PACKAGE_PATH};
|
||||
20
packaging/pkgbuild/PKGBUILD
Normal file
20
packaging/pkgbuild/PKGBUILD
Normal file
@@ -0,0 +1,20 @@
|
||||
pkgname=bloom
|
||||
pkgver=2.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="On-chip debugging for AVR and RISC-V microcontrollers"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://bloom.oscillate.io"
|
||||
license=('LGPLv3')
|
||||
|
||||
package(){
|
||||
depends=(
|
||||
'gcc-libs>=13.2.0'
|
||||
'glibc>=2.18'
|
||||
'qt6-base'
|
||||
'qt6-tools'
|
||||
'qt6-svg'
|
||||
)
|
||||
|
||||
mkdir -p "${pkgdir}/"
|
||||
cp -R /home/doryan/Bloom/packaging/pkgbuild/playground/build_root/* "${pkgdir}/"
|
||||
}
|
||||
Reference in New Issue
Block a user