Moved away from using CPack for generating Linux packages
This covers Debian packages
This commit is contained in:
26
build/packaging/deb/control.in
Normal file
26
build/packaging/deb/control.in
Normal file
@@ -0,0 +1,26 @@
|
||||
Package: @BLOOM_PACKAGE_NAME_LOWER@
|
||||
Version: @CMAKE_PROJECT_VERSION@
|
||||
Architecture: amd64
|
||||
Description: @BLOOM_PACKAGE_DESCRIPTION@
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Homepage: @CMAKE_PROJECT_HOMEPAGE_URL@
|
||||
Maintainer: @BLOOM_PACKAGE_CONTACT@
|
||||
Depends: libc6 (>= 2.18),
|
||||
libfontconfig1 (>= 2.11.94),
|
||||
libfreetype6 (>= 2.6),
|
||||
libgcc1 (>= 1:4.2),
|
||||
libgl1-mesa-glx | libgl1,
|
||||
libstdc++6 (>= 5),
|
||||
libudev1 (>= 183),
|
||||
libx11-6,
|
||||
libx11-xcb1,
|
||||
libxcb-icccm4 (>= 0.4.1),
|
||||
libxcb-image0 (>= 0.2.1),
|
||||
libxcb-keysyms1 (>= 0.4.0),
|
||||
libxcb-render-util0,
|
||||
libxext6,
|
||||
libxkbcommon-x11-0 (>= 0.5.0),
|
||||
libxkbcommon0 (>= 0.5.0),
|
||||
libxrender1,
|
||||
zlib1g (>= 1:1.1.4)
|
||||
49
build/packaging/deb/package-deb.sh.in
Normal file
49
build/packaging/deb/package-deb.sh.in
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
RELEASE_DIR=@CMAKE_BINARY_DIR@/packaging/tmp/deb;
|
||||
BLOOM_INSTALLATION_PREFIX=/opt/bloom/
|
||||
BLOOM_INSTALLATION_DIR=${RELEASE_DIR}./${BLOOM_INSTALLATION_PREFIX}
|
||||
BLOOM_PACKAGE_PATH=@CMAKE_BINARY_DIR@/packaging/@BLOOM_PACKAGE_FILE_NAME@.deb
|
||||
|
||||
if [ ! -f @CMAKE_BINARY_DIR@/bin/bloom ]; then
|
||||
echo "Build files not found. Did you forget to build?"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Preparing release directory...";
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR};
|
||||
mkdir -p ${BLOOM_INSTALLATION_DIR}/bin;
|
||||
|
||||
mkdir -p ${RELEASE_DIR}/usr/lib/udev/rules.d/;
|
||||
mkdir -p ${RELEASE_DIR}/usr/bin/;
|
||||
|
||||
echo "Copying Bloom binary...";
|
||||
cp @CMAKE_BINARY_DIR@/bin/bloom ${BLOOM_INSTALLATION_DIR}/bin/;
|
||||
|
||||
echo "Copying resources...";
|
||||
cp -R @CMAKE_BINARY_DIR@/resources ${BLOOM_INSTALLATION_DIR}/;
|
||||
cp -R @CMAKE_CURRENT_SOURCE_DIR@/build/distributed/fonts ${BLOOM_INSTALLATION_DIR}/resources/;
|
||||
|
||||
echo "Copying distributed binaries...";
|
||||
cp -R @CMAKE_CURRENT_SOURCE_DIR@/build/distributed/bin/lib ${BLOOM_INSTALLATION_DIR}/;
|
||||
cp -R @CMAKE_CURRENT_SOURCE_DIR@/build/distributed/bin/plugins ${BLOOM_INSTALLATION_DIR}/;
|
||||
cp -R @CMAKE_CURRENT_SOURCE_DIR@/build/distributed/bin/platforms ${BLOOM_INSTALLATION_DIR}/;
|
||||
|
||||
echo "Copying udev rules...";
|
||||
cp -R @CMAKE_CURRENT_SOURCE_DIR@/build/distributed/udevrules/99-bloom.rules ${RELEASE_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}/plugins/;
|
||||
chmod u=rwx,g=rx,o=rx -R ${BLOOM_INSTALLATION_DIR}/platforms/;
|
||||
|
||||
chmod u=rwX,g=rX,o=rX -R ${BLOOM_INSTALLATION_DIR}/resources/;
|
||||
|
||||
chmod u=rw,g=r,o=r ${RELEASE_DIR}/usr/lib/udev/rules.d/99-bloom.rules;
|
||||
|
||||
echo "Creating symbolic link for Bloom binary..."
|
||||
ln -s -f ${BLOOM_INSTALLATION_PREFIX}./bin/bloom ${RELEASE_DIR}/usr/bin/;
|
||||
|
||||
echo "Building Debian package...";
|
||||
dpkg-deb --build ${RELEASE_DIR} ${BLOOM_PACKAGE_PATH};
|
||||
Reference in New Issue
Block a user