mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
libreoffice: switch to the standard /usr prefix.
This commit is contained in:
parent
7474cdcc3f
commit
bf8533d881
1 changed files with 2 additions and 66 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'libreoffice'
|
# Template file for 'libreoffice'
|
||||||
pkgname=libreoffice
|
pkgname=libreoffice
|
||||||
version=5.1.2.2
|
version=5.1.2.2
|
||||||
revision=2
|
revision=3
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--disable-werror"
|
configure_args="--disable-werror"
|
||||||
nopie=yes
|
nopie=yes
|
||||||
|
@ -53,9 +53,6 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install location: either /usr or e.g. /opt/libreofficeX.Y.Z
|
|
||||||
_LO_PREFIX=/usr/${pkgname}${version%.*.*}
|
|
||||||
|
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
# mariadbclient can't currently be cross compiled
|
# mariadbclient can't currently be cross compiled
|
||||||
makedepends+=" libmariadbclient-devel"
|
makedepends+=" libmariadbclient-devel"
|
||||||
|
@ -97,8 +94,6 @@ do_configure() {
|
||||||
# Add linux-musl* as host OS to lines containing linux-gnu*
|
# Add linux-musl* as host OS to lines containing linux-gnu*
|
||||||
sed -i configure -e 's;linux-gnu\*;linux-gnu*|linux-musl*;g'
|
sed -i configure -e 's;linux-gnu\*;linux-gnu*|linux-musl*;g'
|
||||||
|
|
||||||
configure_args+=" --prefix=${_LO_PREFIX}"
|
|
||||||
configure_args+=" --exec-prefix=${_LO_PREFIX}"
|
|
||||||
configure_args+=" --with-vendor='VoidLinux'"
|
configure_args+=" --with-vendor='VoidLinux'"
|
||||||
configure_args+=" --with-help"
|
configure_args+=" --with-help"
|
||||||
configure_args+=" --with-alloc=system"
|
configure_args+=" --with-alloc=system"
|
||||||
|
@ -183,67 +178,8 @@ do_build() {
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
local f
|
local f
|
||||||
local INSTDIR=${DESTDIR}${_LO_PREFIX}
|
|
||||||
|
|
||||||
make DESTDIR="${DESTDIR}" PREFIXDIR="${_LO_PREFIX}" distro-pack-install
|
make DESTDIR="${DESTDIR}" PREFIXDIR="/usr" distro-pack-install
|
||||||
|
|
||||||
if [ "${_LO_PREFIX}" != "/usr" ]; then
|
|
||||||
# HACK: for unknow reasons the i686 build ignores --prefix and installs in /usr
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
|
||||||
# Copy from wrong install path
|
|
||||||
mkdir -p ${INSTDIR}/bin
|
|
||||||
if [ -d ${DESTDIR}/usr/bin ]; then
|
|
||||||
cp -pR ${DESTDIR}/usr/bin/* ${INSTDIR}/bin/
|
|
||||||
rm -rf ${DESTDIR}/usr/bin
|
|
||||||
fi
|
|
||||||
mkdir -p ${INSTDIR}/lib
|
|
||||||
if [ -d ${DESTDIR}/usr/lib ]; then
|
|
||||||
cp -pR ${DESTDIR}/usr/lib/* ${INSTDIR}/lib/
|
|
||||||
rm -rf ${DESTDIR}/usr/lib
|
|
||||||
fi
|
|
||||||
if [ -d ${DESTDIR}/usr/lib32 ]; then
|
|
||||||
cp -pR ${DESTDIR}/usr/lib32/* ${INSTDIR}/lib/
|
|
||||||
rm -rf ${DESTDIR}/usr/lib32
|
|
||||||
fi
|
|
||||||
mkdir -p ${INSTDIR}/share
|
|
||||||
if [ -d ${DESTDIR}/usr/lib32 ]; then
|
|
||||||
cp -pR ${DESTDIR}/usr/share/* ${INSTDIR}/share/
|
|
||||||
rm -rf ${DESTDIR}/usr/share
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This symlink is necessary for the desktop menu entries
|
|
||||||
vmkdir usr/bin
|
|
||||||
ln -sf ${_LO_PREFIX}/lib/libreoffice/program/soffice \
|
|
||||||
${DESTDIR}/usr/bin/libreoffice
|
|
||||||
|
|
||||||
if [ -d ${INSTDIR}/share/icons/hicolor/32x32/apps ]; then
|
|
||||||
# Icons
|
|
||||||
vmkdir usr/share/pixmaps
|
|
||||||
for f in $(find ${INSTDIR}/share/icons/hicolor/32x32/apps -type f); do
|
|
||||||
f=${f#${DESTDIR}}
|
|
||||||
ln -sf $f ${DESTDIR}/usr/share/pixmaps/
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ${INSTDIR}/lib/libreoffice/share/xdg ]; then
|
|
||||||
# Desktop menu entries
|
|
||||||
vmkdir usr/share/applications
|
|
||||||
for f in $(find ${INSTDIR}/lib/libreoffice/share/xdg -type f); do
|
|
||||||
f=${f#${DESTDIR}}
|
|
||||||
ln -sf $f ${DESTDIR}/usr/share/applications/libreoffice-$(basename $f)
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ${INSTDIR}/share/man/man1 ]; then
|
|
||||||
# Manual pages
|
|
||||||
vmkdir usr/share/man/man1
|
|
||||||
for f in $(find ${INSTDIR}/share/man/man1 -type f); do
|
|
||||||
f=${f#${DESTDIR}}
|
|
||||||
ln -sf $f ${DESTDIR}/usr/share/man/man1/
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p ${INSTDIR}/share/appdata
|
mkdir -p ${INSTDIR}/share/appdata
|
||||||
cp -p sysui/desktop/appstream-appdata/*.xml ${INSTDIR}/share/appdata/
|
cp -p sysui/desktop/appstream-appdata/*.xml ${INSTDIR}/share/appdata/
|
||||||
|
|
Loading…
Add table
Reference in a new issue