libreoffice: switch to the standard /usr prefix.
This commit is contained in:
parent
7474cdcc3f
commit
bf8533d881
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'libreoffice'
|
||||
pkgname=libreoffice
|
||||
version=5.1.2.2
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-werror"
|
||||
nopie=yes
|
||||
|
@ -53,9 +53,6 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Install location: either /usr or e.g. /opt/libreofficeX.Y.Z
|
||||
_LO_PREFIX=/usr/${pkgname}${version%.*.*}
|
||||
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
# mariadbclient can't currently be cross compiled
|
||||
makedepends+=" libmariadbclient-devel"
|
||||
|
@ -97,8 +94,6 @@ do_configure() {
|
|||
# Add linux-musl* as host OS to lines containing linux-gnu*
|
||||
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-help"
|
||||
configure_args+=" --with-alloc=system"
|
||||
|
@ -183,67 +178,8 @@ do_build() {
|
|||
|
||||
do_install() {
|
||||
local f
|
||||
local INSTDIR=${DESTDIR}${_LO_PREFIX}
|
||||
|
||||
make DESTDIR="${DESTDIR}" PREFIXDIR="${_LO_PREFIX}" 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
|
||||
make DESTDIR="${DESTDIR}" PREFIXDIR="/usr" distro-pack-install
|
||||
|
||||
mkdir -p ${INSTDIR}/share/appdata
|
||||
cp -p sysui/desktop/appstream-appdata/*.xml ${INSTDIR}/share/appdata/
|
||||
|
|
Loading…
Reference in New Issue