Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:szw0407
wps-office
wps-office.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wps-office.spec of Package wps-office
%global debug_package %{nil} %global __provides_exclude_from ^/opt/.*$ %global __requires_exclude ^lib(aeo|asound|atk|Qt|xsl|av|cef|curl|c\\+\\+|et|EGL|grid|icu|IRLAS|html|jde|js|k|libsafec|media|my|opencv|qing|paho|search|sqlite|ssl|sw|thrift|tiff|uof|v8|vbe|wp|xcb|xkb|xe).*$ %define program_version 11.1.0.11719 Name: wps-office Version: %{program_version} Release: 3%{?dist} Summary: WPS Office Suite CN License: SUSE-NonFree Group: Productivity/Office/Suite URL: https://linux.wps.cn AutoReqProv: yes Source0: wps-office-%{program_version}-1.x86_64.rpm Source1: wps-office.rpmlintrc Patch0: MTEXTRA.TTF Patch1: symbol.ttf Patch2: webdings.ttf Patch3: wingding.ttf Patch4: WINGDNG2.TTF Patch5: WINGDNG3.TTF Patch6: libfreetype.so.6 Patch7: libtiff5-4.0.9-150000.45.25.1.x86_64.rpm BuildRequires: bash BuildRequires: chrpath BuildRequires: cpio BuildRequires: desktop-file-utils BuildRequires: hicolor-icon-theme BuildRequires: rpm BuildRequires: libfreetype6 %if 0%{?suse_version} || 0%{?fedora} || 0%{?mageia} BuildRequires: fdupes %endif %if 0%{?suse_version} BuildRequires: update-desktop-files %endif # Requires: libbz2.so.1 # Requires: libcairo.so.2 # Requires: libcurl.so.4 # Requires: libtcmalloc_minimal.so.4 # Requires: libcrypto.so # Requires: libdbus-1.so.3 # Requires: libjpeg.so # Requires: libsmime3.so Requires: mozilla-nss Requires: libc++abi1 Requires: libc++1 # Requires: libnss3.so # Requires: libnssckbi.so # Requires: libnssdbm3.so # Requires: libnssutil3.so # Requires: libstdc++.so.6 # Requires: libodbc.so.2 # Requires: libodbccr.so # Requires: libodbcinst.so # Requires: libpng16.so # Requires: libSDL2-2.0.so.0 Requires: openssl-1_1 # Requires: libssl.so # Requires: libswscale.so.5.9 # Requires: libswresample.so.3.9 Requires: libswresample3_9 ExclusiveArch: x86_64 %description WPS Office including Writer, Presentation and Spreadsheets, is a powerful office suite, which is able to process word file, produce wonderful slides, and analyze data as well. It is deeply compatible with all of the latest Microsoft Office file formats. It can easily open and read the documents created with Microsoft Office, especially for CJK locales. This package is repacked from www.wps.cn, with zh_CN locales and cn account access instead of global account. For users in PRC, you may use this one. Otherwise, please consider using the flatpak or other repacks. 简中 WPS Office,重新打包自https://www.wps.cn/product/wpslinux,推荐账户注册在https://account.wps.cn的用户使用;否则建议使用flatpak或者其他的打包。 This one is still in development, use at your own risk. %prep %build %install # Extract rpm file # -i: extract # -d: create directory when necessary # -m: preserve modification time rpm2cpio %{SOURCE0} | cpio -idm -D %{buildroot} rpm2cpio %{PATCH7} | cpio -idm -D ./ # Use system libraries for better security and faster startup for n in "libbz2.so*" "libc++.so*" "libc++abi.so*" "libcairo.so*" "libcrypto.so*" "libdbus-1.so*" "libjpeg.so*" "libsmime3.so" "libnss3.so*" "libnssckbi.so*" "libnssdbm3.so*" "libnssutil3.so*" "libodbc.so*" "libodbccr.so*" "libodbcinst.so*" "libpng16.so*" "libSDL2.so*" "libSDL2-2.0.so*" "libswscale.so*" "libswresample.so*" "libtcmalloc_minimal.so*" "libKMail*" do for t in f l do find %{buildroot} -type $t -name $n -exec rm -f {} \; done done # Fix invalid RPATH # bad example: /build/data/rc_v11_qt5_linux_personal_20210730_branch/x64_N/wpsenv/qt/build_x64/qtbase/lib:/build/data/rc_v11_qt5_linux_personal_20210730_branch/x64_N/wpsenv/3rd/installed/x64-linux/lib STRIP_FILE_LIST=$(find %{buildroot}/opt/ -type f -name "*.so*")" "$(find %{buildroot}/opt/kingsoft/wps-office/office*/ -maxdepth 1 -type f -name transerr -o -name et -o -name wpp -o -name wpspdf -o -name parsecloudfiletool -o -name wps -o -name promecefpluginhost) for f in ${STRIP_FILE_LIST} do RPATH_DIR_LIST=$(chrpath -l ${f}|cut -d' ' -f2|cut -d'=' -f2|tr ':' '\n') # No RPATH [ "${RPATH_DIR_LIST}" = "no" ] && continue RPATH_DIR="" for p in ${RPATH_DIR_LIST} do [ -z "${p}" ] && continue [[ "${p}" =~ "build/data" ]] && continue [ -z "${RPATH_DIR}" ] && RPATH_DIR=${p} || RPATH_DIR=${RPATH_DIR}":"${p} done # Remove invalid RPATH [ -z "${RPATH_DIR}" ] && chrpath --delete ${f} && continue chrpath -r "${RPATH_DIR}" ${f} done # Fix world-writable find %{buildroot} -type f -perm 757 -exec chmod 644 {} \; # Workaround for https://home.wps.cn/topic/3137 cp %{PATCH6} "$(find %{buildroot}/opt/ -type f -name "libicui18n.so" -exec dirname {} \;)"/ # fix libtiff.so.5 missing cp ./usr/lib64/libtiffxx.so.5 %{buildroot}/opt/kingsoft/wps-office/office6/ cp ./usr/lib64/libtiff.so.5 %{buildroot}/opt/kingsoft/wps-office/office6/ %if 0%{?suse_version} || 0%{?fedora} || 0%{?mageia} %fdupes -s %{buildroot}/opt/ %fdupes -s %{buildroot}/usr/share/icons/ %endif # add fonts cp %{PATCH0} %{buildroot}/usr/share/fonts/wps-office/ cp %{PATCH1} %{buildroot}/usr/share/fonts/wps-office/ cp %{PATCH2} %{buildroot}/usr/share/fonts/wps-office/ cp %{PATCH3} %{buildroot}/usr/share/fonts/wps-office/ cp %{PATCH4} %{buildroot}/usr/share/fonts/wps-office/ cp %{PATCH5} %{buildroot}/usr/share/fonts/wps-office/ %files %dir /opt/kingsoft /opt/kingsoft/* /usr/bin/* /usr/share/applications/* %dir /usr/share/desktop-directories /usr/share/desktop-directories/* %dir /usr/share/fonts/wps-office /usr/share/fonts/wps-office/* /usr/share/icons/hicolor/*/apps/* /usr/share/icons/hicolor/*/mimetypes/* /usr/share/mime/packages/*.xml %dir /usr/share/templates /usr/share/templates/*.desktop %dir /usr/share/templates/.source /usr/share/templates/.source/* %dir /etc/xdg/menus %dir /etc/xdg/menus/applications-merged /etc/xdg/menus/applications-merged/* %changelog %post %postun
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor