void-packages/srcpkgs/wps-office/template

51 lines
1.5 KiB
Bash

# Template file for 'wps-office'
pkgname=wps-office
version=10.1.0.6758
revision=1
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
homepage="http://wps-community.org"
license="Kingsoft WPS Community License"
#Full license is at: http://wps-community.org/license.md (Not downloadable)
short_desc="Linux office suite with similar appearance to MS Office"
allow_unknown_shlibs=yes
nodebug=yes
restricted=yes
#The programs themselves are PIE, but the error reporter isn't :/
nopie=yes
_disturl=http://kdl.cc.ksosoft.com/wps-community/download/6758
archs="i686 x86_64"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
_arch=x86_64
checksum=f941ffd7cf9066c31f0d35f2b71cb62fa600da6502b50da5efde807a34f25abb
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
_arch=x86
checksum=492f1f883c36310eb2694681d904daab7096ee8e7260a91e92d16ef62f24e8da
fi
_distTar="${pkgname}_${version}_${_arch}.tar.xz"
distfiles="${_disturl}/${_distTar}"
do_extract() {
vmkdir "opt/kingsoft/wps-office"
tar xvf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_distTar}" -C "${DESTDIR}/opt/kingsoft/wps-office" --strip-components=1
}
do_install() {
# Install the wps-office suites
vmkdir usr/bin
vmkdir usr/share
_programs="wps wpp et"
for prog in ${_programs}; do
ln -fs /opt/kingsoft/wps-office/$prog ${DESTDIR}/usr/bin/$prog
done
mv ${DESTDIR}/opt/kingsoft/wps-office/resource/* ${DESTDIR}/usr/share/
#Clean up some things
rm ${DESTDIR}/opt/kingsoft/wps-office/README.txt
rm -rf ${DESTDIR}/opt/kingsoft/wps-office/resource
}