Support for PKGBUILD packages and some CMake/CPACK config changes/tidying
This commit is contained in:
17
resources/packaging/PKGBUILD.template.in
Normal file
17
resources/packaging/PKGBUILD.template.in
Normal file
@@ -0,0 +1,17 @@
|
||||
pkgname=@CPACK_PACKAGE_NAME_LOWER@
|
||||
pkgver=@CMAKE_PROJECT_VERSION@
|
||||
pkgrel=1
|
||||
pkgdesc="@CPACK_PACKAGE_DESCRIPTION_SUMMARY@"
|
||||
arch=('i686' 'x86_64')
|
||||
url="@CMAKE_PROJECT_HOMEPAGE_URL@"
|
||||
license=('LGPLv3')
|
||||
install=bloom.install
|
||||
|
||||
package(){
|
||||
depends=('fontconfig>=2.11.94' 'freetype2>=2.6' 'gcc-libs>=5' 'glibc>=2.18' 'libgl' 'libglvnd' 'libpng12' 'libx11' 'libxcb' 'libxext' 'libxkbcommon>=0.5.0' 'libxkbcommon-x11>=0.5.0' 'libxrender' 'xcb-util-image>=0.2.1' 'xcb-util-keysyms>=0.4.0' 'xcb-util-renderutil' 'xcb-util-wm>=0.4.1' 'zlib>=1.1.4')
|
||||
|
||||
mkdir -p "${pkgdir}/@CPACK_PACKAGING_INSTALL_PREFIX@"
|
||||
|
||||
# Extract package data
|
||||
cp -R @CMAKE_INSTALL_PREFIX@* "${pkgdir}/@CPACK_PACKAGING_INSTALL_PREFIX@"
|
||||
}
|
||||
37
resources/packaging/bloom.install.template.in
Normal file
37
resources/packaging/bloom.install.template.in
Normal file
@@ -0,0 +1,37 @@
|
||||
post_install() {
|
||||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
|
||||
|
||||
BLOOM_UDEV_FILE_PATH=/etc/udev/rules.d/
|
||||
|
||||
if [ ! -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ ! -L "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ ! -e "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then
|
||||
sudo ln -s /opt/bloom/resources/UDevRules/99-bloom.rules "$BLOOM_UDEV_FILE_PATH";
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "/usr/bin/bloom" ] || [ -L "/usr/bin/bloom" ] || [ -e "/usr/bin/bloom" ]; then
|
||||
sudo rm /usr/bin/bloom;
|
||||
fi
|
||||
|
||||
sudo chmod u=rwx,g=rwx,o=rx -R /opt/bloom
|
||||
ln -s /opt/bloom/bin/bloom /usr/bin/bloom;
|
||||
update-desktop-database -q
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
|
||||
|
||||
BLOOM_UDEV_FILE_PATH=/etc/udev/rules.d/
|
||||
|
||||
if [ -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ -L "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ -e "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then
|
||||
sudo rm "$BLOOM_UDEV_FILE_PATH/99-bloom.rules";
|
||||
fi
|
||||
|
||||
if [ -f "/usr/bin/bloom" ] || [ -L "/usr/bin/bloom" ] || [ -e "/usr/bin/bloom" ]; then
|
||||
sudo rm /usr/bin/bloom;
|
||||
fi
|
||||
update-desktop-database -q
|
||||
}
|
||||
Reference in New Issue
Block a user