| 1 |
#!/usr/bin/make -f |
| 2 |
################################################################################ |
| 3 |
# LibreOffice source package rules file |
| 4 |
# |
| 5 |
# Please see debian/README for detailed documentation about the build system, and |
| 6 |
# how to build LibreOffice. |
| 7 |
################################################################################ |
| 8 |
# Authors: |
| 9 |
# Chris Halls <[email protected]> |
| 10 |
# Rene Engelhard <[email protected]> |
| 11 |
# Copyright 2002-2025 Software in the Public Interest, Inc. |
| 12 |
# Portions Copyright 2010 Canonical Ltd. Author: Matthias Klose |
| 13 |
# Portions Copyright 2011-2013 Canonical Ltd. Author: Bjoern Michaelsen |
| 14 |
# Licensed under the GNU General Public License, version 2. See the file |
| 15 |
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>. |
| 16 |
################################################################################ |
| 17 |
|
| 18 |
vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) |
| 19 |
|
| 20 |
include /usr/share/dpkg/pkg-info.mk |
| 21 |
CURDIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..) |
| 22 |
BASE_VERSION:=$(shell echo $(DEB_VERSION) | cut -d: -f1):$(DEB_VERSION_UPSTREAM) |
| 23 |
BINARY_VERSION=$(DEB_VERSION) |
| 24 |
OOVER:=26.2 |
| 25 |
HELP_L10N_VIRTUAL_VERSION:=$(OOVER) |
| 26 |
ifeq "$(shell echo $(OOVER) | cut -d. -f2)" "2" |
| 27 |
# 24.2 + .6 -> 24.8 -> OK |
| 28 |
NEXT_OOVER=$(shell echo "$(OOVER) + .6" | bc) |
| 29 |
else |
| 30 |
# 24.8 + .6 = 25.4 -> wrong (doesn't take into account that the year |
| 31 |
# has 12 months)so subtract 2 (so effectively + .4) to get back to February (25.2), |
| 32 |
# which is supposed to be the schedule. |
| 33 |
NEXT_OOVER=$(shell echo "$(OOVER) + .4" | bc) |
| 34 |
endif |
| 35 |
|
| 36 |
ARCH_INDEP_PACKAGES := $(shell dh_listpackages -i) |
| 37 |
ARCH_DEP_PACKAGES := $(shell dh_listpackages -a) |
| 38 |
PACKAGES := $(ARCH_INDEP_PACKAGES) $(ARCH_DEP_PACKAGES) |
| 39 |
|
| 40 |
ifneq (,$(shell pwd | grep autopkgtest)) |
| 41 |
AUTOPKGTEST_BUILD=y |
| 42 |
$(warning Build for autopkgtest) |
| 43 |
endif |
| 44 |
AUTOPKGTEST_CPPUNIT_PACKAGES := $(shell dh_listpackages | grep -v help | grep -v l10n | grep -v dev-doc | grep -v "nogui$$") |
| 45 |
|
| 46 |
include /usr/share/dpkg/architecture.mk |
| 47 |
include /usr/share/dpkg/vendor.mk |
| 48 |
SHELL:=/bin/bash |
| 49 |
|
| 50 |
SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(..\..\)\../\1/p' | cut -d" " -f1 | cut -d. -f1) |
| 51 |
SYSTEM_CLANG_VERSION = $(shell clang -v 2>&1 | head -n1 | awk '{ print $$4 }' | cut -d. -f1) |
| 52 |
|
| 53 |
PKGDIR:=debian/libreoffice |
| 54 |
OODIRNAME=libreoffice |
| 55 |
OODIR:=usr/lib/$(OODIRNAME) |
| 56 |
OOSDKDIR:=$(OODIR)/sdk |
| 57 |
|
| 58 |
# Figure out who's building this package. |
| 59 |
ifneq "$(DEB_VENDOR)" "Debian" |
| 60 |
OOO_VENDOR:=The Document Foundation, $(DEB_PARENT_VENDOR) and $(DEB_VENDOR) |
| 61 |
else |
| 62 |
OOO_VENDOR=The Document Foundation/$(DEB_VENDOR) |
| 63 |
endif |
| 64 |
export OOO_VENDOR |
| 65 |
|
| 66 |
# debhelper |
| 67 |
export DH_OPTIONS |
| 68 |
export DH_ALWAYS_EXCLUDE=CVS:.svn:.bzr:.git |
| 69 |
#export DH_VERBOSE=1 |
| 70 |
# quilt |
| 71 |
export QUILT_PATCHES=debian/patches |
| 72 |
export QUILT_OPTIONS="-p1 -F0" |
| 73 |
|
| 74 |
SOURCE_TREE=. |
| 75 |
STAMP_DIR=debian/stampdir |
| 76 |
TARFILE_LOCATION=$(CURDIR)/tarballs |
| 77 |
export TARFILE_LOCATION |
| 78 |
USE_SOURCE_TARBALLS=y |
| 79 |
USE_GIT_TARBALLS=n |
| 80 |
ifeq "$(USE_GIT_TARBALLS)" "y" |
| 81 |
GIT_BASEURL:=git://anongit.freedesktop.org/libreoffice |
| 82 |
lo_sources_ver=$(shell grep AC_INIT $(SOURCE_TREE)/configure.ac | grep documentfoundation | cut -d, -f2 | sed -e 's,\[,,' -e 's,\],,') |
| 83 |
# NOT in proper libreoffice-3-6 branch |
| 84 |
# use ./g checkout -b tag-libreoffice-3.6.2.1 libreoffice-3.6.2.1 |
| 85 |
GIT_TAG=libreoffice-$(lo_sources_ver) |
| 86 |
GIT_BRANCH=libreoffice-26-2-4 |
| 87 |
endif |
| 88 |
ifeq "$(USE_SOURCE_TARBALLS)" "y" |
| 89 |
lo_sources_ver=$(shell cat $(CURDIR)/sources.ver | cut -d= -f2) |
| 90 |
endif |
| 91 |
|
| 92 |
######### |
| 93 |
# Default package configuration |
| 94 |
# |
| 95 |
# FIXME: Should riscv64 be here at all given it doesn't support NaN payload propagation which LO (at least Calc) needs? |
| 96 |
# see https://bugs.documentfoundation.org/show_bug.cgi?id=152943 and https://lists.debian.org/debian-riscv/2024/01/msg00018.html |
| 97 |
OOO_ARCHS = alpha amd64 arm64 armel armhf hppa i386 ia64 loong64 m68k mips mipsel mips64 mips64el powerpc ppc64 ppc64el riscv64 s390x sparc sparc64 |
| 98 |
DEBIAN_MAIN_ARCHITECTURES = amd64 arm64 armhf i386 loong64 ppc64el riscv64 s390x |
| 99 |
PATCHSET=$(DEB_VENDOR) |
| 100 |
BUILD_DEPS=\ |
| 101 |
autoconf,\ |
| 102 |
automake,\ |
| 103 |
bc,\ |
| 104 |
bison,\ |
| 105 |
bzip2,\ |
| 106 |
flex, \ |
| 107 |
gperf,\ |
| 108 |
libfreetype-dev,\ |
| 109 |
libfontconfig-dev,\ |
| 110 |
pkgconf,\ |
| 111 |
po-debconf,\ |
| 112 |
unzip,\ |
| 113 |
xsltproc,\ |
| 114 |
zip,\ |
| 115 |
zlib1g-dev\ |
| 116 |
|
| 117 |
BUILD_DEPS_INDEP += rdfind, symlinks |
| 118 |
|
| 119 |
# These are components which can be built from internal copies, or used from the |
| 120 |
# distribution. See configure --help for valid values (--with-system-<value>). |
| 121 |
SYSTEM_STUFF = dicts |
| 122 |
|
| 123 |
ENABLE_GUI=y |
| 124 |
|
| 125 |
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) |
| 126 |
ENABLE_PYTHON=y |
| 127 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 128 |
CONFIGURE_FLAGS += --enable-python=system |
| 129 |
ENABLE_SCRIPT_PROVIDER_PYTHON=y |
| 130 |
PACKAGE_LIBRELOGO=y |
| 131 |
endif |
| 132 |
# THIS IS ONLY FOR TESTING. When building against a specified pythonX.Y |
| 133 |
# this will work inside OOo but *not* from outside OOo unless the user |
| 134 |
# uses pythonX.Y directly (and the dh_pycentral-created dependencies allow |
| 135 |
# also the non-working default python then) - see e.g. #587402. Also |
| 136 |
# note we are NOT working with python < 2.6 anymore! |
| 137 |
PYTHON_VERSION=default |
| 138 |
ifeq "$(PYTHON_VERSION)" "default" |
| 139 |
PYTHON=python3 |
| 140 |
export PYTHON |
| 141 |
else |
| 142 |
PYTHON=python$(PYTHON_VERSION) |
| 143 |
PYTHON_CFLAGS=$(shell pkg-config --cflags python-$(PYTHON_VERSION)) |
| 144 |
PYTHON_LIBS=$(shell pkg-config --libs python-$(PYTHON_VERSION)) |
| 145 |
# overriding this via PYTHON= (or export) doesn't work, see https://bugs.documentfoundation.org/show_bug.cgi?id=169163 |
| 146 |
export PYTHON PYTHON_VERSION PYTHON_CFLAGS PYTHON_LIBS |
| 147 |
endif |
| 148 |
endif |
| 149 |
BUILD_ONLY_EN_US=n |
| 150 |
ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),) |
| 151 |
include /usr/share/java/java_defaults.mk |
| 152 |
ifneq ($(DEB_HOST_ARCH),$(filter-out $(DEB_HOST_ARCH),$(java_unsupported_architectures))) |
| 153 |
ENABLE_JAVA=y |
| 154 |
endif |
| 155 |
ifeq "$(ENABLE_JAVA)" "y" |
| 156 |
JDK=default |
| 157 |
ifneq "$(JDK)" "default" |
| 158 |
JAVA_MAINVER=17 |
| 159 |
endif |
| 160 |
endif |
| 161 |
else |
| 162 |
ENABLE_JAVA=n |
| 163 |
endif |
| 164 |
#JAVAHELPER_MIN_VERSION= |
| 165 |
SYSTEM_STUFF += hunspell |
| 166 |
SYSTEM_STUFF += altlinuxhyph |
| 167 |
SYSTEM_STUFF += boost |
| 168 |
BOOST_VERSION=default |
| 169 |
# libmdds-dev depends on libboost-dev, which will be removed |
| 170 |
# when you install a non-default libboostX.Y-dev |
| 171 |
ifeq "$(BOOST_VERSION)" "default" |
| 172 |
SYSTEM_STUFF += mdds |
| 173 |
endif |
| 174 |
USE_EXTERNAL_CXXLIBS=y |
| 175 |
SYSTEM_STUFF += mythes |
| 176 |
SYSTEM_STUFF += icu |
| 177 |
SYSTEM_STUFF += librevenge |
| 178 |
SYSTEM_STUFF += libwpd libwpg libwps |
| 179 |
SYSTEM_STUFF += libvisio |
| 180 |
SYSTEM_STUFF += libcdr |
| 181 |
SYSTEM_STUFF += libmspub |
| 182 |
SYSTEM_STUFF += libmwaw |
| 183 |
SYSTEM_STUFF += libodfgen |
| 184 |
SYSTEM_STUFF += libepubgen |
| 185 |
SYSTEM_STUFF += libetonyek |
| 186 |
SYSTEM_STUFF += libfreehand |
| 187 |
# this is libe-book, NOT evolutions libebook (which is |
| 188 |
# dlopen()'ed anyway and whose headers we need from the |
| 189 |
# system anyways if enabled |
| 190 |
SYSTEM_STUFF += libebook |
| 191 |
SYSTEM_STUFF += libabw |
| 192 |
SYSTEM_STUFF += libpagemaker |
| 193 |
SYSTEM_STUFF += libzmf |
| 194 |
SYSTEM_STUFF += libstaroffice |
| 195 |
SYSTEM_STUFF += libqxp |
| 196 |
ENABLE_ZXING=y |
| 197 |
SYSTEM_STUFF += zxing |
| 198 |
BUILD_CAIROCANVAS=y |
| 199 |
SYSTEM_STUFF += cairo |
| 200 |
ENABLE_GPGMEPP=y |
| 201 |
ifeq "$(ENABLE_GUI)" "y" |
| 202 |
BUILD_PLASMA=y |
| 203 |
# let's assume we won't ship two plasmas parallel.. |
| 204 |
PLASMA_VERSION=6 |
| 205 |
PLASMA_KF_VERSION=$(PLASMA_VERSION) |
| 206 |
PLASMA_ARCHITECTURE=all |
| 207 |
ENABLE_QT5=n |
| 208 |
#QT5_MINVER= |
| 209 |
ENABLE_KF5=n |
| 210 |
ENABLE_QT6=y |
| 211 |
ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),m68k)) |
| 212 |
ENABLE_QT6_MULTIMEDIA=y |
| 213 |
endif |
| 214 |
ENABLE_KF6=y |
| 215 |
endif |
| 216 |
# go sure. if we want plasma, we want kfX, too and if we want that |
| 217 |
# one we want qtX, too. |
| 218 |
ifeq "$(BUILD_PLASMA)" "y" |
| 219 |
ifeq "$(PLASMA_VERSION)" "5" |
| 220 |
ENABLE_KF5=y |
| 221 |
endif |
| 222 |
ifeq "$(PLASMA_VERSION)" "6" |
| 223 |
ENABLE_KF6=y |
| 224 |
endif |
| 225 |
endif |
| 226 |
# KF5 depends on Qt5 |
| 227 |
ifeq "$(ENABLE_KF5)" "y" |
| 228 |
ENABLE_QT5=y |
| 229 |
KF5_QT5_DEPENDS := libreoffice-qt5 (= $${binary:Version}) |
| 230 |
endif |
| 231 |
# KF6 depends on Qt6 |
| 232 |
ifeq "$(ENABLE_KF6)" "y" |
| 233 |
ENABLE_QT6=y |
| 234 |
KF6_QT6_DEPENDS := libreoffice-qt6 (= $${binary:Version}) |
| 235 |
endif |
| 236 |
# https://www.debian.org/doc/debian-policy/ says this is not defined and must |
| 237 |
# be ignored, but dh_strip mentions (and honours) it, so... |
| 238 |
ifneq (noautodbgsym,$(findstring noautodbgsym,$(DEB_BUILD_OPTIONS))) |
| 239 |
BUILD_DBGSYM_PACKAGES=y |
| 240 |
ifeq "$(DEB_HOST_ARCH)" "amd64" |
| 241 |
USE_DWZ=n |
| 242 |
DWZ_ARGS:=-L 100000000 |
| 243 |
endif |
| 244 |
endif |
| 245 |
SYSTEM_STUFF += xmlsec |
| 246 |
SYSTEM_STUFF += zxcvbn |
| 247 |
SYSTEM_STUFF += md4c |
| 248 |
SYSTEM_STUFF += fast-float |
| 249 |
|
| 250 |
ENABLE_EMBINDTEST_UNO=y |
| 251 |
|
| 252 |
ifeq ($(filter noinsttest,$(DEB_BUILD_PROFILES)),) |
| 253 |
# this changes the packages built/contents of packages (-subsequentcheckbase) |
| 254 |
# This is not exactly allowed in https://wiki.debian.org/BuildProfileSpec#Registered_profile_names |
| 255 |
# but it doesn't have real practical difference, does it? |
| 256 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 257 |
BUILD_TEST_PACKAGES=y |
| 258 |
endif |
| 259 |
endif |
| 260 |
|
| 261 |
ifneq ($(MAKECMDGOALS),binary-indep) |
| 262 |
ENABLE_SYMBOLS=y |
| 263 |
SMALL_SYMBOLS=y |
| 264 |
endif |
| 265 |
ifeq ($(MAKECMDGOALS),binary-indep) |
| 266 |
# no need to do a double build... |
| 267 |
BUILD_NOGUI_PACKAGES=n |
| 268 |
# go sure |
| 269 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 270 |
ENABLE_JUNIT4=y |
| 271 |
endif |
| 272 |
endif |
| 273 |
|
| 274 |
ifeq "$(ENABLE_JAVA)" "y" |
| 275 |
SYSTEM_STUFF += beanshell |
| 276 |
SYSTEM_STUFF += rhino |
| 277 |
SYSTEM_STUFF += hsqldb |
| 278 |
SYSTEM_STUFF += java-websocket |
| 279 |
endif |
| 280 |
ENABLE_LPSOLVE=y |
| 281 |
# disabled. system-lpsolve somehow now causes |
| 282 |
#scsolverobj.cxx:119:Assertion |
| 283 |
#Test name: sc_apitest::ScSolverSettingsObj::testXSolverSettings |
| 284 |
#equality assertion failed |
| 285 |
#- Expected: 6981 |
| 286 |
#- Actual : 6987 |
| 287 |
# |
| 288 |
#Failures !!! |
| 289 |
#Run: 1 Failure total: 1 Failures: 1 Errors: 0 |
| 290 |
#SYSTEM_STUFF += lpsolve |
| 291 |
#USE_SHARED_LPSOLVE=y |
| 292 |
# This is strictly-speaking only needed on ppc64el due to the long double transition, see |
| 293 |
# https://wiki.debian.org/ToolChain/IEEELongDouble and |
| 294 |
# https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition where it was rebuilt |
| 295 |
# with the new ABI at that version |
| 296 |
#ifneq (y,$(TRIXIE_BACKPORT)) |
| 297 |
# LPSOLVE_MIN_VERSION= (>= 5.5.2.14-4.1) |
| 298 |
#endif |
| 299 |
ifeq (,$(filter lpsolve, $(SYSTEM_STUFF))) |
| 300 |
SYSTEM_STUFF += colamd |
| 301 |
endif |
| 302 |
ENABLE_COINMP=y |
| 303 |
SYSTEM_STUFF += coinmp |
| 304 |
USE_DBUS=y |
| 305 |
ifeq "$(USE_DBUS)" "y" |
| 306 |
ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) |
| 307 |
ENABLE_BLUETOOTH=n |
| 308 |
else |
| 309 |
ENABLE_BLUETOOTH=y |
| 310 |
SYSTEM_STUFF += bluez |
| 311 |
endif |
| 312 |
ENABLE_PACKAGEKIT=n |
| 313 |
endif |
| 314 |
ENABLE_AVAHI=y |
| 315 |
ifeq "$(ENABLE_GUI)" "y" |
| 316 |
USE_GSTREAMER=y |
| 317 |
endif |
| 318 |
ENABLE_CURL=y |
| 319 |
ENABLE_WEBDAV=y |
| 320 |
ifeq "$(ENABLE_WEBDAV)" "y" |
| 321 |
ENABLE_CURL=y |
| 322 |
endif |
| 323 |
ifeq "$(ENABLE_CURL)" "y" |
| 324 |
SYSTEM_STUFF += curl |
| 325 |
endif |
| 326 |
SYSTEM_STUFF += redland |
| 327 |
PACKAGE_SDK=y |
| 328 |
ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) |
| 329 |
PACKAGE_SDK_DOCS=n |
| 330 |
else |
| 331 |
PACKAGE_SDK_DOCS=y |
| 332 |
endif |
| 333 |
PACKAGE_LOKIT=y |
| 334 |
# will not work, uses schema/ stripped in the tarballs |
| 335 |
ifeq "$(USE_SOURCE_TARBALLS)" "y" |
| 336 |
ENABLE_EXPORT_VALIDATION_TESTS=n |
| 337 |
endif |
| 338 |
#JUNIT_MIN_VER= |
| 339 |
PARALLEL_BUILD=y |
| 340 |
ENABLE_LDAP=y |
| 341 |
SYSTEM_STUFF += openldap |
| 342 |
SYSTEM_STUFF += epoxy |
| 343 |
ifeq "$(ENABLE_JAVA)" "y" |
| 344 |
ENABLE_REPORTBUILDER=y |
| 345 |
SYSTEM_STUFF += jfreereport |
| 346 |
ENABLE_MEDIAWIKI=y |
| 347 |
ENABLE_SCRIPT_PROVIDER_BSH=y |
| 348 |
ENABLE_SCRIPT_PROVIDER_JS=y |
| 349 |
ENABLE_NLPSOLVER=y |
| 350 |
else |
| 351 |
ENABLE_REPORTBUILDER=n |
| 352 |
ENABLE_MEDIAWIKI=n |
| 353 |
ENABLE_SCRIPT_PROVIDER_BSH=n |
| 354 |
ENABLE_SCRIPT_PROVIDER_JS=n |
| 355 |
ENABLE_NLPSOLVER=n |
| 356 |
endif |
| 357 |
ENABLE_SDBC_POSTGRESQL=y |
| 358 |
ifeq "$(ENABLE_GUI)" "y" |
| 359 |
BUILD_GTK3=y |
| 360 |
# introspection needs GTK3 |
| 361 |
ifeq "$(BUILD_GTK3)" "y" |
| 362 |
ifeq ($(filter nogir,$(DEB_BUILD_PROFILES)),) |
| 363 |
ENABLE_INTROSPECTION=y |
| 364 |
endif |
| 365 |
endif |
| 366 |
endif |
| 367 |
BUILD_GTK4=y |
| 368 |
ENABLE_EVO2=y |
| 369 |
ENABLE_GIO=y |
| 370 |
ENABLE_DCONF=y |
| 371 |
ENABLE_RANDR=y |
| 372 |
PACKAGE_BASE=y |
| 373 |
SYSTEM_STUFF += graphite |
| 374 |
SYSTEM_STUFF += harfbuzz |
| 375 |
SYSTEM_STUFF += libexttextcat |
| 376 |
SYSTEM_STUFF += cppunit |
| 377 |
SYSTEM_STUFF += dragonbox |
| 378 |
SYSTEM_STUFF += libfixmath |
| 379 |
DEFAULT_IMAGE=colibre |
| 380 |
IMAGES:=$(DEFAULT_IMAGE) colibre_dark colibre_svg colibre_dark_svg sifr sifr_svg sifr_dark sifr_dark_svg breeze breeze_dark breeze_dark_svg breeze_svg elementary elementary_svg karasa_jaga karasa_jaga_svg sukapura sukapura_svg sukapura_dark sukapura_dark_svg |
| 381 |
CONFIGURE_FLAGS_INDEP += --with-theme="$(IMAGES)" |
| 382 |
ENABLE_MARIADB=y |
| 383 |
ifeq "$(ENABLE_MARIADB)" "y" |
| 384 |
# FIXME: the mysql test doesn't get really tested since it is only ran/built |
| 385 |
# with CONNECTIVITY_TEST_MYSQL_DRIVER set - and doesn't build on 32bit... The |
| 386 |
# test is run in autopkgtest on OOO_CHECK_FATAL_ARCHS (aka 64bit archs!) only for |
| 387 |
# now anyway so let's just hack around here for now and disable the build of it |
| 388 |
# alltogether when not used and just set CONNECTIVITY_TEST_MYSQL_DRIVER on those |
| 389 |
# OOO_CHECK_FATAL_ARCHS |
| 390 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) |
| 391 |
export CONNECTIVITY_TEST_MYSQL_DRIVER=dummy |
| 392 |
endif |
| 393 |
endif |
| 394 |
MYSQL_FLAVOUR=mariadb |
| 395 |
# set this also to y for system-mysql.. |
| 396 |
SYSTEM_STUFF += mariadb |
| 397 |
SYSTEM_STUFF += postgresql |
| 398 |
DICT_DIR=/usr/share/hunspell |
| 399 |
HYPH_DIR=/usr/share/hyphen |
| 400 |
THES_DIR=/usr/share/mythes |
| 401 |
ENABLE_LIBCMIS=y |
| 402 |
ifeq "$(ENABLE_LIBCMIS)" "y" |
| 403 |
SYSTEM_STUFF += libcmis |
| 404 |
endif |
| 405 |
SYSTEM_STUFF += jpeg |
| 406 |
SYSTEM_STUFF += libxml |
| 407 |
SYSTEM_STUFF += expat |
| 408 |
SYSTEM_STUFF += odbc |
| 409 |
SYSTEM_STUFF += sane |
| 410 |
ENABLE_PDFIMPORT=y |
| 411 |
ENABLE_POPPLER=y |
| 412 |
SYSTEM_STUFF += poppler |
| 413 |
ENABLE_PDFIUM=y |
| 414 |
PACKAGE_GEN=y |
| 415 |
ifeq "$(PACKAGE_GEN)" "y" |
| 416 |
# keep packaging gen (s390x is a release arch...), just disable skia. In contrast for |
| 417 |
# alpha and ia64 (ports-only) where skia also is disabled we set PACKAGE_GEN=n later in |
| 418 |
# the architecture specific settings |
| 419 |
ifneq (big,$(DEB_HOST_ARCH_ENDIAN)) |
| 420 |
ENABLE_SKIA=y |
| 421 |
endif |
| 422 |
else |
| 423 |
ENABLE_SKIA=n |
| 424 |
endif |
| 425 |
SYSTEM_STUFF += libpng |
| 426 |
ENABLE_NSS=y |
| 427 |
ifeq "$(ENABLE_NSS)" "y" |
| 428 |
SYSTEM_STUFF += nss |
| 429 |
endif |
| 430 |
ENABLE_HELP=y |
| 431 |
ifeq "$(ENABLE_HELP)" "y" |
| 432 |
ENABLE_HTML_HELP=y |
| 433 |
ENABLE_XMLHELP=y |
| 434 |
ifeq "$(ENABLE_HTML_HELP)" "y" |
| 435 |
HELP_DEPENDS := libreoffice-help-common (= $${binary:Version}), |
| 436 |
HELP_RECOMMENDS := firefox-esr | epiphany-browser | konqueror | chromium | firefox |
| 437 |
HELP_COMMON_DEPENDS := node-normalize.css |
| 438 |
BUILD_DEPS_INDEP += , node-normalize.css |
| 439 |
HELP_COMMON_DEPENDS += , node-prismjs |
| 440 |
BUILD_DEPS_INDEP += , node-prismjs |
| 441 |
else |
| 442 |
HELP_DEPENDS := libreoffice-writer |
| 443 |
DEBHELPER_OPTIONS += -Nlibreoffice-help-common |
| 444 |
endif |
| 445 |
ifeq "$(ENABLE_XMLHELP)" "y" |
| 446 |
SYSTEM_STUFF += clucene |
| 447 |
endif |
| 448 |
endif |
| 449 |
SYSTEM_STUFF += lcms2 |
| 450 |
SYSTEM_STUFF += liblangtag |
| 451 |
SYSTEM_STUFF += orcus |
| 452 |
# enable mergelibs only for 64bit archs |
| 453 |
ifeq "$(DEB_HOST_ARCH_BITS)" "64" |
| 454 |
ENABLE_MERGELIBS=y |
| 455 |
endif |
| 456 |
ifeq "$(ENABLE_MERGELIBS)" "y" |
| 457 |
ENABLE_LTO=y |
| 458 |
else |
| 459 |
ENABLE_LTO=n |
| 460 |
endif |
| 461 |
USE_OPENCL=y |
| 462 |
ENABLE_FIREBIRD=y |
| 463 |
# file format changes. see https://bugs.documentfoundation.org/show_bug.cgi?id=168143 |
| 464 |
# Go sure and just allow matching firebird per default. |
| 465 |
# (just now know until internal firebird is >= 4.0 so keep compatibility with older Debian |
| 466 |
# releases...) |
| 467 |
EXPECTED_FIREBIRD_VERSION=$(shell grep FIREBIRD_TARBALL download.lst | awk '{ print $$3 }' | cut -d- -f2 | cut -d. -f1,2) |
| 468 |
SYSTEM_FIREBIRD_VERSION=$(shell fb_config --version | cut -d. -f1,2) |
| 469 |
ifneq "$(SYSTEM_FIREBIRD_VERSION)" "$(EXPECTED_FIREBIRD_VERSION)" |
| 470 |
#$(error firebird version does not match) |
| 471 |
# only uncomment this )and comment the above) if you know what you do or for testing. |
| 472 |
# see above |
| 473 |
# You also want to disable strict-firebird-api-version-check.diff in debian/patches if |
| 474 |
# you try this... |
| 475 |
FIREBIRD_VERSION := $(SYSTEM_FIREBIRD_VERSION) |
| 476 |
else |
| 477 |
FIREBIRD_VERSION := $(EXPECTED_FIREBIRD_VESION) |
| 478 |
endif |
| 479 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 480 |
SYSTEM_STUFF += firebird |
| 481 |
ifeq (,$(filter firebird, $(SYSTEM_STUFF))) |
| 482 |
SYSTEM_STUFF += libatomic-ops |
| 483 |
SYSTEM_STUFF += libtommath |
| 484 |
endif |
| 485 |
endif |
| 486 |
ENABLE_EOT=y |
| 487 |
ifeq "$(ENABLE_EOT)" "y" |
| 488 |
SYSTEM_STUFF += libeot |
| 489 |
endif |
| 490 |
SYSTEM_STUFF += glm |
| 491 |
BUILD_PPC64EL=y |
| 492 |
BUILD_ARM64=y |
| 493 |
SYSTEM_STUFF += gpgmepp |
| 494 |
INSTALL_APPARMOR_PROFILES=y |
| 495 |
ENABLE_APPARMOR_PROFILES=y |
| 496 |
ifneq "$(AUTOPKGTEST_BUILD)" "y" |
| 497 |
CHECK_APPARMOR_PROFILES=true |
| 498 |
endif |
| 499 |
SYSTEM_STUFF += libnumbertext |
| 500 |
SYSTEM_STUFF += box2d |
| 501 |
SYSTEM_STUFF += libwebp |
| 502 |
SYSTEM_STUFF += libtiff |
| 503 |
SYSTEM_STUFF += frozen |
| 504 |
SYSTEM_STUFF += argon2 |
| 505 |
# we don't have it in the archive. The "new" .net dlls are incomplete |
| 506 |
# yet anyway. and what about cli-common-dev and the dh_cli* tools? Will they |
| 507 |
# even work here? |
| 508 |
ifeq ($(filter nocil,$(DEB_BUILD_PROFILES)),) |
| 509 |
ENABLE_DOTNET=n |
| 510 |
endif |
| 511 |
ENABLE_CUPS=y |
| 512 |
ENABLE_CPDB=y |
| 513 |
SYSTEM_STUFF += zstd |
| 514 |
|
| 515 |
# override stuff for indep builds to save build dependencies |
| 516 |
ifeq ($(MAKECMDGOALS),binary-indep) |
| 517 |
ENABLE_EVOAB=n |
| 518 |
BUILD_GTK3=n |
| 519 |
ENABLE_INTROSPECTION=n |
| 520 |
ENABLE_GIO=n |
| 521 |
BUILD_GTK4=n |
| 522 |
ENABLE_QT5=n |
| 523 |
ENABLE_QT6=n |
| 524 |
# libgpgmepp-dev depends on Qt, too, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863149 |
| 525 |
ENABLE_GPGMEPP=n |
| 526 |
ENABLE_KF5=n |
| 527 |
ENABLE_KF6=n |
| 528 |
ifneq "$(PLASMA_ARCHITECTURE)" "all" |
| 529 |
BUILD_PLASMA=n |
| 530 |
endif |
| 531 |
ENABLE_MARIADB=n |
| 532 |
ENABLE_FIREBIRD=n |
| 533 |
ENABLE_SDBC_POSTGRESQL=n |
| 534 |
ENABLE_SKIA=n |
| 535 |
ENABLE_COINMP=n |
| 536 |
ENABLE_LPSOLVE=n |
| 537 |
ENABLE_LDAP=n |
| 538 |
ENABLE_PDFIUM=n |
| 539 |
USE_DBUS=n |
| 540 |
ENABLE_AVAHI=n |
| 541 |
ENABLE_RUST=n |
| 542 |
endif |
| 543 |
|
| 544 |
# Default flags to pass to configure |
| 545 |
CONFIGURE_FLAGS+= \ |
| 546 |
--with-vendor='$(OOO_VENDOR)' \ |
| 547 |
--with-extra-buildid='$(DEB_VENDOR) package version: $(BINARY_VERSION)' \ |
| 548 |
--prefix=/usr --mandir=/usr/share/man \ |
| 549 |
--docdir=/usr/share/doc/libreoffice \ |
| 550 |
--libdir=/usr/lib \ |
| 551 |
--bindir=/usr/bin \ |
| 552 |
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ |
| 553 |
--disable-online-update \ |
| 554 |
--disable-fetch-external \ |
| 555 |
--without-fonts \ |
| 556 |
--without-myspell-dicts \ |
| 557 |
--with-branding=$(CURDIR)/debian/branding \ |
| 558 |
--without-coredumpctl |
| 559 |
|
| 560 |
# don't rebuild the font anywhere, we just really need it in indep builds. |
| 561 |
# please put https://dev-www.libreoffice.org/extern/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf |
| 562 |
# into $(SOURCE_TREE)/tarballs if you don't rebuild the font. |
| 563 |
BUILD_DEPS_INDEP += , fontforge-nox | fontforge <!pkg.libreoffice.noopensymbolbuild> |
| 564 |
ifeq ($(filter pkg.libreoffice.noopensymbolbuild,$(DEB_BUILD_PROFILES)),) |
| 565 |
ENABLE_OPENSYMBOL_BUILD=y |
| 566 |
endif |
| 567 |
|
| 568 |
# we get a fonts-opensymbol build-dep -b builds (_ARCH also affects -b), too anyway but it's still lesser |
| 569 |
# dependencies than fontforge-nox | fontforge... |
| 570 |
# But this can get a problem for bootstrapping if we ever needed a newer fonts-opensymbol for |
| 571 |
# tests to pass... |
| 572 |
# Allow building it nevertheless if wanted |
| 573 |
BUILD_DEPS_ARCH += , fonts-opensymbol <!pkg.libreoffice.opensymbolbuild> |
| 574 |
ifneq ($(MAKECMDGOALS),build-arch) |
| 575 |
ifneq ($(filter pkg.libreoffice.opensymbolbuild,$(DEB_BUILD_PROFILES)),) |
| 576 |
ENABLE_OPENSYMBOL_BUILD=y |
| 577 |
endif |
| 578 |
ifeq "$(ENABLE_OPENSYMBOL_BUILD)" "y" |
| 579 |
CONFIGURE_FLAGS_INDEP += --enable-build-opensymbol |
| 580 |
endif |
| 581 |
endif |
| 582 |
|
| 583 |
export LANG=C.UTF-8 |
| 584 |
|
| 585 |
ifeq "$(ENABLE_GUI)" "y" |
| 586 |
BUILD_DEPS += ,\ |
| 587 |
libgl-dev,\ |
| 588 |
libice-dev,\ |
| 589 |
libsm-dev,\ |
| 590 |
libx11-dev,\ |
| 591 |
libx11-xcb-dev, \ |
| 592 |
libxaw7-dev,\ |
| 593 |
libxext-dev,\ |
| 594 |
libxinerama-dev,\ |
| 595 |
libxkbfile-dev,\ |
| 596 |
libxrender-dev,\ |
| 597 |
libxt-dev,\ |
| 598 |
libxtst-dev,\ |
| 599 |
x11proto-render-dev |
| 600 |
endif |
| 601 |
|
| 602 |
ifeq "$(ENABLE_HELP)" "y" |
| 603 |
CONFIGURE_FLAGS_INDEP+= --with-help |
| 604 |
ifeq "$(ENABLE_HTML_HELP)" "y" |
| 605 |
CONFIGURE_FLAGS_INDEP+= --with-help=html |
| 606 |
endif |
| 607 |
ifneq "$(ENABLE_XMLHELP)" "y" |
| 608 |
CONFIGURE_FLAGS += --disable-xmlhelp |
| 609 |
endif |
| 610 |
else |
| 611 |
CONFIGURE_FLAGS += --without-helppack-integration --without-help |
| 612 |
endif |
| 613 |
|
| 614 |
|
| 615 |
ifeq "$(shell echo $(DEB_VERSION_UPSTREAM) | grep -E '(alpha|beta)'; echo $$?)" "1" |
| 616 |
CONFIGURE_FLAGS += --enable-release-build |
| 617 |
RELEASE_BUILD := y |
| 618 |
endif |
| 619 |
|
| 620 |
ifeq "$(DEB_DISTRIBUTION)" "UNRELEASED" |
| 621 |
BUGS=mailto:[email protected] |
| 622 |
endif |
| 623 |
|
| 624 |
ifneq (terse,$(findstring terse,$(DEB_BUILD_OPTIONS))) |
| 625 |
export verbose=t |
| 626 |
CARGO_FLAGS += --verbose |
| 627 |
endif |
| 628 |
|
| 629 |
############# |
| 630 |
# Architecture-specific changes |
| 631 |
|
| 632 |
# helper to generate no_archs macros (pass name of source macro) |
| 633 |
define gen_no_archs |
| 634 |
_no_arch_macro = $(subst OOO_,OOO_NO_,$1) |
| 635 |
_no_arch_tmp_$1 = $$(foreach _a,$$(filter-out $$(call $1),$(OOO_ARCHS)),!$$(_a)) |
| 636 |
$$(_no_arch_macro) = $$(if $$(_no_arch_tmp_$1),$$(_empty) [$$(_no_arch_tmp_$1)]) |
| 637 |
endef |
| 638 |
|
| 639 |
PLATFORMID := $(shell grep PLATFORMID debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) |
| 640 |
RTL_OS := $(shell grep RTL_OS debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) |
| 641 |
RTL_ARCH := $(shell grep RTL_ARCH debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) |
| 642 |
|
| 643 |
OOO_64BIT_ARCHS = $(filter alpha amd64 arm64 ia64 loong64 mips64 mips64el ppc64 ppc64el riscv64 s390x sparc64, $(OOO_ARCHS)) |
| 644 |
$(eval $(call gen_no_archs,OOO_64BIT_ARCHS)) |
| 645 |
OOO_32BIT_ARCHS = $(filter-out $(OOO_64BIT_ARCHS),$(OOO_ARCHS)) |
| 646 |
$(eval $(call gen_no_archs,OOO_32BIT_ARCHS)) |
| 647 |
OOO_BE_ARCHS = $(filter hppa m68k mips mips64 powerpc ppc64 s390 s390x sparc sparc64,$(OOO_ARCHS)) |
| 648 |
$(eval $(call gen_no_archs,OOO_BE_ARCHS)) |
| 649 |
OOO_LE_ARCHS = $(filter-out $(OOO_BE_ARCHS),$(OOO_ARCHS)) |
| 650 |
$(eval $(call gen_no_archs,OOO_LE_ARCHS)) |
| 651 |
OOO_CLANG_SUPPORTED_ARCHS := $(filter-out alpha ia64 mipsel mips64el,$(OOO_LE_ARCHS)) |
| 652 |
$(eval $(call gen_no_archs,OOO_CLANG_SUPPORTED_ARCHS)) |
| 653 |
|
| 654 |
# supported upstream (upstream does aarch64 flatpak builds) |
| 655 |
OOO_CHECK_ARCHS := amd64 arm64 |
| 656 |
$(eval $(call gen_no_archs,OOO_CHECK_ARCHS)) |
| 657 |
OOO_JUNIT_ARCHS := amd64 arm64 |
| 658 |
$(eval $(call gen_no_archs,OOO_JUNIT_ARCHS)) |
| 659 |
|
| 660 |
OOO_CHECK_FATAL_ARCHS := amd64 arm64 |
| 661 |
|
| 662 |
## original idea was without armhf, but since --disable-cve-tests for 32bit archs (see below) |
| 663 |
## this now also passes. and the autopkgtests also pass (also the junit ones). |
| 664 |
## So let's include armhf in the above |
| 665 |
#OOO_CHECK_ARCHS += armhf |
| 666 |
##OOO_JUNIT_ARCHS += armhf |
| 667 |
#OOO_CHECK_FATAL_ARCHS += armhf |
| 668 |
|
| 669 |
# if bridgetest and smoketest fail this is surely not working in a way |
| 670 |
# we would want in the archive |
| 671 |
OOO_SMOKETEST_FATAL_ARCHS := $(OOO_ARCHS) |
| 672 |
|
| 673 |
# archs where the archive/ci runs autopkgtests |
| 674 |
OOO_AUTOPKGTEST_ARCHS := $(OOO_CHECK_ARCHS) i386 loong64 ppc64el riscv64 s390x |
| 675 |
|
| 676 |
ifeq (alpha,$(findstring $(DEB_HOST_ARCH),$(OOO_ARCHS))) |
| 677 |
PACKAGE_GEN=n |
| 678 |
endif |
| 679 |
ifeq (ia64,$(findstring $(DEB_HOST_ARCH),$(OOO_ARCHS))) |
| 680 |
PACKAGE_GEN=n |
| 681 |
endif |
| 682 |
|
| 683 |
BUILD_TESTS=y |
| 684 |
ifeq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 685 |
BUILD_TESTS=n |
| 686 |
endif |
| 687 |
|
| 688 |
ifeq "$(DEB_HOST_ARCH_BITS)" "32" |
| 689 |
# consistently crash in vcl_filters_test when |
| 690 |
# Testing load file:///<<PKGBUILDDIR>>//vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9936-1.tiff: |
| 691 |
# CVE-2017-9936 is a memory leak and even a expected failure. |
| 692 |
# And we are not supposed to test for others' packages CVEs anyway, especially since this is fixed in libtiff |
| 693 |
# in 4.0.8-3(see https://security-tracker.debian.org/tracker/CVE-2017-9936) so ages ago |
| 694 |
CONFIGURE_FLAGS += --disable-cve-tests |
| 695 |
endif |
| 696 |
|
| 697 |
RUN_MAKE_CHECK=n |
| 698 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 699 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_ARCHS))) |
| 700 |
RUN_MAKE_CHECK=y |
| 701 |
endif |
| 702 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 703 |
ifeq "$(ENABLE_JAVA)" "y" |
| 704 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_JUNIT_ARCHS))) |
| 705 |
ENABLE_JUNIT4=y |
| 706 |
endif |
| 707 |
endif |
| 708 |
# run the atspi tests |
| 709 |
ifeq "$(BUILD_GTK3)" "y" |
| 710 |
ENABLE_ATSPI_TESTS=y |
| 711 |
endif |
| 712 |
endif |
| 713 |
IGNORE_MAKE_FAILURES=- |
| 714 |
TEST_TIMEOUT := timeout --foreground --preserve-status -v -k 250m 200m |
| 715 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 716 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) |
| 717 |
IGNORE_MAKE_FAILURES:= |
| 718 |
TEST_TIMEOUT:= |
| 719 |
endif |
| 720 |
else |
| 721 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_SMOKETEST_FATAL_ARCHS))) |
| 722 |
IGNORE_MAKE_FAILURES:= |
| 723 |
TEST_TIMEOUT:= |
| 724 |
endif |
| 725 |
endif |
| 726 |
endif |
| 727 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 728 |
BUILD_TESTS=y |
| 729 |
else |
| 730 |
BUILD_TESTS=n |
| 731 |
endif |
| 732 |
|
| 733 |
# Java... |
| 734 |
# upstream says --source=1.8 / --target=1.8 so 1.8 is fine in runtime |
| 735 |
JAVA_RUNTIME_BASELINE=8 |
| 736 |
JAVA_BRIDGE_BROKEN_ARCHS:=ppc64el s390x armhf |
| 737 |
# like this it's more consistent (e.g. with armhf above); it should work, though... |
| 738 |
JAVA_BRIDGE_BROKEN_ARCHS += armel |
| 739 |
ifeq "$(JDK)" "default" |
| 740 |
OOO_JAVA_ARCHS = $(filter-out $(JAVA_BRIDGE_BROKEN_ARCHS),$(filter $(OOO_ARCHS),$(java$(JAVA_RUNTIME_BASELINE)_architectures))) |
| 741 |
else |
| 742 |
OOO_JAVA_ARCHS = $(OOO_ARCHS) |
| 743 |
endif |
| 744 |
$(eval $(call gen_no_archs,OOO_JAVA_ARCHS)) |
| 745 |
|
| 746 |
# CLI |
| 747 |
OOO_CLI_ARCHS := amd64 arm64 |
| 748 |
$(eval $(call gen_no_archs,OOO_CLI_ARCHS)) |
| 749 |
|
| 750 |
# Rust |
| 751 |
# this is where rust would be available |
| 752 |
OOO_RUST_ARCHS := amd64 arm64 armel armhf i386 loong64 mips64el ppc64 ppc64el riscv64 s390x sparc64 |
| 753 |
$(eval $(call gen_no_archs,OOO_RUST_ARCHS)) |
| 754 |
#OOO_YRS_ARCHS := $(OOO_RUST_ARCHS)) |
| 755 |
#$(eval $(call gen_no_archs,OOO_YRS_ARCHS)) |
| 756 |
# armhf/powerpc got cc1plus: out of memory allocating 67108852 bytes after a total of 69656576 bytes |
| 757 |
# Let's disable it on all 32bit architectures |
| 758 |
# ppc64(el): doesn't work, see https://lists.debian.org/debian-powerpc/2025/12/msg00002.html ff. |
| 759 |
OOO_RUST_UNO_ARCHS := $(filter-out $(OOO_32BIT_ARCHS) ppc64 ppc64el,$(OOO_RUST_ARCHS)) |
| 760 |
# i386 worked even though 32bit so keep that for now |
| 761 |
OOO_RUST_UNO_ARCHS += i386 |
| 762 |
$(eval $(call gen_no_archs,OOO_RUST_UNO_ARCHS)) |
| 763 |
|
| 764 |
OOO_ARCH_DEP_EXTENSIONS_ARCHS := $(OOO_ARCHS) |
| 765 |
OOO_EXTENSIONS_ARCHS := $(OOO_ARCH_DEP_EXTENSIONS_ARCHS) |
| 766 |
|
| 767 |
OOO_BASE_ARCHS := $(OOO_ARCHS) |
| 768 |
$(eval $(call gen_no_archs,OOO_BASE_ARCHS)) |
| 769 |
OOO_REPORTBUILDER_ARCHS := $(OOO_JAVA_ARCHS) |
| 770 |
$(eval $(call gen_no_archs,OOO_REPORTBUILDER_ARCHS)) |
| 771 |
OOO_FIREBIRD_ARCHS := $(filter-out m68k,$(OOO_BASE_ARCHS)) |
| 772 |
$(eval $(call gen_no_archs,OOO_FIREBIRD_ARCHS)) |
| 773 |
OOO_NOGUI_ARCHS := $(filter amd64 i386 arm64 armhf loong64 s390x ppc64 ppc64el,$(OOO_ARCHS)) |
| 774 |
$(eval $(call gen_no_archs,OOO_NOGUI_ARCHS)) |
| 775 |
OOO_PDFIUM_ARCHS := $(OOO_ARCHS) |
| 776 |
$(eval $(call gen_no_archs,OOO_PDFIUM_ARCHS)) |
| 777 |
|
| 778 |
ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS))) |
| 779 |
ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_BASE_ARCHS))) |
| 780 |
PACKAGE_BASE=n |
| 781 |
ENABLE_SDBC_POSTGRESQL=n |
| 782 |
ENABLE_EVO2=n |
| 783 |
ENABLE_REPORTBUILDER=n |
| 784 |
DEBHELPER_OPTIONS += -Nlibreoffice-base libreoffice-base-core -Nlibreoffice-base-drivers |
| 785 |
DEBHELPER_OPTIONS += -Nlibreoffice-evolution |
| 786 |
DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-postgresql -Nlibreoffice-sdbc-mysql |
| 787 |
DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-hsqldb -Nlibreoffice-sdbc-firebird |
| 788 |
DEBHELPER_OPTIONS += -Nlibreoffice-report-builder-bin -Nlibreoffice-report-builder |
| 789 |
DEBHELPER_OPTIONS += -Npython3-access2base |
| 790 |
# CONFIGURE_FLAGS += --disable-database-connectivity |
| 791 |
endif |
| 792 |
endif |
| 793 |
|
| 794 |
ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) |
| 795 |
ENABLE_MEDIAWIKI=n |
| 796 |
ENABLE_NLPSOLVER=n |
| 797 |
DEBHELPER_OPTIONS += -Nlibreoffice-wiki-publisher -Nlibreoffice-nlpsolver |
| 798 |
CONFIGURE_FLAGS += --disable-extension-integration --disable-extensions |
| 799 |
endif |
| 800 |
|
| 801 |
ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_JAVA_ARCHS))) |
| 802 |
ENABLE_JAVA=n |
| 803 |
ENABLE_REPORTBUILDER=n |
| 804 |
ENABLE_MEDIAWIKI=n |
| 805 |
ENABLE_NLPSOLVER=n |
| 806 |
endif |
| 807 |
|
| 808 |
ifneq "$(BUILD_TEST_PACKAGES)" "y" |
| 809 |
DEBHELPER_OPTIONS += -Nlibreoffice-subsequentcheckbase -Nlibreoffice-smoketest-data -Nlibreoffice-rust-uno-example |
| 810 |
else |
| 811 |
BUILD_DEPS_INDEP += , junit4 $(JUNIT_MIN_VER) <!nojava> |
| 812 |
endif |
| 813 |
|
| 814 |
ifeq "$(ENABLE_GUI)" "y" |
| 815 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_NOGUI_ARCHS))) |
| 816 |
BUILD_NOGUI_PACKAGES=y |
| 817 |
endif |
| 818 |
else |
| 819 |
CONFIGURE_FLAGS += --disable-gui |
| 820 |
DEBHELPER_OPTIONS += -Nlibreoffice-core -Nlibreoffice-calc -Nlibreoffice-writer -Nlibreoffice-draw -Nlibreoffice-report-builder-bin -Nlibreoffice-base -Nlibreoffice-impress -Nlibreoffice-math |
| 821 |
endif |
| 822 |
ifneq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 823 |
DEBHELPER_OPTIONS += -Nlibreoffice-core-nogui -Nlibreoffice-calc-nogui -Nlibreoffice-writer-nogui -Nlibreoffice-draw-nogui -Nlibreoffice-report-builder-bin-nogui -Nlibreoffice-base-nogui -Nlibreoffice-impress-nogui -Nlibreoffice-math-nogui |
| 824 |
endif |
| 825 |
|
| 826 |
# this assumes autopkgtest -B. Without -B it tries to use the built packages |
| 827 |
# which would break (nogui being empty, needed l10ns not being there) |
| 828 |
ifeq "$(AUTOPKGTEST_BUILD)" "y" |
| 829 |
# save build time for languages we do not exactly need. |
| 830 |
BUILD_ONLY_EN_US=y |
| 831 |
# as above (for binary-indep), no need to do two builds here... |
| 832 |
# needs to be here since there is arch-specific rules before |
| 833 |
BUILD_NOGUI_PACKAGES=n |
| 834 |
# go sure |
| 835 |
BUILD_TESTS=y |
| 836 |
BUILD_TEST_PACKAGES=y |
| 837 |
ENABLE_JUNIT4=y |
| 838 |
endif |
| 839 |
|
| 840 |
############# |
| 841 |
# Distro-specific overrides |
| 842 |
|
| 843 |
# Debian Trixie |
| 844 |
ifeq "$(DEB_DISTRIBUTION)" "trixie-backports" |
| 845 |
BUGS=mailto:[email protected] |
| 846 |
TRIXIE_BACKPORT=y |
| 847 |
# dependencies not there and no sense to backport getrandom/fastrand changes *and* |
| 848 |
# completely new rust packages. Internal is no senseful alternative here (320M |
| 849 |
# cargo dir...) |
| 850 |
ENABLE_YRS=n |
| 851 |
endif |
| 852 |
|
| 853 |
# for t64 |
| 854 |
BUILD_DEPS += , dpkg-dev (>= 1.22.5) [$(filter-out i386,$(OOO_32BIT_ARCHS))] |
| 855 |
|
| 856 |
CONFIGURE_FLAGS += $(foreach i, $(SYSTEM_STUFF),--with-system-$(i)) |
| 857 |
|
| 858 |
CC_PREFIX:=$(shell gcc -dumpmachine)- |
| 859 |
|
| 860 |
# generally use clang |
| 861 |
USE_CLANG=n |
| 862 |
# allow clang for skia? |
| 863 |
ALLOW_CLANG=y |
| 864 |
|
| 865 |
CLANG_VERSION=default |
| 866 |
|
| 867 |
ifneq "$(shell echo $(USE_CLANG)$(ALLOW_CLANG) | grep y)" "" |
| 868 |
# /usr/bin/ld: /usr/lib/llvm-11/bin/../lib/LLVMgold.so: error loading plugin: /usr/lib/llvm-11/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory |
| 869 |
# for mips64el and riscv64 that doesn't exist so disable LTO there... |
| 870 |
ifeq "$(ENABLE_LTO)" "y" |
| 871 |
ifeq "$(DEB_HOST_ARCH)" "mips64el" |
| 872 |
ENABLE_LTO=n |
| 873 |
endif |
| 874 |
# we apparently also need --disable-split-debug (see below) since according to configure.ac both are |
| 875 |
# "Inherently incompatible, since no debug info is created while compiling, GCC complains." |
| 876 |
# so make it explicit |
| 877 |
ifeq "$(DEB_HOST_ARCH)" "riscv64" |
| 878 |
ENABLE_LTO=n |
| 879 |
endif |
| 880 |
# probably... |
| 881 |
ifeq "$(DEB_HOST_ARCH)" "loong64" |
| 882 |
ENABLE_LTO=n |
| 883 |
endif |
| 884 |
# since the llvm-defaults packages pointing to llvm 13(?) it apparently doesn't |
| 885 |
# automatically pull in llvm-xx-linker-tools anymore which contains the needed LLVMgold.so |
| 886 |
# (see above). |
| 887 |
# So build-depend on llvm, too. |
| 888 |
# We shouldn't depend on llvm-xx-linker-tools since this probably should be |
| 889 |
# version-agnostic when the default changes (unless explicitely specified of course). |
| 890 |
ifeq "$(USE_CLANG)" "y" |
| 891 |
ifeq "$(CLANG_VERSION)" "default" |
| 892 |
BUILD_DEPS += , llvm |
| 893 |
else |
| 894 |
BUILD_DEPS += , llvm-$(CLANG_VERSION)-linker-tools |
| 895 |
endif |
| 896 |
else |
| 897 |
ifeq "$(ALLOW_CLANG)" "y" |
| 898 |
ifeq "$(CLANG_VERSION)" "default" |
| 899 |
BUILD_DEPS_ARCH += , llvm$(OOO_NO_CLANG_SUPPORTED_ARCHS) |
| 900 |
else |
| 901 |
BUILD_DEPS_ARCH += , llvm-$(CLANG_VERSION)-linker-tools$(OOO_NO_CLANG_SUPPORTED_ARCHS) |
| 902 |
endif |
| 903 |
endif |
| 904 |
endif |
| 905 |
endif |
| 906 |
endif |
| 907 |
ifeq "$(USE_DWZ)" "y" |
| 908 |
# dwz errors out with |
| 909 |
# dwz: debian/libreoffice-core/usr/lib/libreoffice/program/libskialo.so: Unknown debugging section .debug_addr |
| 910 |
# since clang 14 |
| 911 |
ifeq "$(USE_CLANG)" "y" |
| 912 |
USE_DWZ := n |
| 913 |
endif |
| 914 |
ifeq "$(ENABLE_SKIA)" "y" |
| 915 |
ifneq "$(shell echo $(ALLOW_CLANG) | grep y)" "" |
| 916 |
ifeq "$(shell dpkg --compare-versions $(SYSTEM_CLANG_VERSION) ge 14 && echo true)" "true" |
| 917 |
DH_DWZ_ARGS += -Xskia |
| 918 |
endif |
| 919 |
endif |
| 920 |
endif |
| 921 |
endif |
| 922 |
|
| 923 |
ifeq "$(USE_CLANG)" "y" |
| 924 |
ENABLE_COMPILER_PLUGINS=n |
| 925 |
endif |
| 926 |
|
| 927 |
# bridgetest fails when built with gcc 13, works with 12 |
| 928 |
# or works with clang, so instead of build-depending on an obsolete |
| 929 |
# gcc we take this route |
| 930 |
ifeq "$(DEB_HOST_ARCH)" "i386" |
| 931 |
USE_CLANG=y |
| 932 |
endif |
| 933 |
BUILD_DEPS += , clang [i386] |
| 934 |
ifneq "$(USE_CLANG)" "y" |
| 935 |
ifneq "$(GCC_VERSION)" "" |
| 936 |
ifneq "$(SYSTEM_GCC_VERSION)" "$(GCC_VERSION)" |
| 937 |
BUILD_DEPS += , gcc-$(GCC_VERSION), g++-$(GCC_VERSION) |
| 938 |
CONFIGURE_FLAGS+= \ |
| 939 |
CC=$(CC_PREFIX)gcc-$(GCC_VERSION) \ |
| 940 |
CXX=$(CC_PREFIX)g++-$(GCC_VERSION) |
| 941 |
endif |
| 942 |
else |
| 943 |
BUILD_DEPS += , gcc (>= 4:12) [!i386], g++ (>= 4:12) [!i386] |
| 944 |
endif |
| 945 |
# Use -O0 for gcc 10 on armhf to avoid build/test failure with gcc 10 |
| 946 |
# https://bugs.launchpad.net/ubuntu/+bug/1891623 |
| 947 |
# In Debian this never appeared to be an actual build failure but |
| 948 |
# this also helps for the test timeout on armv8 machines/buildds. |
| 949 |
# (armv7 "works"). So make it conditional on whether we run checks. |
| 950 |
# With g++-10 there also appear SIGSEGVs in/with openjdk-11 and it |
| 951 |
# hangs at RunMacros, which also tries to use Java "Macros". |
| 952 |
# A --without-java build passes. |
| 953 |
ifeq "$(DEB_HOST_ARCH)" "armhf" |
| 954 |
ifeq ($(ENABLE_JAVA),y) |
| 955 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 956 |
ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 957 |
DEB_BUILD_OPTIONS += noopt |
| 958 |
endif |
| 959 |
endif |
| 960 |
endif |
| 961 |
endif |
| 962 |
# and also on s390x since it otherwise gets miscompiled. |
| 963 |
# Upstream tracked it down to a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 |
| 964 |
# but |
| 965 |
# 16:37 <@sberg> _rene_, I couldn't reproduce the issue with an -O0 (--enable-dbgutil) build, and can with a -O2 (no --enable-debug etc.) one |
| 966 |
ifeq "$(DEB_HOST_ARCH)" "s390x" |
| 967 |
ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 968 |
DEB_BUILD_OPTIONS += noopt |
| 969 |
endif |
| 970 |
endif |
| 971 |
ifeq "$(DEB_HOST_ARCH)" "riscv64" |
| 972 |
CONFIGURE_FLAGS += --disable-nan-tests |
| 973 |
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039906#26 (fixed) |
| 974 |
# and it seems it the payloadNaN test actually passes with -O2 where it's |
| 975 |
# unclear whether it actually is on hardware supporting it. Let's keep at |
| 976 |
# -O0 for now and be sure it fails before shipping something broken |
| 977 |
ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 978 |
DEB_BUILD_OPTIONS += noopt |
| 979 |
endif |
| 980 |
# see https://lists.debian.org/debian-riscv/2024/01/msg00018.html |
| 981 |
CONFIGURE_FLAGS += --disable-split-debug |
| 982 |
endif |
| 983 |
# skia build picks up clang if present (for performance reasons, |
| 984 |
# at least on Windows...). See the thread starting at |
| 985 |
# https://lists.freedesktop.org/archives/libreoffice/2020-April/084929.html |
| 986 |
# Make it a explicit build-dependency so we don't have builds |
| 987 |
# "randomly" using gcc or clang depending on whether clang is installed |
| 988 |
# or not |
| 989 |
ifeq "$(ENABLE_SKIA)" "y" |
| 990 |
ifeq "$(ALLOW_CLANG)" "y" |
| 991 |
ifeq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS))) |
| 992 |
export CCACHE_CPP2=1 |
| 993 |
endif |
| 994 |
ifeq "$(CLANG_VERSION)" "default" |
| 995 |
export LO_CLANG_CC=clang |
| 996 |
export LO_CLANG_CXX=clang++ |
| 997 |
BUILD_DEPS_ARCH += , clang$(OOO_NO_CLANG_SUPPORTED_ARCHS) |
| 998 |
else |
| 999 |
export LO_CLANG_CC=clang-$(CLANG_VERSION) |
| 1000 |
export LO_CLANG_CXX=clang++-$(CLANG_VERSION) |
| 1001 |
BUILD_DEPS_ARCH += , clang-$(CLANG_VERSION) [$(OOO_LE_ARCHS)] |
| 1002 |
endif |
| 1003 |
endif |
| 1004 |
endif |
| 1005 |
else |
| 1006 |
ifeq "$(CLANG_VERSION)" "default" |
| 1007 |
BUILD_DEPS += , clang |
| 1008 |
CONFIGURE_FLAGS+= CC=clang CXX=clang++ |
| 1009 |
else |
| 1010 |
BUILD_DEPS += , clang-$(CLANG_VERSION) |
| 1011 |
CONFIGURE_FLAGS+= CC=clang-$(CLANG_VERSION) CXX=clang++-$(CLANG_VERSION) |
| 1012 |
endif |
| 1013 |
ifeq "$(ENABLE_COMPILER_PLUGINS)" "y" |
| 1014 |
CONFIGURE_FLAGS += --enable-compiler-plugins |
| 1015 |
CLANGDIR := /usr/lib/llvm-$(shell $(CLANG) --version | head -n 1 | awk '{ print $$3 }' | cut -d. -f1) |
| 1016 |
ifeq "$(CLANG_VERSION)" "default" |
| 1017 |
BUILD_DEPS += , clang (>= 1:12.0.1), libclang-dev (>= 1:12.0.1), llvm-dev (>= 1:12.0.1) |
| 1018 |
else |
| 1019 |
BUILD_DEPS += , libclang-$(CLANG_VERSION)-dev, llvm-$(CLANG_VERSION)-dev |
| 1020 |
endif |
| 1021 |
endif |
| 1022 |
endif |
| 1023 |
USE_GOLD=n |
| 1024 |
ALLOW_GOLD=n |
| 1025 |
USE_MOLD=n |
| 1026 |
# leaves cruft around after building because it runs update_pch.sh.. |
| 1027 |
ENABLE_PCH=n |
| 1028 |
|
| 1029 |
ifeq "$(PACKAGE_SDK)" "y" |
| 1030 |
CONFIGURE_FLAGS += --enable-odk |
| 1031 |
ifeq "$(PACKAGE_SDK_DOCS)" "y" |
| 1032 |
BUILD_DEPS_INDEP += , doxygen <!nodoc>, graphviz <!nodoc> |
| 1033 |
else |
| 1034 |
CONFIGURE_FLAGS += --without-doxygen --without-javadoc |
| 1035 |
endif |
| 1036 |
endif |
| 1037 |
|
| 1038 |
ifeq "$(ENABLE_PDFIMPORT)" "y" |
| 1039 |
ifeq "$(ENABLE_POPPLER)" "y" |
| 1040 |
BUILD_DEPS += , libpoppler-dev, libpoppler-private-dev, libpoppler-cpp-dev |
| 1041 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1042 |
BUILD_DEPS_ARCH += , poppler-data [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1043 |
endif |
| 1044 |
else |
| 1045 |
CONFIGURE_FLAGS += --disable-poppler |
| 1046 |
endif |
| 1047 |
ifeq "$(ENABLE_PDFIUM)" "n" |
| 1048 |
CONFIGURE_FLAGS += --disable-pdfium |
| 1049 |
else |
| 1050 |
SYSTEM_STUFF += abseil |
| 1051 |
SYSTEM_STUFF += openjpeg |
| 1052 |
SYSTEM_STUFF += afdko |
| 1053 |
ifneq (,$(filter openjpeg, $(SYSTEM_STUFF))) |
| 1054 |
BUILD_DEPS_ARCH += , libopenjp2-7-dev [$(OOO_PDFIUM_ARCHS)] |
| 1055 |
endif |
| 1056 |
ifneq (,$(filter abseil, $(SYSTEM_STUFF))) |
| 1057 |
BUILD_DEPS_ARCH += , libabsl-dev [$(OOO_PDFIUM_ARCHS)] |
| 1058 |
endif |
| 1059 |
ifneq (,$(filter afdko, $(SYSTEM_STUFF))) |
| 1060 |
# upstream is ok with this just being a Recommends:. |
| 1061 |
# We don't NEED to have it. |
| 1062 |
AFDKO_RECOMMENDS += afdko-bin [$(OOO_PDFIUM_ARCHS)] |
| 1063 |
# but we need to B-D-A on it since the paths found/set |
| 1064 |
# are used as-is in the resulting LO... (and it's used during tests) |
| 1065 |
BUILD_DEPS_ARCH += , $(AFDKO_RECOMMENDS) |
| 1066 |
endif |
| 1067 |
endif |
| 1068 |
endif |
| 1069 |
|
| 1070 |
ifeq "$(ENABLE_CUPS)" "y" |
| 1071 |
BUILD_DEPS += , libcups2-dev |
| 1072 |
else |
| 1073 |
CONFIGURE_FLAGS += --disable-cups |
| 1074 |
endif |
| 1075 |
|
| 1076 |
ifeq "$(ENABLE_CPDB)" "y" |
| 1077 |
BUILD_DEPS += , libcpdb-frontend-dev |
| 1078 |
CONFIGURE_FLAGS += --enable-cpdb |
| 1079 |
endif |
| 1080 |
|
| 1081 |
|
| 1082 |
ifneq (,$(filter graphite, $(SYSTEM_STUFF))) |
| 1083 |
BUILD_DEPS += , libgraphite2-dev |
| 1084 |
endif |
| 1085 |
|
| 1086 |
ifneq (,$(filter harfbuzz, $(SYSTEM_STUFF))) |
| 1087 |
BUILD_DEPS += , libharfbuzz-dev (>= 5.1.0) |
| 1088 |
else |
| 1089 |
BUILD_DEPS += , meson, ninja-build |
| 1090 |
endif |
| 1091 |
|
| 1092 |
ifneq (,$(filter libexttextcat, $(SYSTEM_STUFF))) |
| 1093 |
BUILD_DEPS += , libexttextcat-dev |
| 1094 |
TEXTCAT_DATA_RECOMMENDS := libexttextcat-data |
| 1095 |
endif |
| 1096 |
|
| 1097 |
ifneq "$(ENABLE_LDAP)" "y" |
| 1098 |
CONFIGURE_FLAGS += --disable-ldap |
| 1099 |
endif |
| 1100 |
|
| 1101 |
ifneq (,$(filter libnumbertext, $(SYSTEM_STUFF))) |
| 1102 |
BUILD_DEPS += , libnumbertext-dev |
| 1103 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1104 |
# https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-7-3&id=09dfe214a30f58ddcd7a857db8f5eee68d4cef2a |
| 1105 |
BUILD_DEPS_ARCH += , libnumbertext-data (>= 1.0.11) <!nocheck> |
| 1106 |
endif |
| 1107 |
NUMBERTEXT_DATA_RECOMMENDS := libnumbertext-data |
| 1108 |
endif |
| 1109 |
|
| 1110 |
ifneq (,$(filter jpeg, $(SYSTEM_STUFF))) |
| 1111 |
BUILD_DEPS += , libjpeg-dev |
| 1112 |
endif |
| 1113 |
ifneq (,$(filter libxml, $(SYSTEM_STUFF))) |
| 1114 |
BUILD_DEPS += , libxml2-dev, libxml2-utils |
| 1115 |
CONFIGURE_FLAGS += --with-system-libxml |
| 1116 |
ifeq "$(shell dpkg --compare-versions `pkg-config --modversion libxml-2.0` gt 2.14 && echo true)" "true" |
| 1117 |
BUILD_DEPS_ARCH += , libxml2-dev (>= 2.14.3+dfsg-0exp3) <!nocheck> |
| 1118 |
endif |
| 1119 |
BUILD_DEPS += , libxslt1-dev |
| 1120 |
endif |
| 1121 |
ifneq (,$(filter xmlsec, $(SYSTEM_STUFF))) |
| 1122 |
BUILD_DEPS += , libxmlsec1-dev (>= 1.2.35) |
| 1123 |
# for t64 |
| 1124 |
ifneq (,$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))) |
| 1125 |
BUILD_DEPS_ARCH += , libxmlsec1-dev (>= 1.2.39-5) [$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))] <!nocheck> |
| 1126 |
endif |
| 1127 |
endif |
| 1128 |
ifneq (,$(filter expat, $(SYSTEM_STUFF))) |
| 1129 |
BUILD_DEPS += , libexpat1-dev |
| 1130 |
endif |
| 1131 |
ifneq (,$(filter odbc, $(SYSTEM_STUFF))) |
| 1132 |
BUILD_DEPS += , unixodbc-dev |
| 1133 |
endif |
| 1134 |
ifneq (,$(filter sane, $(SYSTEM_STUFF))) |
| 1135 |
BUILD_DEPS += , libsane-dev |
| 1136 |
endif |
| 1137 |
ifneq (,$(filter libpng, $(SYSTEM_STUFF))) |
| 1138 |
BUILD_DEPS += , libpng-dev |
| 1139 |
endif |
| 1140 |
|
| 1141 |
CURL_SECTYPE=openssl |
| 1142 |
ifeq "$(ENABLE_CURL)" "y" |
| 1143 |
ifneq (,$(filter curl, $(SYSTEM_STUFF))) |
| 1144 |
BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev |
| 1145 |
endif |
| 1146 |
else |
| 1147 |
CONFIGURE_FLAGS += --disable-curl |
| 1148 |
endif |
| 1149 |
|
| 1150 |
ifneq (,$(filter box2d, $(SYSTEM_STUFF))) |
| 1151 |
BUILD_DEPS += , libbox2d-dev |
| 1152 |
endif |
| 1153 |
|
| 1154 |
ifneq (,$(filter libwebp, $(SYSTEM_STUFF))) |
| 1155 |
BUILD_DEPS += , libwebp-dev |
| 1156 |
endif |
| 1157 |
|
| 1158 |
ifneq (,$(filter libtiff, $(SYSTEM_STUFF))) |
| 1159 |
BUILD_DEPS += , libtiff-dev |
| 1160 |
endif |
| 1161 |
|
| 1162 |
ifneq ($(ENABLE_COINMP),y) |
| 1163 |
CONFIGURE_FLAGS += --disable-coinmp |
| 1164 |
else |
| 1165 |
ifneq (,$(filter coinmp, $(SYSTEM_STUFF))) |
| 1166 |
BUILD_DEPS_ARCH += , coinor-libcoinmp-dev $(COINMP_MINVER), coinor-libcoinutils-dev $(COINUTILS_MINVER) |
| 1167 |
endif |
| 1168 |
endif |
| 1169 |
|
| 1170 |
ifneq (,$(filter amd64,$(DEB_HOST_ARCH))) |
| 1171 |
ifneq "$(AUTOPKGTEST_BUILD)" "y" |
| 1172 |
SMALL_SYMBOLS = n |
| 1173 |
endif |
| 1174 |
endif |
| 1175 |
|
| 1176 |
# silence long-obsolete warnings. Should probably be in |
| 1177 |
# upstreams makefiles but I failed to get it actually appear... |
| 1178 |
ifeq "$(DEB_HOST_ARCH)" "armel" |
| 1179 |
DEB_CXXFLAGS_MAINT_APPEND = -Wno-psabi |
| 1180 |
endif |
| 1181 |
ifeq "$(DEB_HOST_ARCH)" "armhf" |
| 1182 |
DEB_CXXFLAGS_MAINT_APPEND = -Wno-psabi |
| 1183 |
endif |
| 1184 |
|
| 1185 |
# see https://lists.freedesktop.org/archives/libreoffice/2023-September/090877.html |
| 1186 |
ifneq (,$(filter ppc64el s390x,$(DEB_HOST_ARCH))) |
| 1187 |
DEB_CFLAGS_MAINT_APPEND = -ffp-contract=off |
| 1188 |
DEB_CXXFLAGS_MAINT_APPEND = -ffp-contract=off |
| 1189 |
endif |
| 1190 |
|
| 1191 |
ifneq (,$(filter s390x,$(DEB_HOST_ARCH))) |
| 1192 |
ifeq (,$(shell gcc -v 2>&1 | grep disable-s390-excess-float-precision)) |
| 1193 |
DEB_CFLAGS_MAINT_APPEND = -fexcess-precision=fast |
| 1194 |
# the gcc manpage says |
| 1195 |
# "-fexcess-precision=standard is not implemented for languages other than C" |
| 1196 |
# but it works with this and fails without, so probably has some effect after all |
| 1197 |
DEB_CXXFLAGS_MAINT_APPEND = -fexcess-precision=fast |
| 1198 |
endif |
| 1199 |
endif |
| 1200 |
|
| 1201 |
ifeq "$(ENABLE_SYMBOLS)" "y" |
| 1202 |
# Small symbols? |
| 1203 |
ifeq "$(SMALL_SYMBOLS)" "y" |
| 1204 |
CONFIGURE_FLAGS += --enable-symbols=SMALL |
| 1205 |
DEB_CFLAGS_MAINT_STRIP += -g |
| 1206 |
DEB_CXXFLAGS_MAINT_STRIP += -g |
| 1207 |
DEB_CFLAGS_MAINT_PREPEND += -g1 |
| 1208 |
DEB_CXXFLAGS_MAINT_PREPEND += -g1 |
| 1209 |
export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP |
| 1210 |
export DEB_CFLAGS_MAINT_PREPEND DEB_CXXFLAGS_MAINT_PREPEND |
| 1211 |
else |
| 1212 |
CONFIGURE_FLAGS += --enable-symbols |
| 1213 |
endif |
| 1214 |
else |
| 1215 |
DEB_CFLAGS_MAINT_STRIP := -g |
| 1216 |
DEB_CXXFLAGS_MAINT_STRIP := -g |
| 1217 |
export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP |
| 1218 |
endif |
| 1219 |
export DPKG_EXPORT_BUILDFLAGS=y |
| 1220 |
include /usr/share/dpkg/buildflags.mk |
| 1221 |
ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
| 1222 |
CONFIGURE_FLAGS += --enable-debug |
| 1223 |
export CARGO_CHANNEL := debug |
| 1224 |
else |
| 1225 |
export CARGO_CHANNEL := release |
| 1226 |
endif |
| 1227 |
export CARGO_FLAGS = --$(CARGO_CHANNEL) |
| 1228 |
ifeq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 1229 |
CONFIGURE_FLAGS += --disable-optimized |
| 1230 |
endif |
| 1231 |
|
| 1232 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 1233 |
PYMAJOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[0])") |
| 1234 |
PYMINOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1])") |
| 1235 |
PYMINORPLUS1:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1]+1)") |
| 1236 |
PYTHON_SITE:=$(shell $(PYTHON) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') |
| 1237 |
endif |
| 1238 |
|
| 1239 |
BUILD_DEPS += , $(PYTHON) |
| 1240 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 1241 |
BUILD_DEPS += , $(PYTHON)-dev <!nopython> |
| 1242 |
BUILD_DEPS += , $(PYTHON)-setuptools <!nopython> |
| 1243 |
BUILD_DEPS += , dh-python <!nopython> |
| 1244 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1245 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 1246 |
BUILD_DEPS_ARCH += , $(PYTHON)-lxml$(OOO_NO_CHECK_ARCHS) <!nocheck !nopython> |
| 1247 |
# pyuno testpip: https://cgit.freedesktop.org/libreoffice/core/diff/pyuno/qa/pytests/testpip.py?id=47e110fc66292e76152252a90a0e20580c33c13d |
| 1248 |
BUILD_DEPS_ARCH += , $(PYTHON)-pip$(OOO_NO_CHECK_ARCHS) <!nocheck !nopython> |
| 1249 |
# same with setuptools |
| 1250 |
BUILD_DEPS_ARCH += , $(PYTHON)-setuptools$(OOO_NO_CHECK_ARCHS) <!nocheck !nopython> |
| 1251 |
# and venv ...: https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-25-8&id=fbb1d7bcba219685d789c2f4cdf348f8f7f8d696 |
| 1252 |
BUILD_DEPS_ARCH += , $(PYTHON)-venv$(OOO_NO_CHECK_ARCHS) <!nocheck !nopython> |
| 1253 |
else |
| 1254 |
CONFIGURE_FLAGS += --without-lxml |
| 1255 |
endif |
| 1256 |
endif |
| 1257 |
endif |
| 1258 |
|
| 1259 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 1260 |
#BUILD_DEPS_INDEP += , cli-common-dev [$(OOO_CLI_ARCHS)] <!nocil> |
| 1261 |
# both for Microsofts and Ubuntus packages |
| 1262 |
BUILD_DEPS_INDEP += , dotnet-sdk-8.0 [$(OOO_CLI_ARCHS)] <!nocil> |
| 1263 |
else |
| 1264 |
CONFIGURE_FLAGS += --without-dotnet |
| 1265 |
endif |
| 1266 |
|
| 1267 |
BUILD_DEPS += , debhelper-compat (= 12) |
| 1268 |
|
| 1269 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1270 |
BUILD_DEPS_ARCH += , locales <!nocheck> | locales-all <!nocheck> |
| 1271 |
BUILD_DEPS_ARCH += , gdb [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1272 |
BUILD_DEPS_ARCH += , fontconfig [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1273 |
BUILD_DEPS_ARCH += , fonts-liberation (>= 1:2) [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1274 |
BUILD_DEPS_ARCH += , fonts-crosextra-carlito (>= 20230309) [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1275 |
# porrst.cxx:85:Assertion |
| 1276 |
#Test name: (anonymous namespace)::testFloattableAnchorHeight::TestBody |
| 1277 |
#equality assertion failed |
| 1278 |
#- Expected: 1 |
| 1279 |
#- Actual : 2 |
| 1280 |
BUILD_DEPS_ARCH += , fonts-crosextra-caladea [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1281 |
# https://lists.freedesktop.org/archives/libreoffice/2017-May/077764.html |
| 1282 |
BUILD_DEPS_ARCH += , fonts-dejavu [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1283 |
# used in vcl/qa/cppunit/text.cxx:void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs() |
| 1284 |
BUILD_DEPS_ARCH += , fonts-hosny-amiri (>= 1.000) [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1285 |
# sdext/source/pdfimport/test/tests.cxx (the test PDF uses NaskhArabic) and the result of the import is |
| 1286 |
# checked which fails without the font. Also used in /vcl/qa/cppunit/complextext.cxx (VclComplexTextTest::testCaching()) |
| 1287 |
BUILD_DEPS_ARCH += , fonts-noto-core [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1288 |
# in pdfexport2.cxx (testTdf124116TrackUntrack - which uses David CLM) |
| 1289 |
BUILD_DEPS_ARCH += , culmus [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1290 |
# FIXME: Linux Libertine G (does fonts-linuxlibertine even contain it?, I don't see the _G files?) |
| 1291 |
# now is used in test documents. |
| 1292 |
# now we get a abort if fonts is not found and replaced in layout tests (even though |
| 1293 |
# https://cgit.freedesktop.org/libreoffice/core/commit/?id=172270a8f04388a8f8062f672f9c3f3144a01a1f suggests that |
| 1294 |
# it isn't the case in --without-fonts) but... And while we disable that abort via patch having this |
| 1295 |
# to be sure there is no other failure mode makes sense (as with the other fonts above) |
| 1296 |
BUILD_DEPS_ARCH += , fonts-linuxlibertine [$(OOO_AUTOPKGTEST_ARCHS)] <!nocheck> |
| 1297 |
# 17:35 <@sberg_> vmiklos, oh, what kind of poor test is that? "warn:sal.osl:3785:2:sal/osl/unx/process.cxx:344: ChildStatusProc : starting 'pstoedit' failed" etc. is what I see in workdir/CppunitTest/filter_eps_test.test.log... |
| 1298 |
BUILD_DEPS_ARCH += , pstoedit [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1299 |
BUILD_DEPS_ARCH += , imagemagick [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1300 |
BUILD_DEPS_ARCH += , ghostscript [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1301 |
|
| 1302 |
BUILD_DEPS_ARCH += , hunspell-en-us [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1303 |
BUILD_DEPS_ARCH += , hyphen-en-us [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1304 |
# $ git grep xHyphenator.*hasLocale | grep -v u\"US |
| 1305 |
# sw/qa/extras/layout/layout2.cxx: if (!xHyphenator->hasLocale(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString()))) |
| 1306 |
# sw/qa/extras/layout/layout2.cxx: if (!xHyphenator->hasLocale(lang::Locale(u"hu"_ustr, u"HU"_ustr, OUString()))) |
| 1307 |
# sw/qa/extras/layout/layout3.cxx: if (!xHyphenator->hasLocale(lang::Locale("de", "DE", OUString()))) |
| 1308 |
BUILD_DEPS_ARCH += , hyphen-hu [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1309 |
BUILD_DEPS_ARCH += , hyphen-de [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1310 |
endif |
| 1311 |
# we don't run any cppunit check in all builds |
| 1312 |
# ifneq "$(AUTOPKGTEST_BUILD)" "y" |
| 1313 |
ifneq (,$(filter cppunit, $(SYSTEM_STUFF))) |
| 1314 |
BUILD_DEPS_ARCH += , libcppunit-dev |
| 1315 |
# without the deterministic order patch the xmlsecurity_signing test fails. See |
| 1316 |
# https://cgit.freedesktop.org/libreoffice/core/commit/external/cppunit/order.patch.0?id=2f2246d22e2a8ccbc1dc3e6f5243734a61edf270 |
| 1317 |
ifeq "$(ENABLE_LTO)" "y" |
| 1318 |
BUILD_DEPS_ARCH += , libcppunit-dev (>= 1.15.1-4) [$(filter $(OOO_CHECK_ARCHS),$(OOO_ARCHS))] |
| 1319 |
endif |
| 1320 |
endif |
| 1321 |
ifeq ($(MAKECMDGOALS),binary-indep) |
| 1322 |
CONFIGURE_FLAGS_INDEP += --without-cppunit |
| 1323 |
endif |
| 1324 |
# endif |
| 1325 |
ifeq "$(ENABLE_JUNIT4)" "y" |
| 1326 |
BUILD_DEPS += , junit4 $(JUNIT_MIN_VER) [$(OOO_JUNIT_ARCHS)] <!nocheck !nojava> |
| 1327 |
else |
| 1328 |
CONFIGURE_FLAGS += --without-junit |
| 1329 |
endif |
| 1330 |
ifeq "$(ENABLE_EXPORT_VALIDATION_TESTS)" "y" |
| 1331 |
BUILD_DEPS += , libofficeotron-java$(OOO_NO_CHECK_ARCHS) <!nocheck !nojava>, libodfvalidator-java$(OOO_NO_CHECK_ARCHS) <!nocheck !nojava> |
| 1332 |
else |
| 1333 |
CONFIGURE_FLAGS += --without-export-validation |
| 1334 |
endif |
| 1335 |
ifneq "$(BUILD_ONLY_EN_US)" "y" |
| 1336 |
ifeq (lang=,$(findstring lang=,$(DEB_BUILD_OPTIONS))) |
| 1337 |
ISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') |
| 1338 |
ifeq "$(ENABLE_HELP)" "n" |
| 1339 |
HELPISOS= |
| 1340 |
else |
| 1341 |
HELPISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') |
| 1342 |
endif |
| 1343 |
LANGPACKISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') |
| 1344 |
else |
| 1345 |
# Note that the first one here *has to be* en-US. the first one gets |
| 1346 |
# gid_Module_Root as filelist later and the rest gid_Module_Root.$iso |
| 1347 |
# but we can't/shouldn't do dynamic switching, so let en-US be the first |
| 1348 |
# one to that gid_Module_Root always is english and the other langpacks |
| 1349 |
# have gid_Module_Root.$iso |
| 1350 |
#ISOS=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') |
| 1351 |
ISOS:=en-US af am ar as ast be bg bn bn-IN br bs ca ca-valencia cs cy da de dz el \ |
| 1352 |
en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu hy id is it ja \ |
| 1353 |
ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ |
| 1354 |
pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ |
| 1355 |
ta te tg th tl tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu |
| 1356 |
ifeq "$(ENABLE_HELP)" "n" |
| 1357 |
HELPISOS:= |
| 1358 |
else |
| 1359 |
#HELPISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') |
| 1360 |
HELPISOS:=en-US ca ca-valencia cs da de dz el en-GB es et eu fi fr gl hi hu id it \ |
| 1361 |
ja km ko nl om pl pt pt-BR ru sk sl sv tr vi zh-CN zh-TW |
| 1362 |
endif |
| 1363 |
#LANGPACKISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') |
| 1364 |
LANGPACKISOS:=en-US af am ar as ast be bg bn bn-IN br bs ca ca-valencia cs cy da de dz el \ |
| 1365 |
en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu hy id is it ja \ |
| 1366 |
ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ |
| 1367 |
pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ |
| 1368 |
ta te tg th tl tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu |
| 1369 |
endif |
| 1370 |
# only needed if we supported builds without -B, see above |
| 1371 |
#ifeq "$(AUTOPKGTEST_BUILD)" "y" |
| 1372 |
# ISOS := en-US he zh-TW |
| 1373 |
# HELPISOS := en-US zh-TW |
| 1374 |
# LANGPACKISOS := en-US he zh-TW |
| 1375 |
#endif |
| 1376 |
else |
| 1377 |
ISOS=en-US |
| 1378 |
ifeq "$(ENABLE_HELP)" "n" |
| 1379 |
HELPISOS= |
| 1380 |
else |
| 1381 |
HELPISOS=en-US |
| 1382 |
endif |
| 1383 |
LANGPACKISOS=en-US |
| 1384 |
endif |
| 1385 |
BUILD_ISOS = $(ISOS) |
| 1386 |
|
| 1387 |
ifneq "$(BUILD_ONLY_EN_US)" "y" |
| 1388 |
ifneq "$(BUILD_ISOS)" "en-US" |
| 1389 |
CONFIGURE_FLAGS_LANG += --with-lang="$(BUILD_ISOS)" |
| 1390 |
CONFIGURE_FLAGS_INDEP += $(CONFIGURE_FLAGS_LANG) |
| 1391 |
BUILD_DEPS_INDEP += , gettext |
| 1392 |
endif |
| 1393 |
endif |
| 1394 |
|
| 1395 |
ifeq "$(ENABLE_JAVA)" "y" |
| 1396 |
BUILD_DEPS += , java-common (>= 0.75) <!nojava> |
| 1397 |
BUILD_DEPS += , maven-repo-helper$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1398 |
ifeq "$(JDK)" "default" |
| 1399 |
JAVA_HOME=/usr/lib/jvm/default-java |
| 1400 |
DEFAULT_JDK := $(call java_dependency, default-jdk) |
| 1401 |
# build-depend on 1.9 (upstream needs it anyway for module-info support) |
| 1402 |
BUILD_DEPS += , $(shell echo $(DEFAULT_JDK) | sed -e 's/default-jdk/default-jdk (>= 2:1.9)/' | sed -e 's/\]/$(foreach i,$(JAVA_BRIDGE_BROKEN_ARCHS), !$(i))\]/') <!nojava> |
| 1403 |
endif |
| 1404 |
ifeq "$(JDK)" "openjdk" |
| 1405 |
BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk <!nojava> |
| 1406 |
JAVA_HOME=/usr/lib/jvm/java-$(JAVA_MAINVER)-openjdk-$(DEB_HOST_ARCH) |
| 1407 |
endif |
| 1408 |
TEST_JAVA_HOME=$(JAVA_HOME) |
| 1409 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 1410 |
BUILD_DEPS_INDEP += , ant$(OOO_NO_JAVA_ARCHS) <!nojava>, ant-optional$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1411 |
else |
| 1412 |
# report-builder is done in build-arch already |
| 1413 |
ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) |
| 1414 |
BUILD_DEPS += , ant$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1415 |
else |
| 1416 |
BUILD_DEPS_INDEP += , ant$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1417 |
endif |
| 1418 |
endif |
| 1419 |
JAVA_RUNTIME_DEPENDS = default-jre (>= 2:1.$(JAVA_RUNTIME_BASELINE)) |
| 1420 |
JAVA_RUNTIME_DEPENDS += | java-runtime (>= $(JAVA_RUNTIME_BASELINE)) | java$(JAVA_RUNTIME_BASELINE)-runtime |
| 1421 |
# Suns Java "packages" |
| 1422 |
JAVA_RUNTIME_DEPENDS += | jre |
| 1423 |
export JAVA_HOME |
| 1424 |
CONFIGURE_FLAGS += --with-jdk-home=$(JAVA_HOME) |
| 1425 |
JAVA_COMMON_DEPENDS= , libreoffice-java-common |
| 1426 |
JAVA_COMMON_DEPENDS_VERSION:= (>= $(BASE_VERSION)~) |
| 1427 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 1428 |
CONFIGURE_FLAGS_INDEP += --enable-ext-wiki-publisher |
| 1429 |
endif |
| 1430 |
ifeq "$(ENABLE_REPORTBUILDER)" "y" |
| 1431 |
# report-builder |
| 1432 |
ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) |
| 1433 |
REPORT_BUILDER_BUILD_DEPS += , libbase-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libsac-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libxml-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libflute-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libpentaho-reporting-flow-engine-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, liblayout-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libloader-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libformula-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, librepository-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libfonts-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava>, libserializer-java$(OOO_NO_REPORTBUILDER_ARCHS) <!nojava> |
| 1434 |
REPORT_BUILDER_JAR_DEPENDS := , libbase-java, libsac-java, libxml-java, libflute-java, libpentaho-reporting-flow-engine-java, liblayout-java, libloader-java, libformula-java, librepository-java, libfonts-java, libserializer-java |
| 1435 |
CONFIGURE_FLAGS += --with-libbase-jar=/usr/share/java/libbase.jar --with-libxml-jar=/usr/share/java/libxml.jar --with-flute-jar=/usr/share/java/flute.jar --with-jfreereport-jar=/usr/share/java/flow-engine.jar --with-liblayout-jar=/usr/share/java/liblayout.jar --with-libloader-jar=/usr/share/java/libloader.jar --with-libformula-jar=/usr/share/java/libformula.jar --with-librepository-jar=/usr/share/java/librepository.jar --with-libfonts-jar=/usr/share/java/libfonts.jar --with-libserializer-jar=/usr/share/java/libserializer.jar |
| 1436 |
endif |
| 1437 |
BUILD_DEPS += $(REPORT_BUILDER_BUILD_DEPS) |
| 1438 |
else |
| 1439 |
CONFIGURE_FLAGS += --disable-report-builder |
| 1440 |
endif |
| 1441 |
ifeq "$(ENABLE_NLPSOLVER)" "y" |
| 1442 |
CONFIGURE_FLAGS_INDEP += --enable-ext-nlpsolver |
| 1443 |
endif |
| 1444 |
OOO_OFFICEBEAN_DEP = libofficebean-java |
| 1445 |
BUILD_DEPS += , javahelper $(JAVAHELPER_MIN_VERSION)$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1446 |
else |
| 1447 |
CONFIGURE_FLAGS += --without-java |
| 1448 |
DEBHELPER_OPTIONS += -Nlibofficebean-java -Nlibreoffice-java-common -Nlibreoffice-script-provider-bsh -Nlibreoffice-script-provider-js -Nlibreoffice-subsequentcheckbase -Nlibunoloader-java -Nliblibreoffice-java -Nlibreoffice-sdbc-hsqldb -Nure-java |
| 1449 |
endif |
| 1450 |
|
| 1451 |
ifeq "$(ENABLE_JAVA)" "y" |
| 1452 |
ifeq "$(shell $(JAVA_HOME)/bin/java -version 2>&1 | grep -q Zero && echo true)" "true" |
| 1453 |
RUN_MAKE_CHECK:=n |
| 1454 |
ENABLE_JUNIT4=n |
| 1455 |
endif |
| 1456 |
endif |
| 1457 |
|
| 1458 |
ifeq "$(ENABLE_NSS)" "y" |
| 1459 |
ifneq (,$(filter nss, $(SYSTEM_STUFF))) |
| 1460 |
BUILD_DEPS+= , libnss3-dev |
| 1461 |
BUILD_DEPS+= , libnspr4-dev |
| 1462 |
else |
| 1463 |
CONFIGURE_FLAGS += --without-system-nss |
| 1464 |
endif |
| 1465 |
else |
| 1466 |
CONFIGURE_FLAGS += --disable-nss |
| 1467 |
endif |
| 1468 |
|
| 1469 |
ifneq (,$(filter hunspell, $(SYSTEM_STUFF))) |
| 1470 |
BUILD_DEPS += , libhunspell-dev |
| 1471 |
endif |
| 1472 |
CONFIGURE_FLAGS += --with-external-dict-dir=$(DICT_DIR) |
| 1473 |
|
| 1474 |
ifneq (,$(filter altlinuxhyph, $(SYSTEM_STUFF))) |
| 1475 |
BUILD_DEPS += , libhyphen-dev |
| 1476 |
endif |
| 1477 |
CONFIGURE_FLAGS += --with-external-hyph-dir=$(HYPH_DIR) |
| 1478 |
|
| 1479 |
ifneq (,$(filter boost, $(SYSTEM_STUFF))) |
| 1480 |
ifneq "$(BOOST_VERSION)" "default" |
| 1481 |
BUILD_DEPS += , libboost$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-date-time$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-iostreams$(BOOST_VERSION)-dev, libboost-filesystem$(BOOST_VERSION)-dev, libboost-locale$(BOOST_VERSION)-dev |
| 1482 |
#BUILD_DEPS += , libboost-thread$(BOOST_VERSION)-dev, libboost-program-options$(BOOST_VERSION)-dev |
| 1483 |
ifeq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 1484 |
BUILD_DEPS += , libboost-iostreams$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-program-options$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-filesystem$(BOOST_VERSION)-dev $(BOOST_MINVER) |
| 1485 |
endif |
| 1486 |
else |
| 1487 |
BUILD_DEPS += , libboost-dev $(BOOST_MINVER), libboost-date-time-dev $(BOOST_MINVER), libboost-iostreams-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER), libboost-locale-dev $(BOOST_MINVER) |
| 1488 |
#BUILD_DEPS += , libboost-thread-dev, libboost-program-options-dev |
| 1489 |
ifeq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 1490 |
BUILD_DEPS += , libboost-iostreams-dev $(BOOST_MINVER), libboost-program-options-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER) |
| 1491 |
endif |
| 1492 |
endif |
| 1493 |
ifeq "$(shell if [ -e /usr/lib/$(DEB_HOST_MULTIARCH)/libboost_date_time.so ]; then echo true; fi)" "true" |
| 1494 |
CONFIGURE_FLAGS += --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) |
| 1495 |
endif |
| 1496 |
ifneq (,$(filter dragonbox, $(SYSTEM_STUFF))) |
| 1497 |
BUILD_DEPS += , libdragonbox-dev |
| 1498 |
endif |
| 1499 |
ifneq (,$(filter libfixmath, $(SYSTEM_STUFF))) |
| 1500 |
BUILD_DEPS += , libfixmath-dev |
| 1501 |
endif |
| 1502 |
endif |
| 1503 |
|
| 1504 |
ifneq "$(ENABLE_SKIA)" "y" |
| 1505 |
CONFIGURE_FLAGS += --disable-skia |
| 1506 |
endif |
| 1507 |
|
| 1508 |
ifneq (,$(filter mdds, $(SYSTEM_STUFF))) |
| 1509 |
BUILD_DEPS += , libmdds-dev (>= 3.0), libmdds-dev (<< 3.3~) |
| 1510 |
endif |
| 1511 |
|
| 1512 |
ifneq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 1513 |
ifneq "$(TRIXIE_BACKPORT)" "y" |
| 1514 |
BUILD_DEPS += , liborcus-dev (>= 0.21.0-5), liborcus-dev (<< 0.22~) |
| 1515 |
else |
| 1516 |
# in trixie there's no liborcus with parquet enabled anyway (and arrow isn't backporte |
| 1517 |
# either), so we can keep this. any build won't have parquet support in liborcus anyway |
| 1518 |
BUILD_DEPS += , liborcus-dev (>= 0.21), liborcus-dev (<< 0.22~) |
| 1519 |
endif |
| 1520 |
endif |
| 1521 |
|
| 1522 |
ifeq "$(ENABLE_XMLHELP)" "y" |
| 1523 |
ifneq (,$(filter clucene, $(SYSTEM_STUFF))) |
| 1524 |
BUILD_DEPS += , libclucene-dev |
| 1525 |
endif |
| 1526 |
endif |
| 1527 |
|
| 1528 |
ifeq "$(USE_EXTERNAL_CXXLIBS)" "y" |
| 1529 |
ifneq (,$(filter librevenge, $(SYSTEM_STUFF))) |
| 1530 |
BUILD_DEPS += , librevenge-dev, librevenge-dev (<< 0.1~) |
| 1531 |
endif |
| 1532 |
ifneq (,$(filter libwpd, $(SYSTEM_STUFF))) |
| 1533 |
BUILD_DEPS += , libwpd-dev (>= 0.10), libwpd-dev (<< 0.11~) |
| 1534 |
endif |
| 1535 |
ifneq (,$(filter mythes, $(SYSTEM_STUFF))) |
| 1536 |
BUILD_DEPS += , libmythes-dev |
| 1537 |
endif |
| 1538 |
ifneq (,$(filter libwps, $(SYSTEM_STUFF))) |
| 1539 |
BUILD_DEPS += , libwps-dev (>= 0.4), libwps-dev (<< 0.5~) |
| 1540 |
endif |
| 1541 |
ifneq (,$(filter libwpg, $(SYSTEM_STUFF))) |
| 1542 |
BUILD_DEPS += , libwpg-dev (>= 0.3), libwpg-dev (<< 0.4~) |
| 1543 |
endif |
| 1544 |
ifneq (,$(filter libvisio, $(SYSTEM_STUFF))) |
| 1545 |
BUILD_DEPS += , libvisio-dev (>= 0.1), libvisio-dev (<< 0.2~) |
| 1546 |
endif |
| 1547 |
ifneq (,$(filter libcdr, $(SYSTEM_STUFF))) |
| 1548 |
BUILD_DEPS += , libcdr-dev (>= 0.1), libcdr-dev (<< 0.2~) |
| 1549 |
endif |
| 1550 |
ifneq (,$(filter libmspub, $(SYSTEM_STUFF))) |
| 1551 |
BUILD_DEPS += , libmspub-dev (>= 0.1), libmspub-dev (<< 0.2~) |
| 1552 |
endif |
| 1553 |
ifneq (,$(filter libmwaw, $(SYSTEM_STUFF))) |
| 1554 |
# BUILD_DEPS += , libmwaw-dev (>= 0.3.1), libmwaw-dev (<< 0.4~) |
| 1555 |
# configure.ac checks for >= 0.3.21 |
| 1556 |
BUILD_DEPS += , libmwaw-dev (>= 0.3.21), libmwaw-dev (<< 0.4~) |
| 1557 |
# ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1558 |
# BUILD_DEPS_ARCH += , libmwaw-dev (>= 0.3.21) [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1559 |
# endif |
| 1560 |
endif |
| 1561 |
ifneq (,$(filter libodfgen, $(SYSTEM_STUFF))) |
| 1562 |
BUILD_DEPS += , libodfgen-dev (>= 0.1), libodfgen-dev (<< 0.2~) |
| 1563 |
endif |
| 1564 |
ifneq (,$(filter libepubgen, $(SYSTEM_STUFF))) |
| 1565 |
BUILD_DEPS += , libepubgen-dev (>= 0.1.0), libepubgen-dev (<< 0.2~) |
| 1566 |
endif |
| 1567 |
ifneq (,$(filter libetonyek, $(SYSTEM_STUFF))) |
| 1568 |
BUILD_DEPS += , libetonyek-dev, libetonyek-dev (<< 0.2~) |
| 1569 |
endif |
| 1570 |
ifneq (,$(filter libfreehand, $(SYSTEM_STUFF))) |
| 1571 |
BUILD_DEPS += , libfreehand-dev (>= 0.1), libfreehand-dev (<< 0.2~) |
| 1572 |
endif |
| 1573 |
ifneq (,$(filter libabw, $(SYSTEM_STUFF))) |
| 1574 |
BUILD_DEPS += , libabw-dev (>= 0.1), libabw-dev (<< 0.2~) |
| 1575 |
endif |
| 1576 |
ifneq (,$(filter libpagemaker, $(SYSTEM_STUFF))) |
| 1577 |
BUILD_DEPS += , libpagemaker-dev, libpagemaker-dev (<< 0.1~) |
| 1578 |
endif |
| 1579 |
ifneq (,$(filter libzmf, $(SYSTEM_STUFF))) |
| 1580 |
BUILD_DEPS += , libzmf-dev, libzmf-dev (<< 0.1~) |
| 1581 |
endif |
| 1582 |
ifneq (,$(filter libstaroffice, $(SYSTEM_STUFF))) |
| 1583 |
BUILD_DEPS += , libstaroffice-dev, libstaroffice-dev (<< 0.1~) |
| 1584 |
endif |
| 1585 |
ifneq (,$(filter libqxp, $(SYSTEM_STUFF))) |
| 1586 |
BUILD_DEPS += , libqxp-dev, libqxp-dev (<< 0.1~) |
| 1587 |
endif |
| 1588 |
ifneq (,$(filter libebook, $(SYSTEM_STUFF))) |
| 1589 |
BUILD_DEPS += , libe-book-dev (>= 0.1), libe-book-dev (<< 0.2~) |
| 1590 |
endif |
| 1591 |
ifeq "$(ENABLE_LIBCMIS)" "y" |
| 1592 |
ifneq (,$(filter libcmis, $(SYSTEM_STUFF))) |
| 1593 |
BUILD_DEPS += , libcmis-dev (>= 0.6.1~), libcmis-dev (<< 0.7~) |
| 1594 |
endif |
| 1595 |
else |
| 1596 |
CONFIGURE_FLAGS += --disable-libcmis |
| 1597 |
endif |
| 1598 |
ifeq "$(ENABLE_ZXING)" "y" |
| 1599 |
ifneq (,$(filter zxing, $(SYSTEM_STUFF))) |
| 1600 |
BUILD_DEPS += , libzxing-dev |
| 1601 |
endif |
| 1602 |
else |
| 1603 |
CONFIGURE_FLAGS += --disable-zxing |
| 1604 |
endif |
| 1605 |
endif |
| 1606 |
CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR) |
| 1607 |
|
| 1608 |
ifneq (,$(filter zxcvbn, $(SYSTEM_STUFF))) |
| 1609 |
BUILD_DEPS += , libzxcvbn-dev |
| 1610 |
endif |
| 1611 |
|
| 1612 |
ifneq (,$(filter md4c, $(SYSTEM_STUFF))) |
| 1613 |
BUILD_DEPS += , libmd4c-dev |
| 1614 |
endif |
| 1615 |
|
| 1616 |
ifneq (,$(filter fast-float, $(SYSTEM_STUFF))) |
| 1617 |
ifeq "$(ENABLE_PDFIUM)" "y" |
| 1618 |
# no [$(PDFIUM_ARCHS)] since that is currently all archs anyway.... |
| 1619 |
#BUILD_DEPS += , libfast-float-dev (>= 7.0.0) [$(PDFIUM_ARCHS)] |
| 1620 |
BUILD_DEPS += , libfast-float-dev (>= 7.0.0) |
| 1621 |
else |
| 1622 |
BUILD_DEPS += , libfast-float-dev |
| 1623 |
endif |
| 1624 |
endif |
| 1625 |
|
| 1626 |
ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" |
| 1627 |
BUILD_DEPS_INDEP += , dh-apparmor |
| 1628 |
ifeq "$(CHECK_APPARMOR_PROFILES)" "true" |
| 1629 |
BUILD_DEPS_INDEP += , apparmor <!nocheck> |
| 1630 |
endif |
| 1631 |
endif |
| 1632 |
|
| 1633 |
ifeq "$(ENABLE_EOT)" "y" |
| 1634 |
ifneq (,$(filter libeot, $(SYSTEM_STUFF))) |
| 1635 |
BUILD_DEPS += , libeot-dev |
| 1636 |
endif |
| 1637 |
else |
| 1638 |
CONFIGURE_FLAGS += --disable-eot |
| 1639 |
endif |
| 1640 |
|
| 1641 |
ifneq (,$(filter lcms2, $(SYSTEM_STUFF))) |
| 1642 |
BUILD_DEPS += , liblcms2-dev |
| 1643 |
endif |
| 1644 |
|
| 1645 |
ifneq (,$(filter openldap, $(SYSTEM_STUFF))) |
| 1646 |
BUILD_DEPS_ARCH += , libldap-dev |
| 1647 |
endif |
| 1648 |
|
| 1649 |
ifneq (,$(filter liblangtag, $(SYSTEM_STUFF))) |
| 1650 |
BUILD_DEPS += , liblangtag-dev |
| 1651 |
endif |
| 1652 |
|
| 1653 |
ifneq (,$(filter icu, $(SYSTEM_STUFF))) |
| 1654 |
BUILD_DEPS += , libicu-dev |
| 1655 |
endif |
| 1656 |
|
| 1657 |
|
| 1658 |
ifeq "$(BUILD_CAIROCANVAS)" "y" |
| 1659 |
ifneq (,$(filter cairo, $(SYSTEM_STUFF))) |
| 1660 |
BUILD_DEPS+= , libcairo2-dev |
| 1661 |
else |
| 1662 |
BUILD_DEPS += , meson, ninja-build |
| 1663 |
endif |
| 1664 |
else |
| 1665 |
CONFIGURE_FLAGS+= --disable-cairo |
| 1666 |
endif |
| 1667 |
|
| 1668 |
ifeq "$(ENABLE_EMBINDTEST_UNO)" "y" |
| 1669 |
CONFIGURE_FLAGS += --enable-embindtest-uno |
| 1670 |
endif |
| 1671 |
|
| 1672 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_RUST_ARCHS))) |
| 1673 |
ENABLE_RUST=y |
| 1674 |
ifeq "$(ENABLE_RUST)" "y" |
| 1675 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_RUST_UNO_ARCHS))) |
| 1676 |
ENABLE_RUST_UNO=y |
| 1677 |
endif |
| 1678 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 1679 |
CONFIGURE_FLAGS += --enable-rust-uno |
| 1680 |
RUST_UNO_VERSION=$(shell grep version rust_uno/Cargo.toml | awk '{ print $$3 }' | sed -e s/\"//g) |
| 1681 |
endif |
| 1682 |
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_YRS_ARCHS))) |
| 1683 |
ENABLE_YRS=y |
| 1684 |
endif |
| 1685 |
ifeq "$(ENABLE_YRS)" "y" |
| 1686 |
ifeq ($(filter upstream-cargo,$(DEB_BUILD_PROFILES)),) |
| 1687 |
SYSTEM_STUFF += yrs |
| 1688 |
endif |
| 1689 |
endif |
| 1690 |
# FIXME: if not using yffi from the system yet maybe it might make sense to use that one internally |
| 1691 |
# and use the other libs from the system? |
| 1692 |
endif |
| 1693 |
endif |
| 1694 |
|
| 1695 |
ifeq "$(ENABLE_RUST)" "y" |
| 1696 |
# for the include below this is explicit, otherwise cargo would get us this anyway |
| 1697 |
BUILD_DEPS += , rustc (>= 1.85) $(OOO_NO_RUST_ARCHS) |
| 1698 |
include /usr/share/rustc/architecture.mk |
| 1699 |
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE |
| 1700 |
BUILD_DEPS += , cargo (>= 1.85) $(OOO_NO_RUST_ARCHS) |
| 1701 |
# /usr/share/cargo/bin/cargo says: |
| 1702 |
# Make sure you add "Build-Depends: python3:native" if you use this directly. |
| 1703 |
# If using this only indirectly via dh-cargo, then you only need "Build-Depends: |
| 1704 |
# dh-cargo"; this is a general principle when declaring dependencies. |
| 1705 |
BUILD_DEPS += , python3 $(OOO_NO_RUST_ARCHS) |
| 1706 |
ifeq ($(filter upstream-cargo,$(DEB_BUILD_PROFILES)),) |
| 1707 |
export PATH := /usr/share/cargo/bin:$(PATH) |
| 1708 |
export CARGO=/usr/share/cargo/bin/cargo |
| 1709 |
export CARGO_HOME=$(CURDIR)/debian/cargo_home |
| 1710 |
endif |
| 1711 |
BUILD_DEPS_ARCH += , dh-cargo $(OOO_NO_RUST_ARCHS) |
| 1712 |
ifeq "$(ENABLE_YRS)" "y" |
| 1713 |
CONFIGURE_FLAGS += --with-yrs |
| 1714 |
ifeq ($(filter upstream-cargo,$(DEB_BUILD_PROFILES)),) |
| 1715 |
CONFIGURE_FLAGS += --with-system-yrs |
| 1716 |
BUILD_DEPS_ARCH += , cbindgen $(OOO_NO_YRS_ARCHS) <!upstream-cargo> |
| 1717 |
BUILD_DEPS_ARCH += , librust-yffi-dev $(OOO_NO_YRS_ARCHS) <!upstream-cargo> |
| 1718 |
CARGO_PREPARE_DEBIAN_FLAGS += --link-from-system |
| 1719 |
endif |
| 1720 |
endif |
| 1721 |
endif |
| 1722 |
|
| 1723 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 1724 |
ifeq "$(DEB_HOST_ARCH)" "riscv64" |
| 1725 |
USE_MOLD=y |
| 1726 |
endif |
| 1727 |
ifeq (riscv64,$(findstring riscv64,$(OOO_RUST_UNO_ARCHS))) |
| 1728 |
BUILD_DEPS += , mold [riscv64] |
| 1729 |
endif |
| 1730 |
endif |
| 1731 |
|
| 1732 |
ifeq "$(ENABLE_KF5)" "y" |
| 1733 |
CONFIGURE_FLAGS += --enable-kf5 |
| 1734 |
BUILD_DEPS_ARCH += , libkf5coreaddons-dev, libkf5i18n-dev, libkf5config-dev, libkf5windowsystem-dev, libkf5kio-dev |
| 1735 |
endif |
| 1736 |
ifeq "$(ENABLE_KF6)" "y" |
| 1737 |
CONFIGURE_FLAGS += --enable-kf6 |
| 1738 |
BUILD_DEPS_ARCH += , libkf6coreaddons-dev, libkf6i18n-dev, libkf6config-dev, libkf6windowsystem-dev, libkf6kio-dev |
| 1739 |
endif |
| 1740 |
PLASMA_ICONSET_DEP=libreoffice-style-breeze |
| 1741 |
ifeq "$(ENABLE_QT5)" "y" |
| 1742 |
CONFIGURE_FLAGS += --enable-qt5 |
| 1743 |
BUILD_DEPS_ARCH += , qtbase5-dev $(QT5_MINVER), qt5-qmake $(QT5_MINVER), qtbase5-dev-tools $(QT5_MINVER) |
| 1744 |
BUILD_DEPS_ARCH += , libqt5x11extras5-dev $(QT5_MINVER) |
| 1745 |
BUILD_DEPS_ARCH += , libglib2.0-dev |
| 1746 |
BUILD_DEPS_ARCH += , libxcb1-dev |
| 1747 |
endif |
| 1748 |
ifeq "$(ENABLE_QT6)" "y" |
| 1749 |
CONFIGURE_FLAGS += --enable-qt6 |
| 1750 |
BUILD_DEPS_ARCH += , qt6-base-dev $(QT6_MINVER), qmake6 $(QT6_MINVER), qt6-base-dev-tools $(QT6_MINVER) |
| 1751 |
BUILD_DEPS_ARCH += , libxcb1-dev |
| 1752 |
endif |
| 1753 |
ifneq "$(shell echo $(ENABLE_QT6)$(ENABLE_KF6) | grep -q y && echo true)" "true" |
| 1754 |
CONFIGURE_FLAGS += --disable-qt6-multimedia |
| 1755 |
else |
| 1756 |
ifeq "$(ENABLE_QT6_MULTIMEDIA)" "y" |
| 1757 |
# go sure. the avmediaqt6 code has stuff enabled only if >= 6.5.0 |
| 1758 |
QT6_MINVER := (>= 6.5.0) |
| 1759 |
BUILD_DEPS_ARCH += , qt6-multimedia-dev $(QT6_MINVER) [!m68k] |
| 1760 |
else |
| 1761 |
CONFIGURE_FLAGS += --disable-qt6-multimedia |
| 1762 |
endif |
| 1763 |
endif |
| 1764 |
|
| 1765 |
ifeq "$(ENABLE_MARIADB)" "y" |
| 1766 |
ifeq "$(MYSQL_FLAVOUR)" "default" |
| 1767 |
BUILD_DEPS_ARCH += , default-libmysqlclient-dev |
| 1768 |
else |
| 1769 |
ifeq "$(MYSQL_FLAVOUR)" "mysql" |
| 1770 |
ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) |
| 1771 |
BUILD_DEPS_ARCH += , libmysqlclient-dev |
| 1772 |
endif |
| 1773 |
MARIADBCONFIG=/usr/bin/mysql_config |
| 1774 |
endif |
| 1775 |
ifeq "$(MYSQL_FLAVOUR)" "mariadb" |
| 1776 |
ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) |
| 1777 |
BUILD_DEPS_ARCH += , libmariadb-dev |
| 1778 |
endif |
| 1779 |
MARIADBCONFIG=/usr/bin/mariadb_config |
| 1780 |
endif |
| 1781 |
endif |
| 1782 |
else |
| 1783 |
CONFIGURE_FLAGS += --disable-mariadb-sdbc |
| 1784 |
endif |
| 1785 |
|
| 1786 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 1787 |
BASE_FIREBIRD_RECOMMENDS = libreoffice-sdbc-firebird [$(OOO_FIREBIRD_ARCHS)] |
| 1788 |
ifneq (,$(filter libatomic-ops, $(SYSTEM_STUFF))) |
| 1789 |
BUILD_DEPS_ARCH += , libatomic-ops-dev$(OOO_NO_FIREBIRD_ARCHS) |
| 1790 |
endif |
| 1791 |
ifneq (,$(filter libtommath, $(SYSTEM_STUFF))) |
| 1792 |
BUILD_DEPS_ARCH += , libtommath-dev$(OOO_NO_FIREBIRD_ARCHS) |
| 1793 |
endif |
| 1794 |
ifneq (,$(filter firebird, $(SYSTEM_STUFF))) |
| 1795 |
# make this versioned. See the comment above and the libfbclient2 .substvars mangling at the end ... |
| 1796 |
BUILD_DEPS_ARCH += , firebird-dev (>= $(FIREBIRD_VERSION))$(OOO_NO_FIREBIRD_ARCHS), firebird-dev (<< $(shell echo "$(FIREBIRD_VERSION) + 1" | bc)~)$(OOO_NO_FIREBIRD_ARCHS) |
| 1797 |
# we need libEngine12.so |
| 1798 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 1799 |
# ... and here we need the version-spcific -server-core anyway. |
| 1800 |
BUILD_DEPS_ARCH += , firebird$(FIREBIRD_VERSION)-server-core $(OOO_NO_FIREBIRD_ARCHS) <!nocheck> |
| 1801 |
endif |
| 1802 |
FIREBIRD_ENGINE_DEPENDS += firebird$(FIREBIRD_VERSION)-server-core |
| 1803 |
endif |
| 1804 |
else |
| 1805 |
CONFIGURE_FLAGS += --disable-firebird-sdbc |
| 1806 |
endif |
| 1807 |
|
| 1808 |
ifeq "$(BUILD_GTK3)" "y" |
| 1809 |
BUILD_DEPS_ARCH += , libgtk-3-dev, libglib2.0-dev, libatk1.0-dev |
| 1810 |
ifneq (cairo,$(findstring cairo,$(SYSTEM_STUFF))) |
| 1811 |
$(error GTK3 build fails without system-cairo!!) |
| 1812 |
endif |
| 1813 |
ifeq (,$(filter epoxy, $(SYSTEM_STUFF))) |
| 1814 |
BUILD_DEPS += , libegl1-mesa-dev |
| 1815 |
endif |
| 1816 |
GNOME_GTK_RECOMMENDS += libreoffice-gtk3 |
| 1817 |
ifeq "$(ENABLE_INTROSPECTION)" "y" |
| 1818 |
BUILD_DEPS_ARCH += , gobject-introspection (>= 1.80) <!nogir> |
| 1819 |
# dh_girepository: warning: Missing Build-Depends: gir1.2-gobject-2.0-dev (ideally with <!nogir>) |
| 1820 |
# dh_girepository: warning: Missing Build-Depends: gir1.2-gdk-3.0-dev (ideally with <!nogir>) |
| 1821 |
# dh_girepository: warning: Missing Build-Depends: gir1.2-gdkpixbuf-2.0-dev (ideally with <!nogir>) |
| 1822 |
# dh_girepository: warning: Missing Build-Depends: gir1.2-gio-2.0-dev (ideally with <!nogir>) |
| 1823 |
# dh_girepository: warning: Missing Build-Depends: gir1.2-gtk-3.0-dev (ideally with <!nogir>) |
| 1824 |
BUILD_DEPS_ARCH += , gir1.2-gobject-2.0-dev <!nogir>, gir1.2-gdk-3.0-dev <!nogir>, gir1.2-gdkpixbuf-2.0-dev <!nogir>, gir1.2-gio-2.0-dev <!nogir>, gir1.2-gtk-3.0-dev <!nogir> |
| 1825 |
CONFIGURE_FLAGS += --enable-introspection |
| 1826 |
else |
| 1827 |
DEBHELPER_OPTIONS+= -Ngir1.2-lokdocview-0.1 |
| 1828 |
endif |
| 1829 |
ifeq "$(ENABLE_ATSPI_TESTS)" "y" |
| 1830 |
# make sure it is enabled; it is auto-enabled if the below is there, though |
| 1831 |
CONFIGURE_FLAGS_TESTS += --enable-atspi-tests |
| 1832 |
BUILD_DEPS_ARCH += , libatspi2.0-dev [$(OOO_CHECK_ARCHS)] <!nocheck>, at-spi2-core [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1833 |
BUILD_DEPS_ARCH += , xvfb [$(OOO_CHECK_ARCHS)] <!nocheck>, xauth [$(OOO_CHECK_ARCHS)] <!nocheck>, dbus-x11 [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 1834 |
else |
| 1835 |
# explicitely disable it if not wanted as t is auto-enabled if the above is there |
| 1836 |
CONFIGURE_FLAGS += --disable-atspi-tests |
| 1837 |
endif |
| 1838 |
else |
| 1839 |
CONFIGURE_FLAGS += --disable-gtk3 |
| 1840 |
endif |
| 1841 |
|
| 1842 |
ifeq "$(BUILD_GTK4)" "y" |
| 1843 |
GTK4_MINVER := (>= 4.10) |
| 1844 |
BUILD_DEPS_ARCH += , libgtk-4-dev $(GTK4_MINVER), libglib2.0-dev, libcairo2-dev |
| 1845 |
CONFIGURE_FLAGS += --enable-gtk4 |
| 1846 |
endif |
| 1847 |
|
| 1848 |
ifeq "$(ENABLE_EVO2)" "n" |
| 1849 |
CONFIGURE_FLAGS += --disable-evolution2 |
| 1850 |
#DEBHELPER_OPTIONS += -Nlibreoffice-evolution |
| 1851 |
else |
| 1852 |
CONFIGURE_FLAGS += --enable-evolution2 |
| 1853 |
BUILD_DEPS_ARCH += , libebook1.2-dev |
| 1854 |
LIBEBOOK_DEP = $(shell debian/scripts/get_libebook_dep.sh) |
| 1855 |
endif |
| 1856 |
|
| 1857 |
ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y" |
| 1858 |
ifneq (,$(filter postgresql, $(SYSTEM_STUFF))) |
| 1859 |
BUILD_DEPS += , libkrb5-dev |
| 1860 |
BUILD_DEPS_ARCH += , libpq-dev |
| 1861 |
else |
| 1862 |
BUILD_DEPS += , libkrb5-dev |
| 1863 |
endif |
| 1864 |
else |
| 1865 |
CONFIGURE_FLAGS += --disable-postgresql-sdbc |
| 1866 |
endif |
| 1867 |
|
| 1868 |
ifeq "$(ENABLE_RANDR)" "y" |
| 1869 |
BUILD_DEPS += , libxrandr-dev |
| 1870 |
else |
| 1871 |
CONFIGURE_FLAGS += --disable-randr |
| 1872 |
endif |
| 1873 |
|
| 1874 |
ifneq "$(ENABLE_PYTHON)" "y" |
| 1875 |
DEBHELPER_OPTIONS+= -Npython3-uno -Nlibreoffice-script-provider-python -Npython3-access2base -Npython3-scriptforge |
| 1876 |
CONFIGURE_FLAGS += --disable-python |
| 1877 |
else |
| 1878 |
PYUNO_DEPENDS = python3-uno |
| 1879 |
CONFIGURE_FLAGS += --enable-python=system |
| 1880 |
endif |
| 1881 |
|
| 1882 |
ifneq "$(PACKAGE_LIBRELOGO)" "y" |
| 1883 |
DEBHELPER_OPTIONS+= -Nlibreoffice-librelogo |
| 1884 |
CONFIGURE_FLAGS += --disable-librelogo |
| 1885 |
endif |
| 1886 |
|
| 1887 |
ifeq "$(ENABLE_JAVA)" "y" |
| 1888 |
ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) |
| 1889 |
#HSQLDB_MINVER= |
| 1890 |
HSQLDB_JAR=/usr/share/java/hsqldb1.8.0.jar |
| 1891 |
BUILD_DEPS += , libhsqldb1.8.0-java $(HSQLDB_MINVER)$(OOO_NO_JAVA_ARCHS) <!nojava>, libarchive-zip-perl$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1892 |
BASE_HSQLDB_DEPENDS = libhsqldb1.8.0-java $(HSQLDB_MINVER) |
| 1893 |
CONFIGURE_FLAGS += --with-hsqldb-jar=$(HSQLDB_JAR) |
| 1894 |
else |
| 1895 |
BUILD_DEPS += , libservlet3.1-java <!nojava> |
| 1896 |
endif |
| 1897 |
ifeq "$(ENABLE_SCRIPT_PROVIDER_BSH)" "y" |
| 1898 |
ifneq (,$(filter beanshell, $(SYSTEM_STUFF))) |
| 1899 |
BUILD_DEPS_INDEP += , libbsh-java <!nojava> |
| 1900 |
endif |
| 1901 |
CONFIGURE_FLAGS_INDEP += --enable-scripting-beanshell |
| 1902 |
else |
| 1903 |
CONFIGURE_FLAGS += --disable-scripting-beanshell |
| 1904 |
DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-bsh |
| 1905 |
endif |
| 1906 |
ifeq "$(ENABLE_SCRIPT_PROVIDER_JS)" "y" |
| 1907 |
ifneq (,$(filter rhino, $(SYSTEM_STUFF))) |
| 1908 |
BUILD_DEPS_INDEP += , librhino-java <!nojava> |
| 1909 |
endif |
| 1910 |
CONFIGURE_FLAGS_INDEP += --enable-scripting-javascript |
| 1911 |
else |
| 1912 |
CONFIGURE_FLAGS += --disable-scripting-javascript |
| 1913 |
DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-js |
| 1914 |
endif |
| 1915 |
ifneq (,$(filter java-websocket, $(SYSTEM_STUFF))) |
| 1916 |
BUILD_DEPS += , libjava-websocket-java$(OOO_NO_JAVA_ARCHS) <!nojava> |
| 1917 |
JAVA_WEBSOCKET_JAR := /usr/share/java/Java-WebSocket.jar |
| 1918 |
CONFIGURE_FLAGS += --with-java-websocket-jar=$(JAVA_WEBSOCKET_JAR) |
| 1919 |
endif |
| 1920 |
endif |
| 1921 |
|
| 1922 |
ifeq ($(ENABLE_LPSOLVE),y) |
| 1923 |
ifneq (,$(filter lpsolve, $(SYSTEM_STUFF))) |
| 1924 |
ifeq "$(USE_SHARED_LPSOLVE)" "y" |
| 1925 |
BUILD_DEPS_ARCH += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION), lp-solve $(LPSOLVE_MIN_VERSION) |
| 1926 |
LPSOLVE_DEP = lp-solve $(LPSOLVE_MIN_VERSION) |
| 1927 |
else |
| 1928 |
BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION) |
| 1929 |
endif |
| 1930 |
endif |
| 1931 |
ifneq (,$(filter colamd, $(SYSTEM_STUFF))) |
| 1932 |
BUILD_DEPS += , libsuitesparse-dev $(SUITESPARSE_MIN_VERSION) |
| 1933 |
endif |
| 1934 |
else |
| 1935 |
CONFIGURE_FLAGS += --disable-lpsolve |
| 1936 |
endif |
| 1937 |
|
| 1938 |
ifeq "$(USE_DBUS)" "y" |
| 1939 |
BUILD_DEPS_ARCH += , libdbus-1-dev |
| 1940 |
ifeq "$(ENABLE_BLUETOOTH)" "y" |
| 1941 |
BUILD_DEPS += , libglib2.0-dev |
| 1942 |
ifneq (,$(filter bluez, $(SYSTEM_STUFF))) |
| 1943 |
BUILD_DEPS += , libbluetooth-dev [linux-any] |
| 1944 |
endif |
| 1945 |
else |
| 1946 |
CONFIGURE_FLAGS += --disable-sdremote-bluetooth |
| 1947 |
endif |
| 1948 |
ifeq "$(ENABLE_PACKAGEKIT)" "y" |
| 1949 |
CONFIGURE_FLAGS += --enable-packagekit |
| 1950 |
endif |
| 1951 |
else |
| 1952 |
CONFIGURE_FLAGS += --disable-dbus |
| 1953 |
endif |
| 1954 |
|
| 1955 |
ifeq "$(ENABLE_AVAHI)" "y" |
| 1956 |
BUILD_DEPS_ARCH += , libavahi-client-dev |
| 1957 |
CONFIGURE_FLAGS += --enable-avahi |
| 1958 |
endif |
| 1959 |
|
| 1960 |
ifeq "$(USE_GSTREAMER)" "y" |
| 1961 |
BUILD_DEPS += , libgstreamer1.0-dev |
| 1962 |
CONFIGURE_FLAGS += --enable-gstreamer-1-0 |
| 1963 |
BUILD_DEPS += , libgstreamer-plugins-base1.0-dev |
| 1964 |
GSTREAMER_PLUGINS_SUGGESTS += , gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-plugins-bad, gstreamer1.0-libav |
| 1965 |
else |
| 1966 |
CONFIGURE_FLAGS += --disable-gstreamer-1-0 |
| 1967 |
endif |
| 1968 |
|
| 1969 |
ifeq "$(ENABLE_WEBDAV)" "y" |
| 1970 |
ifneq (,$(filter curl, $(SYSTEM_STUFF))) |
| 1971 |
BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev |
| 1972 |
endif |
| 1973 |
ENABLE_CURL=y |
| 1974 |
else |
| 1975 |
CONFIGURE_FLAGS += --with-webdav=no |
| 1976 |
endif |
| 1977 |
|
| 1978 |
ENABLE_SAL_OPENSSL_BACKEND=n |
| 1979 |
ifneq "$(ENABLE_SAL_OPENSSL_BACKEND)" "y" |
| 1980 |
ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) |
| 1981 |
ifneq (,$(filter postgresql, $(SYSTEM_STUFF))) |
| 1982 |
CONFIGURE_FLAGS += --disable-openssl |
| 1983 |
endif |
| 1984 |
endif |
| 1985 |
else |
| 1986 |
CONFIGURE_FLAGS += --enable-cipher-openssl-backend |
| 1987 |
SYSTEM_STUFF += openssl |
| 1988 |
BUILD_DEPS += , libssl-dev |
| 1989 |
endif |
| 1990 |
|
| 1991 |
SYSTEM_STUFF += lockfile |
| 1992 |
ifneq (,$(filter lockfile, $(SYSTEM_STUFF))) |
| 1993 |
BUILD_DEPS += , liblockfile-bin |
| 1994 |
endif |
| 1995 |
|
| 1996 |
ifneq (,$(filter frozen, $(SYSTEM_STUFF))) |
| 1997 |
BUILD_DEPS += , libfrozen-dev |
| 1998 |
endif |
| 1999 |
|
| 2000 |
ifneq (,$(filter argon2, $(SYSTEM_STUFF))) |
| 2001 |
BUILD_DEPS += , libargon2-dev |
| 2002 |
endif |
| 2003 |
|
| 2004 |
ifneq (,$(filter zstd, $(SYSTEM_STUFF))) |
| 2005 |
BUILD_DEPS += , libzstd-dev |
| 2006 |
endif |
| 2007 |
|
| 2008 |
ifneq (,$(filter redland, $(SYSTEM_STUFF))) |
| 2009 |
BUILD_DEPS += , librdf0-dev |
| 2010 |
endif |
| 2011 |
|
| 2012 |
ifeq "$(ENABLE_GUI)" "y" |
| 2013 |
ifneq (,$(filter epoxy, $(SYSTEM_STUFF))) |
| 2014 |
BUILD_DEPS += , libepoxy-dev |
| 2015 |
else |
| 2016 |
BUILD_DEPS += , libegl1-mesa-dev |
| 2017 |
endif |
| 2018 |
endif |
| 2019 |
ifneq (,$(filter glm, $(SYSTEM_STUFF))) |
| 2020 |
BUILD_DEPS += , libglm-dev |
| 2021 |
endif |
| 2022 |
|
| 2023 |
ifeq "$(ENABLE_GPGMEPP)" "y" |
| 2024 |
ifneq (,$(filter gpgmepp, $(SYSTEM_STUFF))) |
| 2025 |
BUILD_DEPS_ARCH+= , libgpgmepp-dev, libgpgme-dev, libgpg-error-dev |
| 2026 |
endif |
| 2027 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 2028 |
BUILD_DEPS_ARCH += , gpg [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 2029 |
BUILD_DEPS_ARCH += , gpgconf [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 2030 |
BUILD_DEPS_ARCH += , gpg-agent [$(OOO_CHECK_ARCHS)] <!nocheck> |
| 2031 |
endif |
| 2032 |
else |
| 2033 |
CONFIGURE_FLAGS += --disable-gpgmepp |
| 2034 |
endif |
| 2035 |
|
| 2036 |
ifeq "$(ENABLE_GIO)" "y" |
| 2037 |
ifneq "$(BUILD_GTK3)" "y" |
| 2038 |
BUILD_DEPS_ARCH += , libglib2.0-dev |
| 2039 |
endif |
| 2040 |
else |
| 2041 |
CONFIGURE_FLAGS += --disable-gio |
| 2042 |
endif |
| 2043 |
|
| 2044 |
ifeq "$(ENABLE_DCONF)" "y" |
| 2045 |
BUILD_DEPS += , libdconf-dev (>= 0.40) |
| 2046 |
else |
| 2047 |
CONFIGURE_FLAGS += --disable-dconf |
| 2048 |
endif |
| 2049 |
|
| 2050 |
ifeq ($(ENABLE_MERGELIBS),y) |
| 2051 |
CONFIGURE_FLAGS += --enable-mergelibs |
| 2052 |
endif |
| 2053 |
|
| 2054 |
ifeq ($(ENABLE_LTO),y) |
| 2055 |
CONFIGURE_FLAGS += --enable-lto |
| 2056 |
# see https://lists.debian.org/debian-devel-changes/2021/11/msg02548.html |
| 2057 |
BUILD_DEPS += , binutils (>= 2.37-9) [ppc64] |
| 2058 |
endif |
| 2059 |
|
| 2060 |
LIBERATION_FONT_RECOMMENDS += , fonts-liberation-sans-narrow |
| 2061 |
LIBERATION2_FONT_RECOMMENDS += , fonts-liberation (>= 1:2) |
| 2062 |
LIBERATION_FONTS_RECOMMENDS += $(LIBERATION2_FONT_RECOMMENDS) $(LIBERATION_FONT_RECOMMENDS) |
| 2063 |
|
| 2064 |
# go sure. if we explicitely disable LTO when it is enabled we don't want it to sneak in |
| 2065 |
# (and vice-versa). See https://lists.debian.org/debian-devel/2022/06/msg00092.html |
| 2066 |
ifeq ($(ENABLE_LTO),y) |
| 2067 |
export DEB_BUILD_MAINT_OPTIONS=optimize=+lto |
| 2068 |
# Replacing -flto=auto doesn't work since clang doesn't understand -flto=X (except thin) |
| 2069 |
DEB_CFLAGS_MAINT_STRIP += -flto=auto |
| 2070 |
DEB_CXXFLAGS_MAINT_STRIP += -flto=auto |
| 2071 |
DEB_LDFLAGS_MAINT_STRIP += -flto=auto |
| 2072 |
# save space |
| 2073 |
ifeq "$(SMALL_SYMBOLS)" "y" |
| 2074 |
DEB_CFLAGS_MAINT_STRIP += -ffat-lto-objects |
| 2075 |
DEB_CXXFLAGS_MAINT_STRIP += -ffat-lto-objects |
| 2076 |
DEB_LDFLAGS_MAINT_STRIP += -ffat-lto-objects |
| 2077 |
endif |
| 2078 |
export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP DEB_LDFLAGS_MAINT_STRIP |
| 2079 |
export DEB_CFLAGS_MAINT_APPEND DEB_CXXFLAGS_MAINT_APPEND DEB_LDFLAGS_MAINT_APPEND |
| 2080 |
else |
| 2081 |
export DEB_BUILD_MAINT_OPTIONS=optimize=-lto |
| 2082 |
endif |
| 2083 |
|
| 2084 |
ifeq ($(USE_GOLD),y) |
| 2085 |
CONFIGURE_FLAGS += --enable-ld=gold |
| 2086 |
else |
| 2087 |
# --enable-ld=gold is default for debug builds if found |
| 2088 |
# FIXME: Should we allow gold here nevertheless? configure |
| 2089 |
# prints the following with --disable-ld: |
| 2090 |
# * WARNING : Linker is not capable of creating gdb index, debugger startup will be slow |
| 2091 |
ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
| 2092 |
ifneq "$(ALLOW_GOLD)" "y" |
| 2093 |
CONFIGURE_FLAGS += --disable-ld |
| 2094 |
endif |
| 2095 |
endif |
| 2096 |
endif |
| 2097 |
ifneq (,$(findstring mips,$(DEB_HOST_ARCH))) |
| 2098 |
#10:46 < _rene_> can anyone shed a light on /<<PKGBUILDDIR>>/workdir/LinkTarget/Executable/bestreversemap: error while loading shared libraries: |
| 2099 |
# /<<PKGBUILDDIR>>/instdir/program/libuno_sal.so.3: ELF file ABI version invalid? both were built in the same LO build |
| 2100 |
#10:47 < _rene_> mips64el, apparently since gcc9 or new(er) binutils? |
| 2101 |
#10:47 < _rene_> on an other binary: |
| 2102 |
#10:47 < _rene_> file /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so |
| 2103 |
# /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so: ELF 64-bit LSB shared object, MIPS, MIPS64 rel2 version 1 (SYSV), |
| 2104 |
# dynamically linked, BuildID[sha1]=82f15433db9000b9dfee24ed07e2082ffb439dfd, with debug_info, not stripped |
| 2105 |
#10:47 < _rene_> (eller, mips64el chroot) |
| 2106 |
#[...] |
| 2107 |
#13:49 < aurel32> _rene_: the problem is the ABI version, ie those library have Version ABI: 5 instead of 0 for normal binaries |
| 2108 |
#13:50 < aurel32> the ABI version 5 will be used for gnu hash support in mips |
| 2109 |
#13:51 < aurel32> support has been added to binutils trunk recently, although the default is still sysv hash style |
| 2110 |
#13:51 < aurel32> and glibc support is still being reviewed, it might land in 2.31 |
| 2111 |
#13:51 < aurel32> previous version of libreoffice used -Wl,--hash-style=sysv |
| 2112 |
#13:52 < aurel32> now it seems it autodetect that binutils has gnu hash support and it passes -Wl,--hash-style=gnu |
| 2113 |
#13:52 < aurel32> but there is no support for the full toolchain yet |
| 2114 |
#13:54 < _rene_> so I need to force -Wl,--hash-style=sysv? |
| 2115 |
#13:54 < aurel32> --with-linker-hash-style |
| 2116 |
#13:54 < aurel32> Use linker with --hash-style=<style> when linking |
| 2117 |
#13:54 < aurel32> shared objects. Possible values: "sysv", "gnu", |
| 2118 |
#13:54 < aurel32> "both". The default value is "gnu" if supported on |
| 2119 |
#13:55 < aurel32> the build system, and "sysv" otherwise. |
| 2120 |
#13:55 < aurel32> it looks like that the hash style detection is not perfect |
| 2121 |
#13:55 < aurel32> _rene_: that should work indeed |
| 2122 |
#13:55 < _rene_> ok, thanks |
| 2123 |
#[...] |
| 2124 |
#14:01 < _rene_> aurel32: only mips64el affected or also mipsel? |
| 2125 |
#14:01 < _rene_> (mipsel is still building, though, so I assume it isn't) |
| 2126 |
#14:02 < aurel32> afaiu both should be affected |
| 2127 |
#14:03 < _rene_> ok, so I will make it $(findstring mips |
| 2128 |
#14:04 < aurel32> on mipsel: checking for --hash-style gcc linker support... sysv |
| 2129 |
#14:04 < aurel32> maybe the detection works better, anyway forcing it on both looks safer |
| 2130 |
CONFIGURE_FLAGS += --with-linker-hash-style=sysv |
| 2131 |
endif |
| 2132 |
ifeq "$(USE_MOLD)" "y" |
| 2133 |
CONFIGURE_FLAGS += --enable-ld=mold |
| 2134 |
endif |
| 2135 |
|
| 2136 |
ifeq "$(ENABLE_PCH)" "y" |
| 2137 |
CONFIGURE_FLAGS += --enable-pch |
| 2138 |
endif |
| 2139 |
|
| 2140 |
# Use compiler cache? Include ccache in DEB_BUILD_OPTIONS for much faster rebuild times |
| 2141 |
# A complete build uses about 9G of compiler cache. |
| 2142 |
ifneq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS))) |
| 2143 |
CONFIGURE_FLAGS += --disable-ccache |
| 2144 |
else |
| 2145 |
CONFIGURE_FLAGS += --enable-ccache=nodepend |
| 2146 |
endif |
| 2147 |
|
| 2148 |
## Build n projects in parallel? |
| 2149 |
## DEB_BUILD_OPTIONS=parallel=<n> |
| 2150 |
## if not specified LibreOffices configure tries to find it out itself |
| 2151 |
include /usr/share/dpkg/buildopts.mk |
| 2152 |
NUM_CPUS=$(DEB_BUILD_OPTION_PARALLEL) |
| 2153 |
AVAIL_CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) |
| 2154 |
ifeq "$(PARALLEL_BUILD)" "y" |
| 2155 |
# we need to specify it only if it differs, otherwise configure autodetects |
| 2156 |
# it. |
| 2157 |
ifneq "$(NUM_CPUS)" "$(AVAIL_CPUS)" |
| 2158 |
CONFIGURE_FLAGS += --with-parallelism=$(NUM_CPUS) |
| 2159 |
endif |
| 2160 |
else |
| 2161 |
CONFIGURE_FLAGS += --without-parallelism |
| 2162 |
endif |
| 2163 |
|
| 2164 |
ifeq ($(GCC_VERSION),snapshot) |
| 2165 |
BUILD_PATH = /usr/lib/gcc-snapshot/bin:$$PATH |
| 2166 |
BUILD_LD_LIBRARY_PATH = /usr/lib/gcc-snapshot/lib:$$LD_LIBRARY_PATH |
| 2167 |
BUILD_DEPS += , gcc-snapshot |
| 2168 |
else |
| 2169 |
BUILD_PATH = $(CURDIR)/debian/usr/bin:$$PATH |
| 2170 |
endif |
| 2171 |
BUILD_PATH := $(CURDIR)/debian/usr/bin:$(BUILD_PATH) |
| 2172 |
|
| 2173 |
# Because of the stampdir magic, when you actually want to run a rule |
| 2174 |
# over, you would have to remove the stamp manually. Now, just do |
| 2175 |
# 'debian/rules <target> <target> ... FORCE=1', and the stamp files |
| 2176 |
# that match the given targets will be removed automagically. |
| 2177 |
stampdir_targets+=prepare |
| 2178 |
stampdir_targets+=build build-arch build-indep maintscripts |
| 2179 |
stampdir_targets+=install-common install-arch install-indep langpacks |
| 2180 |
stampdir_targets+=binary-arch binary-indep |
| 2181 |
ifdef FORCE |
| 2182 |
DUMMY:=$(shell rm -f $(patsubst %,$(STAMP_DIR)/%,$(filter $(stampdir_targets),$(MAKECMDGOALS)))) |
| 2183 |
endif |
| 2184 |
|
| 2185 |
# If this is defined, then none of the 'long' commands will be run. Useful |
| 2186 |
# for testing. |
| 2187 |
# test_rules=1 |
| 2188 |
|
| 2189 |
# Since the final stages use up a large amount of diskspace, provide targets to |
| 2190 |
# remove them without needing a full rebuild |
| 2191 |
|
| 2192 |
# Clean up the package directories (about 830M) |
| 2193 |
clean-debdir: |
| 2194 |
dh_testdir |
| 2195 |
# remove generated symlinks / java wrappers |
| 2196 |
rm -rf debian/usr |
| 2197 |
|
| 2198 |
find debian -name "*.links" ! -name "libreoffice-dev-doc.links" \ |
| 2199 |
! -name "libreoffice-java-common.links" \ |
| 2200 |
! -name "liblibreofficekitgtk.links" \ |
| 2201 |
! -name "libreoffice-help-common.links" \ |
| 2202 |
! -name "python3-access2base.links" \ |
| 2203 |
! -name "libreofficekit-dev.links" -exec rm {} \; |
| 2204 |
rm -f debian/libreoffice-l10n-*.ucf |
| 2205 |
if [ -d "$(STAMP_DIR)" ]; then rm -rf "$(STAMP_DIR)"; fi |
| 2206 |
rm -f debian/*.bug-script |
| 2207 |
|
| 2208 |
rm -f debian/libuno-sal3t64.symbols debian/libuno-salhelpergcc3-3t64.symbols |
| 2209 |
rm -f debian/shlibs.local |
| 2210 |
|
| 2211 |
rm -f debian/libreoffice-help-*.lintian-overrides |
| 2212 |
rm -f debian/*.install debian/*.dirs debian/*.changelog |
| 2213 |
rm -f debian/*.postinst debian/*.postrm debian/*.preinst debian/*.prerm debian/*.triggers debian/*.config |
| 2214 |
rm -f debian/pom*.xml |
| 2215 |
|
| 2216 |
rm -rf $(CURDIR)/debian/locales |
| 2217 |
|
| 2218 |
ifeq "$(ENABLE_RUST)" "y" |
| 2219 |
rm -rf debian/cargo_home |
| 2220 |
rm -rf debian/cargo_registry |
| 2221 |
endif |
| 2222 |
|
| 2223 |
ifneq "$(PYTHON_VERSION)" "default" |
| 2224 |
rm -f bin/$(PYTHON) |
| 2225 |
endif |
| 2226 |
|
| 2227 |
dh_clean |
| 2228 |
|
| 2229 |
clean: |
| 2230 |
dh_testdir |
| 2231 |
|
| 2232 |
if [ -f config.status ]; then \ |
| 2233 |
$(MAKE) distclean; \ |
| 2234 |
rm -f config.status; \ |
| 2235 |
fi |
| 2236 |
rm -rf instdir-nogui |
| 2237 |
find $(SOURCE_TREE) -name "*.pyc" -exec rm {} \; |
| 2238 |
rm -rf */*.pro.obsolete |
| 2239 |
|
| 2240 |
rm -rf $(SOURCE_TREE)/file-lists |
| 2241 |
rm -rf $(SOURCE_TREE)/pyuno-for* |
| 2242 |
rm -f autogen.lastrun |
| 2243 |
rm -f build_error.log |
| 2244 |
rm -f config/config_version.h |
| 2245 |
|
| 2246 |
ifeq "$(HELPISOS)" "" |
| 2247 |
rm -rf images* |
| 2248 |
endif |
| 2249 |
|
| 2250 |
rm -f download.list |
| 2251 |
|
| 2252 |
# obsolete lock file not cleaned up.... |
| 2253 |
rm -f dbaccess/qa/extras/testdocuments/fdo84315.odb.lck |
| 2254 |
|
| 2255 |
cd $(SOURCE_TREE)/helpcontent2/help3xsl && \ |
| 2256 |
rm -f normalize.css |
| 2257 |
cd $(SOURCE_TREE)/helpcontent2/help3xsl && \ |
| 2258 |
rm -f prism.js && \ |
| 2259 |
rm -f prism.css |
| 2260 |
|
| 2261 |
ifeq "$(ENABLE_RUST)" "y" |
| 2262 |
ifeq "$(ENABLE_YRS)" "y" |
| 2263 |
ifneq (,$(filter yrs, $(SYSTEM_STUFF))) |
| 2264 |
rm -f $(CURDIR)/include/libyrs.h |
| 2265 |
endif |
| 2266 |
endif |
| 2267 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 2268 |
rm -rf rust_uno/target |
| 2269 |
rm -rf rust_uno/src/generated |
| 2270 |
rm -f rust_uno/Cargo.lock |
| 2271 |
endif |
| 2272 |
endif |
| 2273 |
|
| 2274 |
# remove only if we linked it over. otherwise we remove the one |
| 2275 |
# intentionally added there if so |
| 2276 |
cd $(SOURCE_TREE)/tarballs && \ |
| 2277 |
if [ -L f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf ]; then \ |
| 2278 |
rm f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf; \ |
| 2279 |
fi |
| 2280 |
|
| 2281 |
# Files created in debian directory |
| 2282 |
$(MAKE) -f debian/rules clean-debdir |
| 2283 |
|
| 2284 |
#$(MAKE) -f debian/rules control |
| 2285 |
|
| 2286 |
|
| 2287 |
# Generate control files, because we have so many different languages |
| 2288 |
# and need to run autopkgtests based on Architectures |
| 2289 |
control: debian/control.new debian/tests/control.new |
| 2290 |
|
| 2291 |
# Based on script by Martin Quinson <[email protected]> |
| 2292 |
debian/control.new: $(wildcard debian/control*in) $(SOURCE_TREE)/bin/lo-xlate-lang debian/rules |
| 2293 |
echo "#" > debian/control.new |
| 2294 |
echo "# NOTE: This file is autogenerated. DO NOT manually edit it! " >> debian/control.new |
| 2295 |
echo "# Edit debian/control*in and rules (whatever applicable), run debian/rules control" >> debian/control.new |
| 2296 |
echo "# and move control.new to control if the difference is sane." >> debian/control.new |
| 2297 |
echo "#" >> debian/control.new |
| 2298 |
chmod 755 $(SOURCE_TREE)/bin/lo-xlate-lang |
| 2299 |
sed -e "s#%$(DEB_VENDOR)=\([^%]*\)%#, \1#g#" \ |
| 2300 |
-e "s#%[A-Za-z]*=[^%]*%##g#" \ |
| 2301 |
-e "s#%BUILD_DEPS_ARCH%#$(strip $(BUILD_DEPS_ARCH))#g" \ |
| 2302 |
-e "s#%BUILD_DEPS_INDEP%#$(strip $(BUILD_DEPS_INDEP))#g" \ |
| 2303 |
-e "s#@BUGS@#$(BUGS)#g" \ |
| 2304 |
< debian/control.in >> debian/control.new |
| 2305 |
|
| 2306 |
for LNUM in $(filter-out en-US,$(LANGPACKISOS)) ; do \ |
| 2307 |
LNAME=`$(SOURCE_TREE)/bin/lo-xlate-lang -l $$LNUM | perl -e 'print ucfirst(<STDIN>);'`; \ |
| 2308 |
LCODE=`$(SOURCE_TREE)/bin/lo-xlate-lang -i $$LNUM | tr A-Z a-z`; \ |
| 2309 |
[ "$$LNUM" = bn-IN ] && continue; \ |
| 2310 |
[ "$$LNUM" = ca-valencia ] && continue; \ |
| 2311 |
[ "$$LNUM" = sr-Latn ] && continue; \ |
| 2312 |
[ "$$LCODE" = kmr-latn ] && LCODE=kmr; \ |
| 2313 |
CCODE=`echo $$LCODE | sed 's/-.*//'`; \ |
| 2314 |
case "$$LCODE" in \ |
| 2315 |
bn) \ |
| 2316 |
FONT_RECOMMENDS=", fonts-beng"; \ |
| 2317 |
;; \ |
| 2318 |
gu) \ |
| 2319 |
FONT_RECOMMENDS=", fonts-gujr"; \ |
| 2320 |
;; \ |
| 2321 |
pa-in) \ |
| 2322 |
FONT_RECOMMENDS=", fonts-guru"; \ |
| 2323 |
;; \ |
| 2324 |
ml) \ |
| 2325 |
FONT_RECOMMENDS=", fonts-mlym"; \ |
| 2326 |
;; \ |
| 2327 |
or) \ |
| 2328 |
FONT_RECOMMENDS=", fonts-orya"; \ |
| 2329 |
;; \ |
| 2330 |
te) \ |
| 2331 |
FONT_RECOMMENDS=", fonts-telu"; \ |
| 2332 |
;; \ |
| 2333 |
ta) \ |
| 2334 |
FONT_RECOMMENDS=", fonts-taml"; \ |
| 2335 |
;; \ |
| 2336 |
hi-in|ne|mr) \ |
| 2337 |
FONT_RECOMMENDS=", fonts-deva"; \ |
| 2338 |
;; \ |
| 2339 |
he) \ |
| 2340 |
FONT_RECOMMENDS=", culmus"; \ |
| 2341 |
;; \ |
| 2342 |
km) \ |
| 2343 |
FONT_RECOMMENDS=", fonts-khmeros"; \ |
| 2344 |
;; \ |
| 2345 |
ar) \ |
| 2346 |
FONT_RECOMMENDS=", fonts-hosny-amiri, fonts-sil-scheherazade, fonts-hosny-thabit"; \ |
| 2347 |
;; \ |
| 2348 |
fa) \ |
| 2349 |
FONT_RECOMMENDS=", fonts-farsiweb"; \ |
| 2350 |
;; \ |
| 2351 |
dz) \ |
| 2352 |
FONT_RECOMMENDS=", fonts-dzongkha"; \ |
| 2353 |
;; \ |
| 2354 |
th) \ |
| 2355 |
FONT_RECOMMENDS=", fonts-thai-tlwg"; \ |
| 2356 |
;; \ |
| 2357 |
*) \ |
| 2358 |
FONT_RECOMMENDS= ;; \ |
| 2359 |
esac; \ |
| 2360 |
LOCALES_DEPENDS="locales | locales-all"; \ |
| 2361 |
sed -e "s|@LNAME@|$$LNAME|g" -e "s|@LCODE@|$$LCODE|g" \ |
| 2362 |
-e "s|@CCODE@|$$CCODE|g" \ |
| 2363 |
-e "s|@FONT_RECOMMENDS@|$$FONT_RECOMMENDS|g" \ |
| 2364 |
-e "s:@LOCALES_DEPENDS@:$$LOCALES_DEPENDS:g" \ |
| 2365 |
-e "s|@LDAP_LIB@|$(LDAP_LIB)|g" \ |
| 2366 |
>> debian/control.new < debian/control.lang.in; \ |
| 2367 |
done |
| 2368 |
|
| 2369 |
ifneq "$(ENABLE_HELP)" "n" |
| 2370 |
for LNUM in $(HELPISOS) ; do \ |
| 2371 |
LNAME=`$(SOURCE_TREE)/bin/lo-xlate-lang -l $$LNUM | perl -e 'print ucfirst(<STDIN>);'`; \ |
| 2372 |
LCODE=`$(SOURCE_TREE)/bin/lo-xlate-lang -i $$LNUM | tr A-Z a-z`; \ |
| 2373 |
[ "$$LNUM" = ca-valencia ] && continue; \ |
| 2374 |
CCODE=`echo $$LCODE | sed 's/-.*//'`; \ |
| 2375 |
sed -e "s|@LNAME@|$$LNAME|g" -e "s|@LCODE@|$$LCODE|g" \ |
| 2376 |
-e "s|@CCODE@|$$CCODE|g" \ |
| 2377 |
>> debian/control.new < debian/control.help.in; \ |
| 2378 |
done |
| 2379 |
# en_US is in -common |
| 2380 |
perl -pi -e 's|(Depends: libreoffice-writer \| language-support-translations-en), libreoffice-l10n-en-us|\1|' \ |
| 2381 |
debian/control.new |
| 2382 |
perl -pi -e 's|(Depends: libreoffice-writer, libreoffice-l10n-en-us)|\1, fonts-deva|' \ |
| 2383 |
debian/control.new |
| 2384 |
endif |
| 2385 |
cat debian/control.ure.in >> debian/control.new |
| 2386 |
ifeq "$(ENABLE_JAVA)" "y" |
| 2387 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 2388 |
cat debian/control.mediawiki.in >> debian/control.new |
| 2389 |
endif |
| 2390 |
ifeq "$(ENABLE_REPORTBUILDER)" "y" |
| 2391 |
cat debian/control.reportbuilder.in >> debian/control.new |
| 2392 |
endif |
| 2393 |
ifeq "$(ENABLE_NLPSOLVER)" "y" |
| 2394 |
cat debian/control.nlpsolver.in >> debian/control.new |
| 2395 |
endif |
| 2396 |
endif |
| 2397 |
cat debian/control.fonts.in >> debian/control.new |
| 2398 |
ifeq "$(PACKAGE_SDK)" "y" |
| 2399 |
cat debian/control.sdk.in >> debian/control.new |
| 2400 |
endif |
| 2401 |
ifeq "$(PACKAGE_LOKIT)" "y" |
| 2402 |
cat debian/control.lokit.in >> debian/control.new |
| 2403 |
endif |
| 2404 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 2405 |
cat debian/control.rust.in >> debian/control.new |
| 2406 |
endif |
| 2407 |
ifeq "$(BUILD_GTK3)" "y" |
| 2408 |
cat debian/control.gtk3.in >> debian/control.new |
| 2409 |
ifneq "$(ENABLE_INTROSPECTION)" "y" |
| 2410 |
sed -i "s/ and for developing stuff using introspection.//" debian/control.new |
| 2411 |
endif |
| 2412 |
endif |
| 2413 |
ifeq "$(BUILD_GTK4)" "y" |
| 2414 |
cat debian/control.gtk4.in >> debian/control.new |
| 2415 |
endif |
| 2416 |
ifeq "$(ENABLE_KF5)" "y" |
| 2417 |
cat debian/control.kf5.in >> debian/control.new |
| 2418 |
perl -pi -e 's/plasma-iconset-dep}/plasma-iconset-dep}, kio (>> 5.115.0-5)/' debian/control.new |
| 2419 |
endif |
| 2420 |
ifeq "$(ENABLE_KF6)" "y" |
| 2421 |
cat debian/control.kf6.in >> debian/control.new |
| 2422 |
endif |
| 2423 |
ifeq "$(ENABLE_QT5)" "y" |
| 2424 |
cat debian/control.qt5.in >> debian/control.new |
| 2425 |
endif |
| 2426 |
ifeq "$(ENABLE_QT6)" "y" |
| 2427 |
cat debian/control.qt6.in >> debian/control.new |
| 2428 |
endif |
| 2429 |
ifeq "$(BUILD_PLASMA)" "y" |
| 2430 |
sed -e "s|@PLASMA_VERSION@|$(PLASMA_VERSION)|g" \ |
| 2431 |
-e "s|@PLASMA_KF_VERSION@|$(PLASMA_KF_VERSION)|g" \ |
| 2432 |
-e "s|@PLASMA_ARCHITECTURE@|$(PLASMA_ARCHITECTURE)|g" \ |
| 2433 |
>> debian/control.new < debian/control.plasma.in |
| 2434 |
ifeq "$(PLASMA_VERSION)" "6" |
| 2435 |
# no kf6be here |
| 2436 |
sed -i "s/and a KDE\/KF$(PLASMA_KF_VERSION) configuration backend//" \ |
| 2437 |
debian/control.new |
| 2438 |
endif |
| 2439 |
endif |
| 2440 |
ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y" |
| 2441 |
cat debian/control.postgresql.in >> debian/control.new |
| 2442 |
endif |
| 2443 |
ifeq "$(ENABLE_EVO2)" "y" |
| 2444 |
cat debian/control.evolution.in >> debian/control.new |
| 2445 |
endif |
| 2446 |
cat debian/control.test-packages.in >> debian/control.new |
| 2447 |
ifeq "$(PACKAGE_LIBRELOGO)" "y" |
| 2448 |
cat debian/control.librelogo.in >> debian/control.new |
| 2449 |
endif |
| 2450 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 2451 |
cat debian/control.firebird.in >> debian/control.new |
| 2452 |
endif |
| 2453 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 2454 |
cat debian/control.cil.in >> debian/control.new |
| 2455 |
endif |
| 2456 |
|
| 2457 |
perl -pi -e "s,%OOO_ARCHS%,$(OOO_ARCHS),g" debian/control.new |
| 2458 |
perl -pi -e "s,%OOO_NOGUI_ARCHS%,$(OOO_NOGUI_ARCHS),g" debian/control.new |
| 2459 |
perl -pi -e "s,%OOO_64BIT_ARCHS%,$(OOO_64BIT_ARCHS),g" debian/control.new |
| 2460 |
perl -pi -e "s,%OOO_BE_ARCHS%,$(OOO_BE_ARCHS),g" debian/control.new |
| 2461 |
perl -pi -e "s,%OOO_LE_ARCHS%,$(OOO_LE_ARCHS),g" debian/control.new |
| 2462 |
perl -pi -e "s,%OOO_BASE_ARCHS%,$(OOO_BASE_ARCHS),g" debian/control.new |
| 2463 |
perl -pi -e "s,%OOO_NO_BASE_ARCHS%,$(OOO_NO_BASE_ARCHS),"g debian/control.new |
| 2464 |
perl -pi -e "s,%OOO_JAVA_ARCHS%,$(OOO_JAVA_ARCHS),g" debian/control.new |
| 2465 |
perl -pi -e "s,%OOO_CLI_ARCHS%,$(OOO_CLI_ARCHS),g" debian/control.new |
| 2466 |
perl -pi -e "s,%OOO_RUST_UNO_ARCHS%,$(OOO_RUST_UNO_ARCHS),g" debian/control.new |
| 2467 |
perl -pi -e "s,%OOO_ARCH_DEP_EXTENSIONS_ARCHS%,$(OOO_ARCH_DEP_EXTENSIONS_ARCHS),g" debian/control.new |
| 2468 |
perl -pi -e "s,%OOO_REPORTBUILDER_ARCHS%,$(OOO_REPORTBUILDER_ARCHS),g" debian/control.new |
| 2469 |
perl -pi -e "s,%OOO_NO_REPORTBUILDER_ARCHS%,$(OOO_NO_REPORTBUILDER_ARCHS),g" debian/control.new |
| 2470 |
perl -pi -e "s,%OOO_FIREBIRD_ARCHS%,$(OOO_FIREBIRD_ARCHS),g" debian/control.new |
| 2471 |
perl -pi -e "s,%OOO_NO_FIREBIRD_ARCHS%,$(OOO_NO_FIREBIRD_ARCHS),g" debian/control.new |
| 2472 |
perl -pi -e "s#%BUILD_DEPS%#$(strip $(BUILD_DEPS))#g" debian/control.new |
| 2473 |
perl -pi -e "s#%JUNIT_MIN_VER%#$(JUNIT_MIN_VER)#g" debian/control.new |
| 2474 |
ifeq "$(BUILD_PLASMA)" "y" |
| 2475 |
perl -pi -e 's/%LO-DESKTOP-INTEGRATION%/libreoffice-gnome | libreoffice-plasma/' debian/control.new |
| 2476 |
else |
| 2477 |
perl -pi -e 's/%LO-DESKTOP-INTEGRATION%/libreoffice-gnome/' debian/control.new |
| 2478 |
endif |
| 2479 |
|
| 2480 |
ifeq (sk,$(findstring sk,$(HELPISOS))) |
| 2481 |
perl -pi -e 's/(Depends:.*)libreoffice-l10n-sk(.*)$$/\1libreoffice-l10n-sk, libreoffice-help-cs\2/' debian/control.new |
| 2482 |
endif |
| 2483 |
ifeq (pt-BR,$(findstring pt-BR,$(LANGPACKISOS))) |
| 2484 |
perl -pi -e 's/libreoffice2-l10n-pt-br$$/libreoffice2-l10n-pt-br, broffice/' debian/control.new |
| 2485 |
perl -pi -e 's/libreoffice2-l10n-pt-br$$/libreoffice2-l10n-pt-br, broffice/' debian/control.new |
| 2486 |
perl -pi -e 's/libreoffice2-l10n-pt-br$$/libreoffice2-l10n-pt-br, broffice/' debian/control.new |
| 2487 |
endif |
| 2488 |
|
| 2489 |
ifeq "$(MYSQL_FLAVOUR)" "mysql" |
| 2490 |
perl -pi -e "s/(Build-Conflicts: .*)/\1,libmariadbclient-dev,/" debian/control.new |
| 2491 |
endif |
| 2492 |
|
| 2493 |
ifneq "$(ALLOW_CLANG)" "y" |
| 2494 |
perl -pi -e "s/(Build-Conflicts: .*)/\1,clang,/" debian/control.new |
| 2495 |
else |
| 2496 |
perl -pi -e "s/(Build-Conflicts: .*)/\1,clang [$(filter-out $(OOO_CLANG_SUPPORTED_ARCHS),$(OOO_ARCHS))],/" debian/control.new |
| 2497 |
endif |
| 2498 |
|
| 2499 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 2500 |
# see #1103016. gpg-from-sq Provides: gpg (= 2.2.46) |
| 2501 |
perl -pi -e "s/(Build-Conflicts: .*)/\1,gpg-from-sq [$(OOO_CHECK_ARCHS)] <!nocheck>,/" debian/control.new |
| 2502 |
endif |
| 2503 |
|
| 2504 |
$(PYTHON) debian/scripts/joinctrl.py < debian/control.new > debian/control.tmp |
| 2505 |
mv debian/control.tmp debian/control.new |
| 2506 |
|
| 2507 |
ifeq "$(USE_DBUS)" "y" |
| 2508 |
ifeq "$(ENABLE_BLUETOOTH)" "y" |
| 2509 |
perl -pi -e 's/paperconf$$/paperconf\n * bluez: Bluetooth support for Impress (slideshow remote control)/' debian/control.new |
| 2510 |
endif |
| 2511 |
perl -pi -e 's/Description: office productivity suite -- presentation/Suggests: bluez\nDescription: office productivity suite -- presentation/' debian/control.new |
| 2512 |
endif |
| 2513 |
|
| 2514 |
ifneq "$(DICT_DIR)" "/usr/share/hunspell" |
| 2515 |
perl -pi -e 's/^Breaks:.*myspell.*\n//' debian/control.new |
| 2516 |
endif |
| 2517 |
|
| 2518 |
ifeq "$(ENABLE_APPARMOR_PROFILES)" "y" |
| 2519 |
perl -pi -e 's/ttf-mscorefonts-installer/ttf-mscorefonts-installer, apparmor/' debian/control.new |
| 2520 |
endif |
| 2521 |
|
| 2522 |
ifneq "$(TRIXIE_BACKPORT)" "y" |
| 2523 |
ifneq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 2524 |
perl -pi -e 's/Package: libreoffice-calc$$/Package: libreoffice-calc\nRecommends: liborcus-0.21-0 (>= 0.21.0-5) [amd64 arm64 loong64 ppc64el riscv64]/' debian/control.new |
| 2525 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 2526 |
perl -pi -e 's/Package: libreoffice-calc-nogui$$/Package: libreoffice-calc-nogui\nRecommends: liborcus-0.21-0 (>= 0.21.0-5) [amd64 arm64 loong64 ppc64el riscv64]/' debian/control.new |
| 2527 |
endif |
| 2528 |
endif |
| 2529 |
endif |
| 2530 |
|
| 2531 |
diff -u debian/control debian/control.new && rm -f debian/control.new || (\ |
| 2532 |
echo "Generated control file differs! Check the result!"; \ |
| 2533 |
echo "Note: Edit control*.in and rules instead of control!"; \ |
| 2534 |
echo "If the difference is correct move control.new to control"; \ |
| 2535 |
exit 1) |
| 2536 |
|
| 2537 |
#.DELETE_ON_ERROR: debian/control.new |
| 2538 |
|
| 2539 |
debian/tests/control.new: debian/tests/control.in debian/rules |
| 2540 |
echo "#" > debian/tests/control.new |
| 2541 |
echo "# NOTE: This file is autogenerated. DO NOT manually edit it! " >> debian/tests/control.new |
| 2542 |
echo "# Edit debian/tests/control*in and rules (whatever applicable), run debian/rules control" >> debian/tests/control.new |
| 2543 |
echo "# and move control.new to control if the difference is sane." >> debian/tests/control.new |
| 2544 |
echo "#" >> debian/tests/control.new |
| 2545 |
sed -e "s|%OOO_JAVA_ARCHS%|$(OOO_JAVA_ARCHS)|g" \ |
| 2546 |
-e "s,%OOO_NOJAVA_ARCHS%,$(filter-out $(OOO_JAVA_ARCHS),$(OOO_ARCHS)),g" \ |
| 2547 |
-e "s|%OOO_JUNIT_ARCHS%|$(OOO_JUNIT_ARCHS)|g" \ |
| 2548 |
-e "s|%OOO_CHECK_FATAL_ARCHS%|$(OOO_CHECK_FATAL_ARCHS)|g" \ |
| 2549 |
-e "s|%OOO_AUTOPKGTEST_ARCHS%|$(OOO_AUTOPKGTEST_ARCHS)|g" \ |
| 2550 |
-e "s|%AUTOPKGTEST_CPPUNIT_PACKAGES%|$(shell echo $(AUTOPKGTEST_CPPUNIT_PACKAGES) | sed -e "s/\ /,/g")|g" \ |
| 2551 |
>> debian/tests/control.new < debian/tests/control.in |
| 2552 |
# otherwise Architecture: is empty (and empty means "any" in autopgktest, |
| 2553 |
# cf. https://salsa.debian.org/ci-team/autopkgtest/-/blob/master/lib/testdesc.py#L546) |
| 2554 |
ifneq (,$(OOO_JUNIT_ARCHS)) |
| 2555 |
sed -e "s|%OOO_JUNIT_ARCHS%|$(OOO_JUNIT_ARCHS)|g" \ |
| 2556 |
>> debian/tests/control.new < debian/tests/control.junit.in |
| 2557 |
endif |
| 2558 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 2559 |
sed -e "s|%OOO_RUST_UNO_ARCHS%|$(OOO_RUST_UNO_ARCHS)|g" \ |
| 2560 |
>> debian/tests/control.new < debian/tests/control.rust.in |
| 2561 |
endif |
| 2562 |
# make sure it's the last one |
| 2563 |
ifeq (y,$(ENABLE_MARIADB)) |
| 2564 |
cat debian/tests/control.mysql.in >> debian/tests/control.new |
| 2565 |
endif |
| 2566 |
ifneq (,$(findstring riscv64,$(OOO_AUTOPKGTEST_ARCHS))) |
| 2567 |
# don't even try Calc tests on riscv64 |
| 2568 |
perl -pi -e 's/Tests: uicheck-sd/Tests: uicheck-sd\nArchitecture: !riscv64/' debian/tests/control.new |
| 2569 |
sed -i "`grep -n -A1 uicheck-sc debian/tests/control | tail -n 1 | cut -d- -f1`s/riscv64 //" debian/tests/control.new |
| 2570 |
sed -i "`grep -n -A1 uicheck-sw debian/tests/control | tail -n 1 | cut -d- -f1`s/riscv64 //" debian/tests/control.new |
| 2571 |
#perl -pi -e 's/Tests: uicheck-uitest/Tests: uicheck-uitest\nArchitecture: !riscv64/' debian/tests/control.new |
| 2572 |
# slow |
| 2573 |
sed -i "`grep -n -A1 odk-build-examples debian/tests/control | head -n 2 | tail -n 1 | cut -d- -f1`s/riscv64 //" debian/tests/control.new |
| 2574 |
sed -i "`grep -n -A1 odk-build-examples debian/tests/control | tail -n 1 | cut -d- -f1`s/riscv64 //" debian/tests/control.new |
| 2575 |
endif |
| 2576 |
|
| 2577 |
diff -u debian/tests/control debian/tests/control.new && rm -f debian/tests/control.new || (\ |
| 2578 |
echo "Generated control file differs! Check the result!"; \ |
| 2579 |
echo "Note: Edit tests/control*.in and rules instead of control!"; \ |
| 2580 |
echo "If the difference is correct move control.new to control"; \ |
| 2581 |
exit 1) |
| 2582 |
|
| 2583 |
#.DELETE_ON_ERROR: debian/tests/control.new |
| 2584 |
|
| 2585 |
# All 'important' targets have 2 lines. The one that is run by |
| 2586 |
# dpkg-buildpackage or the user, and the one that does the actual work. This |
| 2587 |
# indirection is needed so that the 'stamp' files that signify when a rule is |
| 2588 |
# done can be located in a separate 'stampdir'. Recall that make has no way to |
| 2589 |
# know when a goal has been met for a phony target (like "build" or "install"). |
| 2590 |
# |
| 2591 |
# At the end of each stampdir target, be sure to run the command 'touch $@' |
| 2592 |
# so that the target will not be run again. Removing the file will make |
| 2593 |
# make run the target over. |
| 2594 |
|
| 2595 |
prepare: $(STAMP_DIR)/prepare |
| 2596 |
$(STAMP_DIR)/prepare: |
| 2597 |
dh_testdir |
| 2598 |
|
| 2599 |
# Make sure needed scripts are executable |
| 2600 |
set -e;\ |
| 2601 |
for FILE in debian/scripts/move-if-change \ |
| 2602 |
debian/scripts/get_libebook_dep.sh \ |
| 2603 |
debian/scripts/locale-gen \ |
| 2604 |
autogen.sh; \ |
| 2605 |
do \ |
| 2606 |
chmod 755 $$FILE ;\ |
| 2607 |
done |
| 2608 |
|
| 2609 |
mkdir -p $(STAMP_DIR) |
| 2610 |
|
| 2611 |
# Make sure we have /proc mounted. |
| 2612 |
# Otherwise configure will fail since java -version fails without /proc... |
| 2613 |
test -r /proc/version |
| 2614 |
|
| 2615 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 2616 |
ifeq (terse,$(findstring terse,$(DEB_BUILD_OPTIONS))) |
| 2617 |
if [ -d .pc/do-not-hide-test-output.diff ]; then \ |
| 2618 |
patch -p1 -R < debian/patches/do-not-hide-test-output.diff; \ |
| 2619 |
TMP=`mktemp -q`; grep -v do-not-hide-test-output .pc/applied-patches \ |
| 2620 |
> $$TMP && mv $$TMP .pc/applied-patches; \ |
| 2621 |
rm -rf .pc/do-not-hide-test-output.diff; \ |
| 2622 |
fi |
| 2623 |
endif |
| 2624 |
endif |
| 2625 |
|
| 2626 |
ifeq "$(ENABLE_PCH)" "y" |
| 2627 |
# regen PCHs to go sure... |
| 2628 |
bin/update_pch.sh |
| 2629 |
endif |
| 2630 |
|
| 2631 |
cd $(SOURCE_TREE)/helpcontent2/help3xsl && \ |
| 2632 |
ln -sf /usr/share/javascript/normalize.css/normalize.css |
| 2633 |
cd $(SOURCE_TREE)/helpcontent2/help3xsl && \ |
| 2634 |
ln -sf /usr/share/nodejs/prismjs/prism.js && \ |
| 2635 |
ln -sf /usr/share/nodejs/prismjs/themes/prism-coy.css prism.css |
| 2636 |
|
| 2637 |
ifeq ($(filter pkg.libreoffice.opensymbolbuild,$(DEB_BUILD_PROFILES)),) |
| 2638 |
# link to already-rebuilt opens___.ttf (fonts-opensymbol) form the arch indep build. |
| 2639 |
# Thankfully the sha256sum is only checked in Makefile.fetch (which we don't do) |
| 2640 |
cd $(SOURCE_TREE)/tarballs && \ |
| 2641 |
ln -sf /usr/share/fonts/truetype/libreoffice/opens___.ttf \ |
| 2642 |
f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf |
| 2643 |
endif |
| 2644 |
|
| 2645 |
ifeq "$(ENABLE_RUST)" "y" |
| 2646 |
ifeq ($(filter upstream-cargo,$(DEB_BUILD_PROFILES)),) |
| 2647 |
# 20:26 < f_g> debcargo is only really for translating a single crate's Cargo.toml in debian/ . if all you want to do is call cargo to build Rust code in a |
| 2648 |
# Debian context, than the cargo wrapper (/usr/share/cargo/bin/cargo) is probably what you want. it requires a bit of setup and then a call to its |
| 2649 |
# prepare-debian in dh_auto_configure, after that all cargo invocations going through it should DTRT |
| 2650 |
# $(CARGO) prepare-debian debian/cargo_registry without --link-from-system fails if the dir isn't there |
| 2651 |
if [ ! -d debian/cargo_registry ]; then mkdir -p debian/cargo_registry; fi |
| 2652 |
# use fake DEB_CARGO_CRATE and adapt later... |
| 2653 |
DEB_CARGO_CRATE=libreoffice_$(DEB_VERSION_UPSTREAM) $(CARGO) prepare-debian debian/cargo_registry $(CARGO_PREPARE_DEBIAN_FLAGS) |
| 2654 |
ifeq "$(ENABLE_YRS)" "y" |
| 2655 |
ifneq (,$(filter yrs, $(SYSTEM_STUFF))) |
| 2656 |
# Copy over since cargo wants to write inside there which it of course can't if it's in /usr/share |
| 2657 |
rm -rf debian/cargo_registry/yffi-* |
| 2658 |
cd debian/cargo_registry && \ |
| 2659 |
cp -r /usr/share/cargo/registry/yffi-* . |
| 2660 |
# create version-agnostic dir so we don't need to update all the places where this is referenced |
| 2661 |
# here (and system-crates.diff) if the version changes... |
| 2662 |
cd debian/cargo_registry && \ |
| 2663 |
ln -s yffi-* yffi |
| 2664 |
endif |
| 2665 |
endif |
| 2666 |
else |
| 2667 |
patch -p1 -R < $(SRCDIR)/debian/patches/fix-rust_uno-path-for-cargo-wrapper.diff |
| 2668 |
if [ -d .pc/fix-rust_uno-path-for-cargo-wrapper.diff ]; then \ |
| 2669 |
patch -p1 -R < debian/patches/fix-rust_uno-path-for-cargo-wrapper.diff; \ |
| 2670 |
TMP=`mktemp -q`; grep -v fix-rust_uno-path-for-cargo-wrapper .pc/applied-patches \ |
| 2671 |
> $$TMP && mv $$TMP .pc/applied-patches; \ |
| 2672 |
rm -rf .pc/fix-rust_uno-path-for-cargo-wrapper.diff; \ |
| 2673 |
fi |
| 2674 |
endif |
| 2675 |
endif |
| 2676 |
|
| 2677 |
touch $@ |
| 2678 |
|
| 2679 |
.PHONY: config_host.mk |
| 2680 |
config_host.mk: |
| 2681 |
rm -f config.status autogen.lastrun |
| 2682 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) \ |
| 2683 |
CLANGDIR=$(CLANGDIR) \ |
| 2684 |
MARIADBCONFIG=$(MARIADBCONFIG) \ |
| 2685 |
FIREBIRD_CFLAGS=$(FIREBIRD_CFLAGS) FIREBIRD_LIBS=$(FIREBIRD_LIBS) \ |
| 2686 |
TX=/usr/libexec/afdko/tx MAKEOTF=/usr/libexec/afdko/makeotfexe MERGEFONTS=/usr/libexec/afdko/mergefonts \ |
| 2687 |
./autogen.sh $(CONFIGURE_FLAGS) |
| 2688 |
|
| 2689 |
build: $(STAMP_DIR)/prepare $(STAMP_DIR)/build-arch $(STAMP_DIR)/build-indep |
| 2690 |
touch $(STAMP_DIR)/$@ |
| 2691 |
|
| 2692 |
build-arch: $(STAMP_DIR)/prepare $(STAMP_DIR)/build-arch |
| 2693 |
$(STAMP_DIR)/build-arch: |
| 2694 |
#build-arch: ENABLE_HELP = n PACKAGE_SDK_DOCS = n ENABLE_MEDIAWIKI = n ENABLE_SCRIPT_PROVIDER_BSH = n ENABLE_SCRIPT_PROVIDER_JS = n |
| 2695 |
dh_testdir |
| 2696 |
|
| 2697 |
ifeq "$(ENABLE_RUST)" "y" |
| 2698 |
ifeq "$(ENABLE_YRS)" "y" |
| 2699 |
ifneq (,$(filter yrs, $(SYSTEM_STUFF))) |
| 2700 |
# build yffi (to be used by "standard" make) and generate needed header manually. |
| 2701 |
# Done upstream in external (and used directly from there) but we disable that via system-crates.diff, |
| 2702 |
# which now hardcodes debian/cargo_registry/yffi instead :-) and relies on the standard include path |
| 2703 |
# fix cargo_home |
| 2704 |
if grep -q libreoffice-$(DEB_VERSION_UPSTREAM) $(CARGO_HOME)/config.toml; then \ |
| 2705 |
sed -i s,libreoffice-$(DEB_VERSION_UPSTREAM),yffi-$(shell grep ^version /usr/share/cargo/registry/yffi-*/Cargo.toml | head -n 1 | awk '{ print $$3 }' | sed -e s/\"//g),g $(CARGO_HOME)/config.toml; \ |
| 2706 |
fi |
| 2707 |
cd $(CURDIR)/debian/cargo_registry/yffi && export DEB_CARGO_CRATE=yffi_$(shell grep ^version /usr/share/cargo/registry/yffi-*/Cargo.toml | head -n 1 | awk '{ print $$3 }' | sed -e s/\"//g); $(CARGO) build $(CARGO_FLAGS) --offline -p yffi |
| 2708 |
cd $(CURDIR)/debian/cargo_registry/yffi && cbindgen -o $(CURDIR)/include/libyrs.h |
| 2709 |
endif |
| 2710 |
endif |
| 2711 |
endif |
| 2712 |
|
| 2713 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 2714 |
# fix cargo_home |
| 2715 |
if grep -q libreoffice-$(DEB_VERSION_UPSTREAM) $(CARGO_HOME)/config.toml; then \ |
| 2716 |
sed -i s,libreoffice-$(DEB_VERSION_UPSTREAM),rust-uno-$(RUST_UNO_VERSION),g $(CARGO_HOME)/config.toml; \ |
| 2717 |
fi |
| 2718 |
if grep -q yffi-$(shell grep ^version /usr/share/cargo/registry/yffi-*/Cargo.toml | head -n 1 | awk '{ print $$3 }' | sed -e s/\"//g) $(CARGO_HOME)/config.toml; then \ |
| 2719 |
sed -i s,yffi-$(shell grep ^version /usr/share/cargo/registry/yffi-*/Cargo.toml | head -n 1 | awk '{ print $$3 }' | sed -e s/\"//g),rust-uno-$(RUST_UNO_VERSION),g $(CARGO_HOME)/config.toml; \ |
| 2720 |
fi |
| 2721 |
endif |
| 2722 |
|
| 2723 |
# find non-default python (see https://bugs.documentfoundation.org/show_bug.cgi?id=169163#c6: |
| 2724 |
# "So it is confirmed, and the way right now for system python is to put a versioned python early |
| 2725 |
# into your path that matches the desired version. e.g. call yourfancypython python3.7 and |
| 2726 |
# AM_PATH_PYTHON as is used by configure will pick that first.. https://www.gnu.org/software/automake/manual/html_node/Python.html" |
| 2727 |
ifneq "$(PYTHON_VERSION)" "default" |
| 2728 |
cd bin && ln -s /usr/bin/$(PYTHON) |
| 2729 |
endif |
| 2730 |
|
| 2731 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 2732 |
# build with --disable-gui first |
| 2733 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) \ |
| 2734 |
CLANGDIR=$(CLANGDIR) \ |
| 2735 |
MARIADBCONFIG=$(MARIADBCONFIG) \ |
| 2736 |
FIREBIRD_CFLAGS=$(FIREBIRD_CFLAGS) FIREBIRD_LIBS=$(FIREBIRD_LIBS) \ |
| 2737 |
TX=/usr/libexec/afdko/tx MAKEOTF=/usr/libexec/afdko/makeotfexe MERGEFONTS=/usr/libexec/afdko/mergefonts \ |
| 2738 |
./autogen.sh $(CONFIGURE_FLAGS) \ |
| 2739 |
--without-junit --without-cppunit \ |
| 2740 |
--disable-ext-wiki-publisher \ |
| 2741 |
--disable-scripting-beanshell --disable-scripting-javascript \ |
| 2742 |
--without-doxygen --without-javadoc \ |
| 2743 |
--with-galleries=no --with-theme="$(DEFAULT_IMAGE)" \ |
| 2744 |
--disable-gui --disable-introspection --disable-qt5 --disable-kf5 --disable-qt6-multimedia |
| 2745 |
|
| 2746 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) build-non-l10n-only |
| 2747 |
|
| 2748 |
rm -rf instdir-nogui |
| 2749 |
cp -r instdir instdir-nogui |
| 2750 |
|
| 2751 |
# clean. cleaning up only potentially affected ones was not really |
| 2752 |
# maintainable and broke running the uitests since something apparently was not rebuilt |
| 2753 |
# for "use UI" as it should. |
| 2754 |
# Better safe than sorry, even though that increases build time for a magnitude... |
| 2755 |
$(MAKE) clean |
| 2756 |
endif |
| 2757 |
|
| 2758 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) \ |
| 2759 |
CLANGDIR=$(CLANGDIR) \ |
| 2760 |
MARIADBCONFIG=$(MARIADBCONFIG) \ |
| 2761 |
FIREBIRD_CFLAGS=$(FIREBIRD_CFLAGS) FIREBIRD_LIBS=$(FIREBIRD_LIBS) \ |
| 2762 |
QT5DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/qt5 QT6DIR=/usr/lib/qt6 \ |
| 2763 |
TX=/usr/libexec/afdko/tx MAKEOTF=/usr/libexec/afdko/makeotfexe MERGEFONTS=/usr/libexec/afdko/mergefonts \ |
| 2764 |
./autogen.sh $(CONFIGURE_FLAGS) \ |
| 2765 |
--without-junit --without-cppunit \ |
| 2766 |
--disable-ext-wiki-publisher \ |
| 2767 |
--disable-scripting-beanshell --disable-scripting-javascript \ |
| 2768 |
--without-doxygen --without-javadoc \ |
| 2769 |
--with-galleries=no --with-theme="$(DEFAULT_IMAGE)" |
| 2770 |
|
| 2771 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) build-non-l10n-only |
| 2772 |
|
| 2773 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 2774 |
$(CURDIR)/debian/rules check |
| 2775 |
endif |
| 2776 |
|
| 2777 |
ifneq "$(BUILD_ISOS)" "en-US" |
| 2778 |
# build sysui again with all languages; as it contains language-specific help and/or descriptions... |
| 2779 |
$(MAKE) sysui.clean |
| 2780 |
make cmd cmd="cd sysui; export WITH_LANG='$(LANGPACKISOS)'; export WITH_LANG_LIST='$(LANGPACKISOS)'; $(MAKE)" |
| 2781 |
endif |
| 2782 |
|
| 2783 |
touch $@ |
| 2784 |
|
| 2785 |
build-indep: $(STAMP_DIR)/prepare $(STAMP_DIR)/build-indep |
| 2786 |
$(STAMP_DIR)/build-indep: |
| 2787 |
dh_testdir |
| 2788 |
|
| 2789 |
ifeq "$(PACKAGE_SDK)" "y" |
| 2790 |
if [ -f Makefile ]; then $(MAKE) odk.clean; fi |
| 2791 |
endif |
| 2792 |
if [ -f Makefile ]; then $(MAKE) scp2.clean; fi |
| 2793 |
|
| 2794 |
rm -f config.status autogen.lastrun |
| 2795 |
|
| 2796 |
# now build with the indep stuff (javadoc, languages, ....) |
| 2797 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) \ |
| 2798 |
MARIADBCONFIG=$(MARIADBCONFIG) \ |
| 2799 |
FIREBIRD_CFLAGS=$(FIREBIRD_CFLAGS) FIREBIRD_LIBS=$(FIREBIRD_LIBS) \ |
| 2800 |
QT5DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/qt5 QT6DIR=/usr/lib/qt6 \ |
| 2801 |
TX=/usr/libexec/afdko/tx MAKEOTF=/usr/libexec/afdko/makeotfexe MERGEFONTS=/usr/libexec/afdko/mergefonts \ |
| 2802 |
./autogen.sh $(CONFIGURE_FLAGS) $(CONFIGURE_FLAGS_INDEP) |
| 2803 |
|
| 2804 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) build |
| 2805 |
ifeq "$(ENABLE_JAVA)" "y" |
| 2806 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 2807 |
ifeq "$(ENABLE_JUNIT4)" "y" |
| 2808 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) Jar_{OOoRunner,test,ConnectivityTools} |
| 2809 |
endif |
| 2810 |
endif |
| 2811 |
endif |
| 2812 |
|
| 2813 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 2814 |
find workdir/Zip -name "smoketestdoc*" | xargs rm; \ |
| 2815 |
patch -p0 < $(CURDIR)/debian/tests/patches/smoketest-disable-extension-tests.diff; \ |
| 2816 |
cd smoketest && $(MAKE) Zip_smoketestdoc; cd ..; \ |
| 2817 |
patch -p0 -R < $(CURDIR)/debian/tests/patches/smoketest-disable-extension-tests.diff; \ |
| 2818 |
cp workdir/Zip/smoketestdoc.zip workdir/Zip/smoketestdoc.sxw |
| 2819 |
endif |
| 2820 |
|
| 2821 |
ifneq "$(AUTOPKGTEST_BUILD)" "y" |
| 2822 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 2823 |
$(CURDIR)/debian/rules check-indep |
| 2824 |
endif |
| 2825 |
endif |
| 2826 |
|
| 2827 |
touch $@ |
| 2828 |
|
| 2829 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 2830 |
build-tests: |
| 2831 |
ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS))) |
| 2832 |
patch -p1 < $(CURDIR)/debian/tests/patches/disable-db-tests.diff |
| 2833 |
endif |
| 2834 |
ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) |
| 2835 |
cd $(SOURCE_TREE)/smoketest && \ |
| 2836 |
patch -p1 < $(CURDIR)/debian/tests/patches/smoketest-disable-extension-tests.diff |
| 2837 |
endif |
| 2838 |
# enable cppunit etc. |
| 2839 |
PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) \ |
| 2840 |
CLANGDIR=$(CLANGDIR) \ |
| 2841 |
MARIADBCONFIG=$(MARIADBCONFIG) \ |
| 2842 |
FIREBIRD_CFLAGS=$(FIREBIRD_CFLAGS) FIREBIRD_LIBS=$(FIREBIRD_LIBS) \ |
| 2843 |
QT5DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/qt5 QT6DIR=/usr/lib/qt6 \ |
| 2844 |
TX=/usr/libexec/afdko/tx MAKEOTF=/usr/libexec/afdko/makeotfexe MERGEFONTS=/usr/libexec/afdko/mergefonts \ |
| 2845 |
./autogen.sh $(CONFIGURE_FLAGS) $(CONFIGURE_FLAGS_TESTS) \ |
| 2846 |
--disable-ext-wiki-publisher \ |
| 2847 |
--without-doxygen --without-javadoc \ |
| 2848 |
--disable-scripting-beanshell --disable-scripting-javascript \ |
| 2849 |
--with-galleries=no --with-theme="$(DEFAULT_IMAGE)" |
| 2850 |
|
| 2851 |
ifeq "$(BUILD_TESTS)" "y" |
| 2852 |
# build the tests (first) |
| 2853 |
export gb_SUPPRESS_TESTS=true; \ |
| 2854 |
$(MAKE) check |
| 2855 |
endif |
| 2856 |
|
| 2857 |
check: build-tests |
| 2858 |
ifeq "$(RUN_MAKE_CHECK)" "y" |
| 2859 |
# generate the needed en_US.UTF-8 locale if needed |
| 2860 |
if ! locale -a | grep -q ^en_US\.utf8; then \ |
| 2861 |
mkdir -p $(CURDIR)/debian/locales; \ |
| 2862 |
USE_CPUS=$(NUM_CPUS) debian/scripts/locale-gen; \ |
| 2863 |
fi |
| 2864 |
|
| 2865 |
# and now run them |
| 2866 |
$(IGNORE_MAKE_FAILURES)t=`mktemp -q -d`; \ |
| 2867 |
cd $(SOURCE_TREE) && \ |
| 2868 |
export PATH=$(BUILD_PATH); \ |
| 2869 |
export TMPDIR=$$t; \ |
| 2870 |
export HOME=$$t; \ |
| 2871 |
export LOCPATH=$(CURDIR)/debian/locales; \ |
| 2872 |
export LANG=en_US.UTF-8; \ |
| 2873 |
export TZ=UTC; \ |
| 2874 |
unset DISPLAY; \ |
| 2875 |
unset CONNECTIVITY_TEST_MYSQL_DRIVER; \ |
| 2876 |
export PARALLELISM=1; \ |
| 2877 |
if [ -x /usr/bin/gdb ]; then ulimit -c unlimited || true; fi && \ |
| 2878 |
$(TEST_TIMEOUT) $(MAKE) -k check || $(TEST_TIMEOUT) $(MAKE) check && \ |
| 2879 |
rm -rf $$t |
| 2880 |
else |
| 2881 |
# don't run make check but *do* run selected tests here which are deemed too important |
| 2882 |
# to fail |
| 2883 |
# - "bridgetest" |
| 2884 |
# - the public libraries (sal(helper), cppu(helper)) |
| 2885 |
# - "smoketest" as a smoketest |
| 2886 |
# - pyuno (as we ship python3-uno..) |
| 2887 |
# - unoidl for the SDK |
| 2888 |
$(IGNORE_MAKE_FAILURES)\ |
| 2889 |
cd $(SOURCE_TREE) && \ |
| 2890 |
$(TEST_TIMEOUT) make testtools.allcheck |
| 2891 |
# build smoketest prerequisites |
| 2892 |
# and it only builds unotest but not test so build that manually... |
| 2893 |
# sal only builds cppunittester on make check due to cppunit-optional.diff |
| 2894 |
# smoketest.allcheck actually does NOT run it... Do it manually later.. |
| 2895 |
cd $(SOURCE_TREE) && \ |
| 2896 |
( \ |
| 2897 |
make unotest.allbuild && \ |
| 2898 |
make test.allbuild && \ |
| 2899 |
gb_SUPPRESS_TESTS=true make sal.allcheck && \ |
| 2900 |
make smoketest.allcheck \ |
| 2901 |
) |
| 2902 |
# build some more tests |
| 2903 |
for i in salhelper cppu cppuhelper unoidl; do \ |
| 2904 |
gb_SUPPRESS_TESTS=true make $$i.allcheck; \ |
| 2905 |
done |
| 2906 |
# run the sal tests. We built them anyways and it does make sense to test |
| 2907 |
# the system abstraction layer anyways. And it contains system-operating tests |
| 2908 |
# and types test which might become relevant for new architectures |
| 2909 |
$(IGNORE_MAKE_FAILURES)t=`mktemp -q -d`; \ |
| 2910 |
cd $(SOURCE_TREE)/sal && \ |
| 2911 |
export PATH=$(BUILD_PATH); \ |
| 2912 |
export TMPDIR=$$t; \ |
| 2913 |
export HOME=$$t; \ |
| 2914 |
export PARALLELISM=1; \ |
| 2915 |
export LOCPATH=$(CURDIR)/debian/locales; \ |
| 2916 |
export LANG=en_US.UTF-8; \ |
| 2917 |
$(TEST_TIMEOUT) make check |
| 2918 |
# more public library checks |
| 2919 |
$(IGNORE_MAKE_FAILURES)\ |
| 2920 |
for i in salhelper cppu cppuhelper; do \ |
| 2921 |
export PARALLELISM=1; \ |
| 2922 |
$(TEST_TIMEOUT) make $$i.allcheck; \ |
| 2923 |
done |
| 2924 |
# run the smoketest |
| 2925 |
$(IGNORE_MAKE_FAILURES)\ |
| 2926 |
cd $(SOURCE_TREE)/smoketest && \ |
| 2927 |
export PARALLELISM=1; \ |
| 2928 |
$(TEST_TIMEOUT) make subsequentcheck |
| 2929 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 2930 |
# does pyuno work? |
| 2931 |
$(IGNORE_MAKE_FAILURES)\ |
| 2932 |
cd $(SOURCE_TREE)/pyuno && \ |
| 2933 |
export PARALLELISM=1; \ |
| 2934 |
$(TEST_TIMEOUT) make check subsequentcheck |
| 2935 |
endif |
| 2936 |
# shipped in the SDK |
| 2937 |
ifeq "$(PACKAGE_SDK)" "y" |
| 2938 |
$(IGNORE_MAKE_FAILURES)\ |
| 2939 |
cd $(SOURCE_TREE)/unoidl && \ |
| 2940 |
export PARALLELISM=1; \ |
| 2941 |
$(TEST_TIMEOUT) make check |
| 2942 |
endif |
| 2943 |
endif |
| 2944 |
|
| 2945 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 2946 |
cd $(SOURCE_TREE)/rust_uno && export DEB_CARGO_CRATE=rust-uno_$(RUST_UNO_VERSION); $(CARGO) check $(CARGO_FLAGS) |
| 2947 |
cd $(SOURCE_TREE)/rust_uno && \ |
| 2948 |
export DEB_CARGO_CRATE=rust-uno_$(RUST_UNO_VERSION); \ |
| 2949 |
export INSTDIR=$(CURDIR)/$(SOURCE_TREE)/instdir; \ |
| 2950 |
export LD_LIBRARY_PATH=$(CURDIR)/$(SOURCE_TREE)/instdir/program; \ |
| 2951 |
$(CARGO) test $(CARGO_FLAGS) |
| 2952 |
endif |
| 2953 |
|
| 2954 |
ifeq "$(BUILD_TESTS)" "y" |
| 2955 |
ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS))) |
| 2956 |
patch -p1 -R < $(CURDIR)/debian/tests/patches/disable-db-tests.diff |
| 2957 |
endif |
| 2958 |
ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) |
| 2959 |
cd $(SOURCE_TREE)/smoketest && \ |
| 2960 |
patch -p1 -R < $(CURDIR)/debian/tests/patches/smoketest-disable-extension-tests.diff |
| 2961 |
endif |
| 2962 |
endif |
| 2963 |
|
| 2964 |
check-indep: |
| 2965 |
ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 2966 |
ifeq "$(ENABLE_JAVA)" "y" |
| 2967 |
# since the gb_SUPPRESS_CHECK stuff in build this isn't checked. |
| 2968 |
# probably should, so do it here manually. |
| 2969 |
$(IGNORE_MAKE_FAILURES)cd odk && \ |
| 2970 |
$(MAKE) CustomTarget_odk/check |
| 2971 |
ifneq (,$(findstring -indep,$(MAKECMDGOALS))) |
| 2972 |
# was already checked in check |
| 2973 |
$(IGNORE_MAKE_FAILURES)if [ ! -e $(STAMP_DIR)/build-arch ]; then \ |
| 2974 |
cd odk && $(MAKE) CustomTarget_odk/build-examples && \ |
| 2975 |
$(MAKE) CustomTarget_odk/build-examples_java; \ |
| 2976 |
fi |
| 2977 |
endif |
| 2978 |
endif |
| 2979 |
endif |
| 2980 |
else |
| 2981 |
# noop |
| 2982 |
build-tests: |
| 2983 |
check: build-tests |
| 2984 |
endif |
| 2985 |
|
| 2986 |
install: $(STAMP_DIR)/install-common $(STAMP_DIR)/install-arch $(STAMP_DIR)/install-indep |
| 2987 |
|
| 2988 |
install-common: $(STAMP_DIR)/install-common |
| 2989 |
ifeq ($(MAKECMDGOALS),binary) |
| 2990 |
$(STAMP_DIR)/install-common: $(STAMP_DIR)/build-arch $(STAMP_DIR)/build-indep |
| 2991 |
else |
| 2992 |
ifeq ($(MAKECMDGOALS),binary-indep) |
| 2993 |
$(STAMP_DIR)/install-common: $(STAMP_DIR)/build-indep |
| 2994 |
endif |
| 2995 |
ifeq ($(MAKECMDGOALS),binary-arch) |
| 2996 |
$(STAMP_DIR)/install-common: $(STAMP_DIR)/build-arch |
| 2997 |
endif |
| 2998 |
endif |
| 2999 |
dh_testdir |
| 3000 |
dh_testroot |
| 3001 |
|
| 3002 |
dh_prep |
| 3003 |
rm -f debian/*.install debian/*.dirs |
| 3004 |
|
| 3005 |
# remove those for safety in case the languages might change on |
| 3006 |
# testbuilds. then the /*/ in dh_installdocs in binary-* won't work |
| 3007 |
# anymore (different dirs) |
| 3008 |
rm -rf $(SOURCE_TREE)/instsetoo_native/util/LibreOffice |
| 3009 |
|
| 3010 |
rm -rf $(SOURCE_TREE)/file-lists |
| 3011 |
|
| 3012 |
# install LibreOffice. |
| 3013 |
cd $(SOURCE_TREE)/; \ |
| 3014 |
PATH=$(BUILD_PATH) \ |
| 3015 |
DESTDIR=$(CURDIR)/debian/tmp \ |
| 3016 |
$(MAKE) distro-pack-install |
| 3017 |
export DESTDIR=$(CURDIR)/debian/tmp ;\ |
| 3018 |
export VERSION=$(OOVER); \ |
| 3019 |
export OOINSTBASE=$(OODIR); \ |
| 3020 |
export OOO_LANGS_LIST="$(ISOS)"; \ |
| 3021 |
$(CURDIR)/debian/scripts/gid2pkgdirs.sh |
| 3022 |
ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" |
| 3023 |
make cmd cmd="export DESTDIR=$(CURDIR)/debian/tmp; $(CURDIR)/solenv/bin/install-gdb-printers -a /usr/share/gdb/auto-load/$(OODIR) -c -i /$(OODIR) -p /usr/share/libreoffice/gdb" |
| 3024 |
endif |
| 3025 |
|
| 3026 |
# FIXME |
| 3027 |
cd $(CURDIR)/debian/tmp/pkg && rm -rf \* |
| 3028 |
|
| 3029 |
# we need to do it here. If -kf5 isn't built |
| 3030 |
# there's no -kf5.install generated, so dh_missing complains later |
| 3031 |
ifeq "$(ENABLE_QT5)" "y" |
| 3032 |
mkdir -p debian/tmp/pkg/libreoffice-qt5/$(OODIR)/program |
| 3033 |
mv debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libvclplug_qt5lo.so\ |
| 3034 |
debian/tmp/pkg/libreoffice-qt5/$(OODIR)/program |
| 3035 |
endif |
| 3036 |
ifeq "$(ENABLE_QT6)" "y" |
| 3037 |
mkdir -p debian/tmp/pkg/libreoffice-qt6/$(OODIR)/program |
| 3038 |
mv debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libvclplug_qt6lo.so\ |
| 3039 |
debian/tmp/pkg/libreoffice-qt6/$(OODIR)/program |
| 3040 |
endif |
| 3041 |
ifeq "$(shell echo $(ENABLE_KF5)$(ENABLE_KF6) | grep -q y && echo true)" "true" |
| 3042 |
ifeq "$(BUILD_PLASMA)" "y" |
| 3043 |
if [ -f debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libkf$(PLASMA_VERSION)be1lo.so ]; then \ |
| 3044 |
mkdir -p debian/tmp/pkg/libreoffice-plasma/$(OODIR)/program; \ |
| 3045 |
mv debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libkf$(PLASMA_VERSION)be1lo.so \ |
| 3046 |
debian/tmp/pkg/libreoffice-plasma/$(OODIR)/program; \ |
| 3047 |
fi |
| 3048 |
# remove other ones maybe built by --enable-kfX |
| 3049 |
rm -f debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libkf*be1lo.so |
| 3050 |
else |
| 3051 |
rm -f debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libkf*be1lo.so |
| 3052 |
endif |
| 3053 |
ifeq "$(ENABLE_KF5)" "y" |
| 3054 |
mkdir -p debian/tmp/pkg/libreoffice-kf5/$(OODIR)/program |
| 3055 |
mv debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libvclplug_kf5lo.so \ |
| 3056 |
debian/tmp/pkg/libreoffice-kf5/$(OODIR)/program |
| 3057 |
endif |
| 3058 |
ifeq "$(ENABLE_KF6)" "y" |
| 3059 |
mkdir -p debian/tmp/pkg/libreoffice-kf6/$(OODIR)/program |
| 3060 |
mv debian/tmp/pkg/libreoffice-kde/$(OODIR)/program/libvclplug_kf6lo.so \ |
| 3061 |
debian/tmp/pkg/libreoffice-kf6/$(OODIR)/program |
| 3062 |
endif |
| 3063 |
endif |
| 3064 |
|
| 3065 |
ifeq "$(ENABLE_HELP)" "y" |
| 3066 |
ifeq "$(ENABLE_HTML_HELP)" "y" |
| 3067 |
mkdir -p debian/tmp/pkg/libreoffice-help-common/$(OODIR); \ |
| 3068 |
mv debian/tmp/pkg/libreoffice-common/$(OODIR)/help \ |
| 3069 |
debian/tmp/pkg/libreoffice-help-common/$(OODIR) |
| 3070 |
endif |
| 3071 |
endif |
| 3072 |
|
| 3073 |
# prepare install/dir files for dh |
| 3074 |
for i in `cd $(CURDIR)/debian/tmp/pkg; ls -1 | xargs`; do \ |
| 3075 |
echo "$${i}/usr/* usr" > debian/$$i.install; \ |
| 3076 |
(cd debian/tmp/pkg/$$i; find . -type d | sed -e "s,\./,,") \ |
| 3077 |
> debian/$$i.dirs; \ |
| 3078 |
done |
| 3079 |
|
| 3080 |
# the english resources should be in -common |
| 3081 |
cat debian/libreoffice-l10n-en-US.dirs >> debian/libreoffice-common.dirs |
| 3082 |
cat debian/libreoffice-l10n-en-US.install >> debian/libreoffice-common.install |
| 3083 |
rm -f debian/libreoffice-l10n-en-US.dirs debian/libreoffice-l10n-en-US.install |
| 3084 |
|
| 3085 |
# and bn-IN in -bn... |
| 3086 |
ifeq (bn-IN,$(findstring bn-IN,$(LANGPACKISOS))) |
| 3087 |
if [ -f debian/libreoffice-l10n-bn-IN.dirs -a -f debian/libreoffice-l10n-bn-IN.install ]; then \ |
| 3088 |
cat debian/libreoffice-l10n-bn-IN.dirs >> debian/libreoffice-l10n-bn.dirs; \ |
| 3089 |
cat debian/libreoffice-l10n-bn-IN.install >> debian/libreoffice-l10n-bn.install; \ |
| 3090 |
rm -f debian/libreoffice-l10n-bn-IN.dirs debian/libreoffice-l10n-bn-IN.install; \ |
| 3091 |
fi |
| 3092 |
endif |
| 3093 |
# and ca-valencia in -ca... |
| 3094 |
ifeq (ca-valencia,$(findstring ca-valencia,$(LANGPACKISOS))) |
| 3095 |
if [ -f debian/libreoffice-l10n-ca-valencia.dirs -a -f debian/libreoffice-l10n-ca-valencia.install ]; then \ |
| 3096 |
cat debian/libreoffice-l10n-ca-valencia.dirs >> debian/libreoffice-l10n-ca.dirs; \ |
| 3097 |
cat debian/libreoffice-l10n-ca-valencia.install >> debian/libreoffice-l10n-ca.install; \ |
| 3098 |
rm -f debian/libreoffice-l10n-ca-valencia.dirs debian/libreoffice-l10n-ca-valencia.install; \ |
| 3099 |
fi |
| 3100 |
endif |
| 3101 |
ifeq "$(ENABLE_HELP)" "y" |
| 3102 |
ifeq (ca-valencia,$(findstring ca-valencia,$(HELPISOS))) |
| 3103 |
if [ -f debian/libreoffice-help-ca-valencia.dirs -a -f debian/libreoffice-help-ca-valencia.install ]; then \ |
| 3104 |
cat debian/libreoffice-help-ca-valencia.dirs >> debian/libreoffice-help-ca.dirs; \ |
| 3105 |
cat debian/libreoffice-help-ca-valencia.install >> debian/libreoffice-help-ca.install; \ |
| 3106 |
rm -f debian/libreoffice-help-ca-valencia.dirs debian/libreoffice-help-ca-valencia.install; \ |
| 3107 |
fi |
| 3108 |
endif |
| 3109 |
endif |
| 3110 |
# and sr-Latn should be in -sr |
| 3111 |
ifeq (sr-Latn,$(findstring sr-Latn,$(LANGPACKISOS))) |
| 3112 |
if [ -f debian/libreoffice-l10n-sr-Latn.dirs -a -f debian/libreoffice-l10n-sr-Latn.install ]; then \ |
| 3113 |
cat debian/libreoffice-l10n-sr-Latn.dirs >> debian/libreoffice-l10n-sr.dirs; \ |
| 3114 |
cat debian/libreoffice-l10n-sr-Latn.install >> debian/libreoffice-l10n-sr.install; \ |
| 3115 |
rm -f debian/libreoffice-l10n-sr-Latn.dirs debian/libreoffice-l10n-sr-Latn.install; \ |
| 3116 |
fi |
| 3117 |
endif |
| 3118 |
|
| 3119 |
# This should be in -kmr... This is different like the above where |
| 3120 |
# we move different "variants" into the "base" but there's only kmr-Latn |
| 3121 |
# for Kurmanji, but I don't really want to have that -latn suffix in |
| 3122 |
# the packages |
| 3123 |
ifeq (kmr-Latn,$(findstring kmr-Latn,$(LANGPACKISOS))) |
| 3124 |
if [ -f debian/libreoffice-l10n-kmr-Latn.dirs -a -f debian/libreoffice-l10n-kmr-Latn.install ]; then \ |
| 3125 |
cat debian/libreoffice-l10n-kmr-Latn.dirs >> debian/libreoffice-l10n-kmr.dirs; \ |
| 3126 |
cat debian/libreoffice-l10n-kmr-Latn.install >> debian/libreoffice-l10n-kmr.install; \ |
| 3127 |
rm -f debian/libreoffice-l10n-kmr-Latn.dirs debian/libreoffice-l10n-kmr-Latn.install; \ |
| 3128 |
fi |
| 3129 |
endif |
| 3130 |
|
| 3131 |
# fixup case (-l10n-pt-BR -> l10n-pt-br etc.) |
| 3132 |
for iso in $(ISOS); do \ |
| 3133 |
pkgiso=`echo $$iso | tr A-Z a-z`; \ |
| 3134 |
if [ "$$iso" != "$$pkgiso" ]; then \ |
| 3135 |
if [ "$$iso" != "en-US" -a \ |
| 3136 |
-e debian/libreoffice-l10n-$$iso.dirs -a \ |
| 3137 |
-e debian/libreoffice-l10n-$$iso.install ]; then \ |
| 3138 |
mv debian/libreoffice-l10n-$$iso.dirs \ |
| 3139 |
debian/libreoffice-l10n-$$pkgiso.dirs; \ |
| 3140 |
mv debian/libreoffice-l10n-$$iso.install \ |
| 3141 |
debian/libreoffice-l10n-$$pkgiso.install; \ |
| 3142 |
fi; \ |
| 3143 |
if [ -e debian/libreoffice-help-$$iso.dirs -a \ |
| 3144 |
-e debian/libreoffice-help-$$iso.install ]; then \ |
| 3145 |
mv debian/libreoffice-help-$$iso.dirs \ |
| 3146 |
debian/libreoffice-help-$$pkgiso.dirs; \ |
| 3147 |
mv debian/libreoffice-help-$$iso.install \ |
| 3148 |
debian/libreoffice-help-$$pkgiso.install; \ |
| 3149 |
fi; \ |
| 3150 |
fi; \ |
| 3151 |
done |
| 3152 |
|
| 3153 |
# fix up still sneaking in ./. They break dh_install (it installs |
| 3154 |
# but wrongly complains about it as not-installed files) |
| 3155 |
perl -pi -e 's,\./,,' debian/libreoffice-common.install |
| 3156 |
perl -pi -e 's,\./,,' debian/ure.install |
| 3157 |
|
| 3158 |
ifneq "$(ENABLE_HELP)" "n" |
| 3159 |
# remove non-packaged localized help. This a) saves space |
| 3160 |
# and b) we need this for the following dh_install as there will be |
| 3161 |
# no .install files created and dh_install will warn/fail due |
| 3162 |
# to non-installed files. |
| 3163 |
for iso in $(filter-out en-US,$(LANGPACKISOS)); do \ |
| 3164 |
if ! `echo $(HELPISOS) | grep -q $$iso` || [ "$$iso" = "sk" ] ; then \ |
| 3165 |
pkgiso=`echo $$iso | tr A-Z a-z`; \ |
| 3166 |
rm -rf debian/tmp/pkg/libreoffice-help-$$iso; \ |
| 3167 |
rm -f debian/libreoffice-help-$$pkgiso.dirs; \ |
| 3168 |
rm -f debian/libreoffice-help-$$pkgiso.install; \ |
| 3169 |
fi; \ |
| 3170 |
done |
| 3171 |
endif |
| 3172 |
|
| 3173 |
# not installed, do manually |
| 3174 |
echo "../usr/lib/libreoffice/share/wordbook/en-US.dic usr/lib/libreoffice/share/wordbook" >> debian/libreoffice-common.install |
| 3175 |
ifeq (en-GB,$(findstring en-GB,$(LANGPACKISOS))) |
| 3176 |
if [ -f debian/tmp/usr/lib/libreoffice/share/wordbook/en-GB.dic ]; then \ |
| 3177 |
echo "../usr/lib/libreoffice/share/wordbook/en-GB.dic usr/lib/libreoffice/share/wordbook" >> debian/libreoffice-l10n-en-gb.install; \ |
| 3178 |
fi |
| 3179 |
endif |
| 3180 |
ifeq (hu,$(findstring hu,$(LANGPACKISOS))) |
| 3181 |
if [ -f debian/tmp/usr/lib/libreoffice/share/wordbook/hu_AkH11.dic ]; then \ |
| 3182 |
echo "../usr/lib/libreoffice/share/wordbook/hu_AkH11.dic usr/lib/libreoffice/share/wordbook" >> debian/libreoffice-l10n-hu.install; \ |
| 3183 |
fi |
| 3184 |
endif |
| 3185 |
ifeq (sl,$(findstring sl,$(LANGPACKISOS))) |
| 3186 |
if [ -f debian/tmp/usr/lib/libreoffice/share/wordbook/sl.dic ]; then \ |
| 3187 |
echo "../usr/lib/libreoffice/share/wordbook/sl.dic usr/lib/libreoffice/share/wordbook" >> debian/libreoffice-l10n-sl.install; \ |
| 3188 |
fi |
| 3189 |
endif |
| 3190 |
|
| 3191 |
ifneq "$(PACKAGE_LIBRELOGO)" "y" |
| 3192 |
rm -rf debian/tmp/pkg/libreoffice-librelogo |
| 3193 |
endif |
| 3194 |
|
| 3195 |
# FIXME; hack: somehow there only the dirs are there (dh_installdirs). they *are* in the install phase and gid2pkgdirs also |
| 3196 |
# is supposed to install it to the dir but apparently doesn't. They are in instdir though, so let's use it from |
| 3197 |
# there.. |
| 3198 |
ifeq "$(ENABLE_NLPSOLVER)" "y" |
| 3199 |
if [ -d instdir/share/extensions/nlpsolver ]; then \ |
| 3200 |
rm -rf debian/tmp/pkg/libreoffice-nlpsolver; \ |
| 3201 |
mkdir -p debian/tmp/pkg/libreoffice-nlpsolver/$(OODIR)/share/extensions; \ |
| 3202 |
cp -ra instdir/share/extensions/nlpsolver \ |
| 3203 |
debian/tmp/pkg/libreoffice-nlpsolver/$(OODIR)/share/extensions; \ |
| 3204 |
fi |
| 3205 |
endif |
| 3206 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 3207 |
if [ -d instdir/share/extensions/wiki-publisher ]; then \ |
| 3208 |
rm -rf debian/tmp/pkg/libreoffice-wiki-publisher; \ |
| 3209 |
mkdir -p debian/tmp/pkg/libreoffice-wiki-publisher/$(OODIR)/share/extensions; \ |
| 3210 |
cp -ra instdir/share/extensions/wiki-publisher \ |
| 3211 |
debian/tmp/pkg/libreoffice-wiki-publisher/$(OODIR)/share/extensions; \ |
| 3212 |
fi |
| 3213 |
endif |
| 3214 |
|
| 3215 |
for i in calc impress draw base writer; do \ |
| 3216 |
echo "../usr/share/metainfo/libreoffice-$$i.appdata.xml /usr/share/metainfo/" >> $(PKGDIR)-$$i.install; \ |
| 3217 |
done |
| 3218 |
|
| 3219 |
ifeq "$(BUILD_PLASMA)" "y" |
| 3220 |
echo "../usr/share/metainfo/org.libreoffice.kde.metainfo.xml /usr/share/metainfo/" >> $(PKGDIR)-plasma.install |
| 3221 |
# install files for "create new" ... |
| 3222 |
mkdir -p $(PKGDIR)-plasma/usr/share/templates/.source |
| 3223 |
for i in $(SOURCE_TREE)/extras/source/shellnew/*; do \ |
| 3224 |
cp $$i $(PKGDIR)-plasma/usr/share/templates/.source/`basename $$i`; \ |
| 3225 |
done |
| 3226 |
cat debian/templates/soffice-template.desktop.in \ |
| 3227 |
| sed -e "s/@APP@/Writer/" \ |
| 3228 |
| sed -e "s/@EXT@/odt/" \ |
| 3229 |
| sed -e "s/@TYPE@/text/" \ |
| 3230 |
> $(PKGDIR)-plasma/usr/share/templates/soffice.odt.desktop |
| 3231 |
cat debian/templates/soffice-template.desktop.in \ |
| 3232 |
| sed -e "s/@APP@/Calc/" \ |
| 3233 |
| sed -e "s/@EXT@/ods/" \ |
| 3234 |
| sed -e "s/@TYPE@/spreadsheet/" \ |
| 3235 |
> $(PKGDIR)-plasma/usr/share/templates/soffice.ods.desktop |
| 3236 |
cat debian/templates/soffice-template.desktop.in \ |
| 3237 |
| sed -e "s/@APP@/Impress/" \ |
| 3238 |
| sed -e "s/@EXT@/odp/" \ |
| 3239 |
| sed -e "s/@TYPE@/presentation/" \ |
| 3240 |
> $(PKGDIR)-plasma/usr/share/templates/soffice.odp.desktop |
| 3241 |
cat debian/templates/soffice-template.desktop.in \ |
| 3242 |
| sed -e "s/@APP@/Draw/" \ |
| 3243 |
| sed -e "s/@EXT@/odg/" \ |
| 3244 |
| sed -e "s/@TYPE@/drawing/" \ |
| 3245 |
> $(PKGDIR)-plasma/usr/share/templates/soffice.odg.desktop |
| 3246 |
endif |
| 3247 |
|
| 3248 |
ifneq "$(ENABLE_GUI)" "y" |
| 3249 |
rm -rf debian/tmp/pkg/libreofficekit-data |
| 3250 |
endif |
| 3251 |
|
| 3252 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 3253 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 3254 |
cp debian/libreoffice-rust-uno-example.install.in \ |
| 3255 |
debian/libreoffice-rust-uno-example.install |
| 3256 |
endif |
| 3257 |
cat debian/librust-rust-uno-dev.install.in \ |
| 3258 |
| sed -e "s/@RUST_UNO_VERSION@/$(RUST_UNO_VERSION)/" \ |
| 3259 |
> debian/librust-rust-uno-dev.install |
| 3260 |
endif |
| 3261 |
|
| 3262 |
dh_installdirs -A |
| 3263 |
dh_install -A --sourcedir=debian/tmp/pkg && dh_missing -A --sourcedir=debian/tmp/pkg --fail-missing |
| 3264 |
|
| 3265 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 3266 |
# cleanup |
| 3267 |
rm -rf debian/librust-rust-uno-dev/usr/share/cargo/registry/rust-uno-$(RUST_UNO_VERSION)/target |
| 3268 |
rm -f debian/librust-rust-uno-dev/usr/share/cargo/registry/rust-uno-$(RUST_UNO_VERSION)/Cargo.lock |
| 3269 |
# needed by cargo, otherwise it breaks (see https://github.com/rust-lang/cargo/issues/11063) |
| 3270 |
if [ ! -e debian/librust-rust-uno-dev/usr/share/cargo/registry/rust-uno-$(RUST_UNO_VERSION)/.cargo-checksum.json ]; then \ |
| 3271 |
echo '{"package":"Could not get crate checksum","files":{}}' > debian/librust-rust-uno-dev/usr/share/cargo/registry/rust-uno-$(RUST_UNO_VERSION)/.cargo-checksum.json; \ |
| 3272 |
fi |
| 3273 |
# make a cargo build work with the installed crate without needing to manually |
| 3274 |
# set INSTDIR before doing a cargo build |
| 3275 |
perl -pi -e 's/fn main\(\) \{/fn main() \{\n unsafe \{ std::env::set_var\(\"INSTDIR\",\"\/usr\/lib\/libreoffice\"\); \}\n/' \ |
| 3276 |
debian/librust-rust-uno-dev/usr/share/cargo/registry/rust-uno-$(RUST_UNO_VERSION)/build.rs |
| 3277 |
endif |
| 3278 |
|
| 3279 |
# somehow this isn't installed anymore on -B builds... |
| 3280 |
if [ ! -f debian/libreoffice-report-builder/$(OODIR)/program/librptlo.so ]; then \ |
| 3281 |
mkdir -p debian/libreoffice-report-builder/$(OODIR)/program/; \ |
| 3282 |
for i in librptlo.so librptuilo.so; do \ |
| 3283 |
cp $(CURDIR)/instdir/program/$$i \ |
| 3284 |
debian/libreoffice-report-builder/$(OODIR)/program/; \ |
| 3285 |
done; \ |
| 3286 |
fi |
| 3287 |
|
| 3288 |
rm -rf debian/tmp/pkg |
| 3289 |
|
| 3290 |
# fix the desktop files.... |
| 3291 |
cd $(PKGDIR)-common/$(OODIR)/share/xdg/ && \ |
| 3292 |
for i in *.desktop; do \ |
| 3293 |
sed -i -e "s/$(OOVER)//" $$i; \ |
| 3294 |
done |
| 3295 |
ifneq "$(RELEASE_BUILD)" "y" |
| 3296 |
cd $(PKGDIR)-common/$(OODIR)/share/xdg/ && \ |
| 3297 |
for i in *.desktop; do \ |
| 3298 |
sed -i -e "s/libreofficedev/libreoffice/" $$i; \ |
| 3299 |
sed -i -e "s/LibreOfficeDev/LibreOffice/" $$i; \ |
| 3300 |
done |
| 3301 |
endif |
| 3302 |
|
| 3303 |
# move desktop files to their correct packages (and correct dir) |
| 3304 |
# looks like it's pretty nonstandard to have symlinks; this breaks |
| 3305 |
# e.g. the generation from the appdata files. So get rid of those |
| 3306 |
# and move them to the libreoffice-* names after all. |
| 3307 |
for i in base calc draw impress math writer; do \ |
| 3308 |
mkdir -p $(PKGDIR)-$$i/usr/share/applications; \ |
| 3309 |
rm -f $(PKGDIR)-$$i/usr/share/applications/libreoffice-$$i.desktop; \ |
| 3310 |
mv $(PKGDIR)-common/$(OODIR)/share/xdg/$$i.desktop \ |
| 3311 |
$(PKGDIR)-$$i/usr/share/applications/libreoffice-$$i.desktop; \ |
| 3312 |
done |
| 3313 |
|
| 3314 |
# move pagein files |
| 3315 |
for i in calc draw impress writer; do \ |
| 3316 |
mv $(PKGDIR)-core/$(OODIR)/program/pagein-$$i \ |
| 3317 |
$(PKGDIR)-$$i/$(OODIR)/program; \ |
| 3318 |
done |
| 3319 |
|
| 3320 |
ifeq "$(ENABLE_HELP)" "y" |
| 3321 |
# move help to /usr/share |
| 3322 |
ifeq "$(ENABLE_HTML_HELP)" "y" |
| 3323 |
mv $(PKGDIR)-help-common/usr/lib \ |
| 3324 |
$(PKGDIR)-help-common/usr/share |
| 3325 |
endif |
| 3326 |
for iso in $(HELPISOS); do \ |
| 3327 |
pkgiso=`echo $$iso | tr A-Z a-z`; \ |
| 3328 |
if [ -e $(PKGDIR)-help-$$pkgiso/usr ]; then \ |
| 3329 |
mv $(PKGDIR)-help-$$pkgiso/usr/lib \ |
| 3330 |
$(PKGDIR)-help-$$pkgiso/usr/share; \ |
| 3331 |
fi; \ |
| 3332 |
done |
| 3333 |
|
| 3334 |
ifeq (sk,$(findstring sk,$(HELPISOS))) |
| 3335 |
# add fake sk help |
| 3336 |
mkdir -p $(PKGDIR)-help-sk/$(shell echo $(OODIR) | sed -e s/lib/share/)/help |
| 3337 |
ln -s cs \ |
| 3338 |
$(PKGDIR)-help-sk/$(shell echo $(OODIR) | sed -e s/lib/share/)/help/sk |
| 3339 |
endif |
| 3340 |
endif |
| 3341 |
|
| 3342 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3343 |
ifeq "$(PACKAGE_BASE)" "y" |
| 3344 |
# move sdbc_hsqldb.jar into -base (do the move |
| 3345 |
# to /usr/share/java here directly, we do it for the "rest" |
| 3346 |
# later |
| 3347 |
mkdir -p $(PKGDIR)-base/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes; \ |
| 3348 |
mkdir -p $(PKGDIR)-base/$(OODIR)/program/classes; \ |
| 3349 |
mv $(PKGDIR)-common/$(OODIR)/program/classes/sdbc_hsqldb.jar \ |
| 3350 |
$(PKGDIR)-base/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes; \ |
| 3351 |
ln -s $(shell echo /$(OODIR) | sed -e s/lib/share/)/program/classes/sdbc_hsqldb.jar \ |
| 3352 |
$(PKGDIR)-base/$(OODIR)/program/classes/sdbc_hsqldb.jar |
| 3353 |
ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) |
| 3354 |
# fix the classpath (file:// breaks javahelper) |
| 3355 |
jh_classpath --classpath="$(HSQLDB_JAR) .." \ |
| 3356 |
$(PKGDIR)-base/$(shell echo /$(OODIR) | sed -e s/lib/share/)/program/classes/sdbc_hsqldb.jar |
| 3357 |
endif |
| 3358 |
ifeq (,$(filter hsqldb, $(SYSTEM_STUFF))) |
| 3359 |
# we need this in -base. Otherwise we get unwanted package differences |
| 3360 |
# in the unstable version and backports which might use internal hsqldb |
| 3361 |
mkdir -p $(PKGDIR)-base/$(OODIR)/program/classes |
| 3362 |
mv $(PKGDIR)-common/$(OODIR)/program/classes/hsqldb.jar \ |
| 3363 |
$(PKGDIR)-base/$(OODIR)/program/classes |
| 3364 |
endif |
| 3365 |
else |
| 3366 |
# remove sdbc_hsqldb.jar. otherwise ends up in -java-common |
| 3367 |
rm -f $(PKGDIR)-common/$(OODIR)/program/classes/sdbc_hsqldb.jar |
| 3368 |
endif |
| 3369 |
endif |
| 3370 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3371 |
ifeq "$(PACKAGE_BASE)" "y" |
| 3372 |
mkdir -p $(PKGDIR)-sdbc-hsqldb/$(OODIR)/share/registry |
| 3373 |
mv $(PKGDIR)-common/$(OODIR)/share/registry/hsqldb.xcd \ |
| 3374 |
$(PKGDIR)-sdbc-hsqldb/$(OODIR)/share/registry |
| 3375 |
else |
| 3376 |
rm -f $(PKGDIR)-common/$(OODIR)/share/registry/hsqldb.xcd |
| 3377 |
endif |
| 3378 |
endif |
| 3379 |
|
| 3380 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 3381 |
mkdir -p debian/libuno-net-basetypes-cil/$(OODIR)/program/dotnet |
| 3382 |
mkdir -p debian/libuno-net-oootypes-cil/$(OODIR)/program/dotnet |
| 3383 |
mkdir -p debian/libuno-net-uretypes-cil/$(OODIR)/program/dotnet |
| 3384 |
mv debian/ure/$(OODIR)/program/dotnet/net_basetypes.dll \ |
| 3385 |
debian/libuno-net-basetypes-cil/$(OODIR)/program/dotnet |
| 3386 |
mv debian/ure/$(OODIR)/program/dotnet/net_oootypes.dll \ |
| 3387 |
debian/libuno-net-oootypes-cil/$(OODIR)/program/dotnet |
| 3388 |
mv debian/ure/$(OODIR)/program/dotnet/net_uretypes.dll \ |
| 3389 |
debian/libuno-net-uretypes-cil/$(OODIR)/program/dotnet |
| 3390 |
mkdir -p debian/ure-dotnet/$(OODIR)/program/dotnet |
| 3391 |
mv debian/ure/$(OODIR)/program/dotnet/net_bridge* \ |
| 3392 |
debian/ure-dotnet/$(OODIR)/program/dotnet |
| 3393 |
rmdir debian/ure/$(OODIR)/program/dotnet |
| 3394 |
ifeq "$(PACKAGE_SDK)" "y" |
| 3395 |
mkdir -p $(PKGDIR)-dev-dotnet/$(OODIR)/sdk |
| 3396 |
mv debian/ure/$(OODIR)/sdk/dotnet \ |
| 3397 |
$(PKGDIR)-dev-dotnet/$(OODIR)/sdk |
| 3398 |
else |
| 3399 |
rmdir debian/ure/$(OODIR)/sdk/dotnet |
| 3400 |
endif |
| 3401 |
rmdir debian/ure/$(OODIR)/sdk |
| 3402 |
endif |
| 3403 |
|
| 3404 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 3405 |
mkdir -p $(PKGDIR)-sdbc-firebird/$(OODIR)/share/registry |
| 3406 |
mv $(PKGDIR)-common/$(OODIR)/share/registry/firebird_sdbc.xcd \ |
| 3407 |
$(PKGDIR)-sdbc-firebird/$(OODIR)/share/registry |
| 3408 |
endif |
| 3409 |
|
| 3410 |
ifeq "$(PACKAGE_SDK)" "y" |
| 3411 |
# move arch-indep stuff into a libreoffice-dev-common |
| 3412 |
mkdir -p $(PKGDIR)-dev-common/usr/include |
| 3413 |
mv $(PKGDIR)-dev/usr/include/libreoffice \ |
| 3414 |
$(PKGDIR)-dev-common/usr/include |
| 3415 |
mkdir -p $(PKGDIR)-dev-common/$(OODIR)/sdk/bin |
| 3416 |
mv $(PKGDIR)-dev/$(OODIR)/sdk/bin/addon_console.py* \ |
| 3417 |
$(PKGDIR)-dev-common/$(OODIR)/sdk/bin |
| 3418 |
# except include/sal/typesizes.h |
| 3419 |
mkdir -p $(PKGDIR)-dev/usr/include/$(DEB_HOST_MULTIARCH)/libreoffice/sal |
| 3420 |
mkdir -p $(PKGDIR)-dev/usr/include/libreoffice/sal |
| 3421 |
mv $(PKGDIR)-dev-common/usr/include/libreoffice/sal/typesizes.h \ |
| 3422 |
$(PKGDIR)-dev/usr/include/$(DEB_HOST_MULTIARCH)/libreoffice/sal |
| 3423 |
cd $(PKGDIR)-dev/usr/include/libreoffice/sal/ && \ |
| 3424 |
ln -s /usr/include/$(DEB_HOST_MULTIARCH)/libreoffice/sal/typesizes.h |
| 3425 |
mkdir -p $(PKGDIR)-dev-common/$(OOSDKDIR) |
| 3426 |
mv $(PKGDIR)-dev/$(OOSDKDIR)/classes \ |
| 3427 |
$(PKGDIR)-dev-common/$(OOSDKDIR) |
| 3428 |
mv $(PKGDIR)-dev/$(OOSDKDIR)/set* \ |
| 3429 |
$(PKGDIR)-dev-common/$(OOSDKDIR) |
| 3430 |
# settings/dk.mk is not arch-indep |
| 3431 |
mkdir -p $(PKGDIR)-dev/$(OOSDKDIR)/settings |
| 3432 |
mv $(PKGDIR)-dev-common/$(OOSDKDIR)/settings/dk.mk \ |
| 3433 |
$(PKGDIR)-dev/$(OOSDKDIR)/settings |
| 3434 |
mv $(PKGDIR)-dev/$(OOSDKDIR)/config* \ |
| 3435 |
$(PKGDIR)-dev-common/$(OOSDKDIR) |
| 3436 |
mv $(PKGDIR)-dev/$(OOSDKDIR)/index.html* \ |
| 3437 |
$(PKGDIR)-dev-common/$(OOSDKDIR) |
| 3438 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3439 |
mkdir -p $(PKGDIR)-dev-common/usr/share/libreoffice/sdk |
| 3440 |
mv $(PKGDIR)-dev/usr/share/libreoffice/sdk/classes \ |
| 3441 |
$(PKGDIR)-dev-common/usr/share/libreoffice/sdk |
| 3442 |
endif |
| 3443 |
mkdir -p $(PKGDIR)-dev-common/$(OODIR)/share/glade |
| 3444 |
mv $(PKGDIR)-common/$(OODIR)/share/glade/libreoffice-catalog.xml \ |
| 3445 |
$(PKGDIR)-dev-common/$(OODIR)/share/glade |
| 3446 |
else |
| 3447 |
rm -rf $(PKGDIR)-common/$(OODIR)/share/glade |
| 3448 |
endif |
| 3449 |
ifeq "$(PACKAGE_LOKIT)" "y" |
| 3450 |
# package LibreOfficeKit headers in an own package (which was the |
| 3451 |
# case anyway before it got installed into the SDK from 24.8.0 rc2 |
| 3452 |
# onwards). |
| 3453 |
rm -rf debian/libreofficekit-dev |
| 3454 |
mkdir -p debian/libreofficekit-dev/usr/include |
| 3455 |
mv $(PKGDIR)-dev-common/usr/include/libreoffice/LibreOfficeKit \ |
| 3456 |
debian/libreofficekit-dev/usr/include |
| 3457 |
ifeq "$(BUILD_GTK3)" "y" |
| 3458 |
rm -rf debian/libreofficekit-dev-gtk |
| 3459 |
mkdir -p debian/libreofficekit-dev-gtk/usr/include/LibreOfficeKit |
| 3460 |
mv debian/libreofficekit-dev/usr/include/LibreOfficeKit/LibreOfficeKitGtk.h \ |
| 3461 |
debian/libreofficekit-dev-gtk/usr/include/LibreOfficeKit |
| 3462 |
endif |
| 3463 |
endif |
| 3464 |
|
| 3465 |
ifeq "$(PACKAGE_SDK_DOCS)" "y" |
| 3466 |
# move SDK documentation into own package |
| 3467 |
rm -rf $(PKGDIR)-dev-doc |
| 3468 |
mkdir -p $(PKGDIR)-dev-doc/usr/share/doc/libreoffice |
| 3469 |
mv $(PKGDIR)-dev/usr/share/doc/libreoffice/sdk \ |
| 3470 |
$(PKGDIR)-dev-doc/usr/share/doc/libreoffice |
| 3471 |
mkdir -p $(PKGDIR)-dev-doc/$(OOSDKDIR) |
| 3472 |
ln -sf /usr/share/doc/libreoffice/sdk/docs \ |
| 3473 |
$(PKGDIR)-dev-doc/$(OOSDKDIR)/docs |
| 3474 |
mv $(PKGDIR)-dev/$(OOSDKDIR)/examples \ |
| 3475 |
$(PKGDIR)-dev-doc/$(OOSDKDIR) |
| 3476 |
rm -f $(PKGDIR)-dev-doc/usr/share/doc/libreoffice/sdk/readme/LICENSE* |
| 3477 |
# and fix the symlink now dangling due to the move above |
| 3478 |
cd $(PKGDIR)-dev-common/$(OOSDKDIR) && \ |
| 3479 |
ln -sf /usr/share/doc/libreoffice/sdk/index.html |
| 3480 |
endif |
| 3481 |
|
| 3482 |
ifeq "$(PACKAGE_SDK)" "y" |
| 3483 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3484 |
# compat/safety symlink for SDK Java stuff moved to /usr/share |
| 3485 |
rm -f $(PKGDIR)-dev-common/$(OOSDKDIR)/classes |
| 3486 |
mkdir -p $(PKGDIR)-dev-common/$(OOSDKDIR)/classes/com/sun/star/lib/loader |
| 3487 |
cd $(PKGDIR)-dev-common/$(OOSDKDIR)/classes/com/sun/star/lib/loader && \ |
| 3488 |
for i in $(CURDIR)/$(PKGDIR)-dev-common/$(shell echo $(OOSDKDIR) | sed -e s/lib/share/)/classes/com/sun/star/lib/loader/*.class; do \ |
| 3489 |
ln -s `echo $$i | sed -e 's,$(CURDIR)/$(PKGDIR)-dev-common,,'` `basename $$i`; \ |
| 3490 |
done |
| 3491 |
endif |
| 3492 |
chmod 644 $(PKGDIR)-dev-common/$(OOSDKDIR)/configure.pl |
| 3493 |
chmod 755 $(PKGDIR)-dev-common/$(OOSDKDIR)/setsdkenv_unix |
| 3494 |
endif |
| 3495 |
|
| 3496 |
ifeq "$(ENABLE_EVO2)" "y" |
| 3497 |
mkdir -p $(PKGDIR)-evolution/$(OODIR)/presets/database |
| 3498 |
mkdir -p $(PKGDIR)-evolution/$(OODIR)/share/registry |
| 3499 |
mv $(PKGDIR)-common/$(OODIR)/presets/database/evolocal.odb \ |
| 3500 |
$(PKGDIR)-evolution/$(OODIR)/presets/database |
| 3501 |
else |
| 3502 |
rm -f $(PKGDIR)-common/$(OODIR)/presets/database/evolocal.odb |
| 3503 |
endif |
| 3504 |
|
| 3505 |
ifeq "$(PACKAGE_BASE)" "y" |
| 3506 |
mkdir -p debian/python3-access2base/$(PYTHON_SITE) |
| 3507 |
mv $(PKGDIR)-common/$(OODIR)/program/access2base.py \ |
| 3508 |
debian/python3-access2base/$(PYTHON_SITE) |
| 3509 |
else |
| 3510 |
rm -rf $(PKGDIR)-common/$(OODIR)/share/basic/Access2Base |
| 3511 |
t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc > \ |
| 3512 |
$$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc && rm -f $$t |
| 3513 |
t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc > \ |
| 3514 |
$$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc && rm -f $$t |
| 3515 |
rm -f $(PKGDIR)-common/$(OODIR)/program/access2base.py |
| 3516 |
endif |
| 3517 |
|
| 3518 |
# ScriptForge |
| 3519 |
mkdir -p debian/python3-scriptforge/$(PYTHON_SITE) |
| 3520 |
mv $(PKGDIR)-common/$(OODIR)/program/scriptforge.py \ |
| 3521 |
debian/python3-scriptforge/$(PYTHON_SITE) |
| 3522 |
mv $(PKGDIR)-common/$(OODIR)/program/scriptforge.pyi \ |
| 3523 |
debian/python3-scriptforge/$(PYTHON_SITE) |
| 3524 |
|
| 3525 |
ifeq "$(PACKAGE_SDK)" "y" |
| 3526 |
# move gengal stuff into -dev-gui |
| 3527 |
mkdir -p $(PKGDIR)-dev-gui/$(OODIR)/program |
| 3528 |
mv $(PKGDIR)-core/$(OODIR)/program/gengal.bin \ |
| 3529 |
$(PKGDIR)-dev-gui/$(OODIR)/program |
| 3530 |
mv $(PKGDIR)-common/$(OODIR)/program/gengal \ |
| 3531 |
$(PKGDIR)-dev-gui/$(OODIR)/program |
| 3532 |
else |
| 3533 |
rm -f $(PKGDIR)-core/$(OODIR)/program/gengal.bin |
| 3534 |
rm -f $(PKGDIR)-common/$(OODIR)/program/gengal |
| 3535 |
endif |
| 3536 |
|
| 3537 |
ifneq "$(ENABLE_REPORTBUILDER)" "y" |
| 3538 |
# unneeded. a no-Java arch, so the report-builder can't work anyway. |
| 3539 |
# (and we need to remove it here anyway as it otherwise would end up |
| 3540 |
# in -base/-core) |
| 3541 |
rm -rf $(PKGDIR)-report-builder |
| 3542 |
rm -f $(PKGDIR)-core/$(OODIR)/program/librpt* |
| 3543 |
else |
| 3544 |
ifeq "$(PACKAGE_BASE)" "y" |
| 3545 |
# move rpt stuff into -report-builder-bin |
| 3546 |
rm -rf $(PKGDIR)-report-builder-bin |
| 3547 |
mkdir -p $(PKGDIR)-report-builder-bin/$(OODIR)/program |
| 3548 |
# it seems that --enable/--disable-reportbuiler affects the install |
| 3549 |
# location. sigh. |
| 3550 |
if [ -e $(PKGDIR)-core/$(OODIR)/program/librptlo.so ]; then \ |
| 3551 |
i=core; else i=report-builder; fi; \ |
| 3552 |
mv $(PKGDIR)-$$i/$(OODIR)/program/librpt* \ |
| 3553 |
$(PKGDIR)-report-builder-bin/$(OODIR)/program |
| 3554 |
endif |
| 3555 |
endif |
| 3556 |
|
| 3557 |
# move uno_packages/cache to /var and create symlink for for |
| 3558 |
# documentation referencing it... |
| 3559 |
rm -rf $(PKGDIR)-common/$(OODIR)/share/uno_packages |
| 3560 |
mkdir -p $(PKGDIR)-core/var/spool/$(OODIRNAME)/uno_packages/cache |
| 3561 |
mkdir -p $(PKGDIR)-core/$(OODIR)/share/uno_packages |
| 3562 |
ln -s /var/spool/$(OODIRNAME)/uno_packages/cache \ |
| 3563 |
$(PKGDIR)-core/$(OODIR)/share/uno_packages/cache |
| 3564 |
perl -pi -e \ |
| 3565 |
's,\$$UNO_SHARED_PACKAGES/cache,file:///var/spool/$(OODIRNAME)/uno_packages/cache,g' \ |
| 3566 |
$(PKGDIR)-common/$(OODIR)/program/unorc |
| 3567 |
# What is this? unorc per default only mentiones |
| 3568 |
# share/uno_packages/cache... |
| 3569 |
rm -rf $(PKGDIR)-common/$(OODIR)/presets/uno_packages |
| 3570 |
|
| 3571 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 3572 |
ifeq (,$(filter firebird, $(SYSTEM_STUFF))) |
| 3573 |
mkdir -p $(PKGDIR)-sdbc-firebird/$(OODIR)/share |
| 3574 |
mv $(PKGDIR)-common/$(OODIR)/share/firebird \ |
| 3575 |
$(PKGDIR)-sdbc-firebird/$(OODIR)/share |
| 3576 |
endif |
| 3577 |
endif |
| 3578 |
|
| 3579 |
# move soffice.cfg files into the "correct" packages |
| 3580 |
for i in base calc draw impress math writer; do \ |
| 3581 |
mkdir -p $(PKGDIR)-uiconfig-$$i/$(OODIR)/share/config/soffice.cfg/modules; \ |
| 3582 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/modules/s$$i \ |
| 3583 |
$(PKGDIR)-uiconfig-$$i/$(OODIR)/share/config/soffice.cfg/modules; \ |
| 3584 |
if [ $$i = writer ]; then \ |
| 3585 |
for i in sweb swform swreport swxform; do \ |
| 3586 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/modules/$$i \ |
| 3587 |
$(PKGDIR)-uiconfig-writer/$(OODIR)/share/config/soffice.cfg/modules; \ |
| 3588 |
done; \ |
| 3589 |
fi; \ |
| 3590 |
if [ $$i = base ]; then \ |
| 3591 |
for i in dbapp dbbrowser dbquery dbrelation dbtable dbtdata \ |
| 3592 |
sabpilot sbibliography; do \ |
| 3593 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/modules/$$i \ |
| 3594 |
$(PKGDIR)-uiconfig-base/$(OODIR)/share/config/soffice.cfg/modules; \ |
| 3595 |
done; \ |
| 3596 |
fi; \ |
| 3597 |
done |
| 3598 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/dbaccess \ |
| 3599 |
$(PKGDIR)-uiconfig-base/$(OODIR)/share/config/soffice.cfg |
| 3600 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/writerperfect \ |
| 3601 |
$(PKGDIR)-uiconfig-writer/$(OODIR)/share/config/soffice.cfg |
| 3602 |
mkdir -p $(PKGDIR)-uiconfig-report-builder/$(OODIR)/share/config/soffice.cfg/modules |
| 3603 |
ifeq "$(ENABLE_REPORTBUILDER)" "y" |
| 3604 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/modules/dbreport \ |
| 3605 |
$(PKGDIR)-uiconfig-report-builder/$(OODIR)/share/config/soffice.cfg/modules |
| 3606 |
else |
| 3607 |
rm -rf $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg/modules/dbreport |
| 3608 |
endif |
| 3609 |
mkdir -p $(PKGDIR)-uiconfig-common/$(OODIR)/share/config/ |
| 3610 |
mv $(PKGDIR)-common/$(OODIR)/share/config/soffice.cfg \ |
| 3611 |
$(PKGDIR)-uiconfig-common/$(OODIR)/share/config |
| 3612 |
mkdir -p $(PKGDIR)-uiconfig-impress/$(OODIR)/share/config/soffice.cfg |
| 3613 |
mv $(PKGDIR)-impress/$(OODIR)/share/config/soffice.cfg/simpress \ |
| 3614 |
$(PKGDIR)-uiconfig-impress/$(OODIR)/share/config/soffice.cfg |
| 3615 |
|
| 3616 |
find debian/tmp ! -perm -200 | xargs -r chmod u+w |
| 3617 |
|
| 3618 |
touch $@ |
| 3619 |
|
| 3620 |
# |
| 3621 |
# Generate maintainer scripts |
| 3622 |
maintscripts: $(STAMP_DIR)/maintscripts |
| 3623 |
$(STAMP_DIR)/maintscripts: $(wildcard debian/shell-lib*.sh) $(wildcard debian/*.preinst.in) $(wildcard debian/*.postinst.in) $(wildcard debian/*.prerm.in) $(wildcard debian/*.postrm.in) debian/control |
| 3624 |
dh_testdir |
| 3625 |
|
| 3626 |
rm -f debian/*.{pre,post}{inst,rm} |
| 3627 |
|
| 3628 |
# generate maintainer scripts from *.in |
| 3629 |
for PKG in $(PACKAGES); do \ |
| 3630 |
for FILE in postinst postrm preinst prerm triggers config; do \ |
| 3631 |
MAINTSCRIPT=debian/$$PKG.$$FILE ; \ |
| 3632 |
if [ -e $$MAINTSCRIPT.in ]; then \ |
| 3633 |
sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' < $$MAINTSCRIPT.in | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' > $$MAINTSCRIPT; \ |
| 3634 |
if grep -q "lool" $$MAINTSCRIPT.in; then \ |
| 3635 |
cat debian/shell-lib-lool.sh >> $$MAINTSCRIPT; \ |
| 3636 |
fi; \ |
| 3637 |
if grep -E -q "(validate_extension|sync_extension)" $$MAINTSCRIPT.in; then \ |
| 3638 |
cat debian/shell-lib-extensions.sh >> $$MAINTSCRIPT; \ |
| 3639 |
fi; \ |
| 3640 |
sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' < $$MAINTSCRIPT.in | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >> $$MAINTSCRIPT; \ |
| 3641 |
perl -pi -e "s/\@LANGPACKISOS\@/$(LANGPACKISOS)/" $$MAINTSCRIPT; \ |
| 3642 |
perl -pi -e "s,\@OODIR\@,$(OODIR),g" $$MAINTSCRIPT; \ |
| 3643 |
perl -pi -e "s,\@DEB_HOST_ARCH\@,$(DEB_HOST_ARCH),g" $$MAINTSCRIPT; \ |
| 3644 |
fi; \ |
| 3645 |
done; \ |
| 3646 |
done |
| 3647 |
for iso in $(filter-out en-US,$(LANGPACKISOS)); do \ |
| 3648 |
if [ "$$iso" = "bn-IN" ]; then pkgiso=bn; \ |
| 3649 |
elif [ "$$iso" = "ca-valencia" ]; then pkgiso=ca; \ |
| 3650 |
elif [ "$$iso" = "sr-Latn" ]; then pkgiso=sr; \ |
| 3651 |
elif [ "$$iso" = "kmr-Latn" ]; then pkgiso=kmr; \ |
| 3652 |
else pkgiso=`echo $$iso | tr \[:upper:\] \[:lower:\]`; \ |
| 3653 |
fi; \ |
| 3654 |
done |
| 3655 |
|
| 3656 |
touch $@ |
| 3657 |
|
| 3658 |
# Install files generated by setup into package directories |
| 3659 |
langpacks: $(STAMP_DIR)/langpacks |
| 3660 |
$(STAMP_DIR)/langpacks: $(STAMP_DIR)/build-indep $(STAMP_DIR)/install-indep $(SOURCE_TREE)/bin/lo-xlate-lang |
| 3661 |
|
| 3662 |
# remove empty uno_packages dirs somehow in the langpacks(?) |
| 3663 |
for iso in `echo $(LANGPACKISOS) | tr A-Z a-z`; do \ |
| 3664 |
rm -rf $(PKGDIR)-l10n-$$iso/$(OODIR)/share/uno_packages; \ |
| 3665 |
done |
| 3666 |
|
| 3667 |
# remove ooo dirs somehow in the langpacks(?) |
| 3668 |
for iso in `echo $(LANGPACKISOS) | tr A-Z a-z`; do \ |
| 3669 |
rm -rf $(PKGDIR)-l10n-$$iso/$(OODIR)/share/dict/ooo; \ |
| 3670 |
done |
| 3671 |
|
| 3672 |
# remove extra license files |
| 3673 |
for iso in `echo $(LANGPACKISOS) | tr A-Z a-z`; do \ |
| 3674 |
rm -rf $(PKGDIR)-l10n-$$iso/$(OODIR)/licenses; \ |
| 3675 |
rm -f $(PKGDIR)-l10n-$$iso/$(OODIR)/share/readme/LICENSE*; \ |
| 3676 |
done |
| 3677 |
|
| 3678 |
# remove extra readme files |
| 3679 |
for iso in `echo $(LANGPACKISOS) | tr A-Z a-z`; do \ |
| 3680 |
rm -rf $(PKGDIR)-l10n-$$iso/$(OODIR)/readmes; \ |
| 3681 |
rm -f $(PKGDIR)-l10n-$$iso/$(OODIR)/share/readme/README*; \ |
| 3682 |
done |
| 3683 |
|
| 3684 |
# remove empty help directories |
| 3685 |
for iso in `echo $(LANGPACKISOS) | tr A-Z a-z`; do \ |
| 3686 |
rm -rf $(PKGDIR)-l10n-$$iso/$(shell echo $(OODIR) | sed -e s/lib/share/)/help; \ |
| 3687 |
rm -rf $(PKGDIR)-l10n-$$iso/$(OODIR)/help; \ |
| 3688 |
done |
| 3689 |
|
| 3690 |
ifeq "$(DEB_VENDOR)" "Debian" |
| 3691 |
# install Debian presentation template |
| 3692 |
otps=`cd debian/templates; echo *.otp`; \ |
| 3693 |
for iso in $(LANGPACKISOS); do \ |
| 3694 |
[ "$$iso" = "en-US" ] && continue; \ |
| 3695 |
pkgiso=`echo $$iso | tr \[:upper:\] \[:lower:\]`; \ |
| 3696 |
[ "$$pkgiso" = "bn-in" ] && pkgiso=bn; \ |
| 3697 |
[ "$$pkgiso" = "ca-valencia" ] && pkgiso=ca; \ |
| 3698 |
[ "$$pkgiso" = "sr-latn" ] && pkgiso=sr; \ |
| 3699 |
[ "$$pkgiso" = "kmr-latn" ] && pkgiso=kmr; \ |
| 3700 |
mkdir -p $(PKGDIR)-l10n-$$pkgiso/$(OODIR)/share/template/$$iso/presnt; \ |
| 3701 |
for otp in $$otps; do \ |
| 3702 |
ln -sf ../../en-US/presnt/$$otp \ |
| 3703 |
$(PKGDIR)-l10n-$$pkgiso/$(OODIR)/share/template/$$iso/presnt/$$odt; \ |
| 3704 |
done; \ |
| 3705 |
done |
| 3706 |
endif |
| 3707 |
|
| 3708 |
ifeq (he,$(findstring he,$(LANGPACKISOS))) |
| 3709 |
perl -pi -e 's#<prop oor:name="CTLSequenceChecking"><value>true</value></prop>#<prop oor:name="CTLSequenceChecking"><value>false</value></prop>#' $(PKGDIR)-l10n-he/$(OODIR)/share/registry/ctl_he.xcd |
| 3710 |
endif |
| 3711 |
|
| 3712 |
touch $@ |
| 3713 |
|
| 3714 |
# Install files generated by setup into arch-dependent package directories |
| 3715 |
install-arch: $(STAMP_DIR)/install-arch |
| 3716 |
$(STAMP_DIR)/install-arch: $(STAMP_DIR)/build-arch $(STAMP_DIR)/install-common |
| 3717 |
dh_testdir |
| 3718 |
dh_testroot |
| 3719 |
umask 022 |
| 3720 |
|
| 3721 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3722 |
mkdir -p debian/ure-java/usr/share/java |
| 3723 |
mkdir -p debian/ure-java/$(OODIR)/program/classes |
| 3724 |
mv debian/ure/$(OODIR)/program/classes/java_uno.jar \ |
| 3725 |
debian/ure-java/usr/share/java; \ |
| 3726 |
ln -sf /usr/share/java/java_uno.jar debian/ure-java/$(OODIR)/program/classes/java_uno.jar |
| 3727 |
ifeq (,$(filter java-websocket, $(SYSTEM_STUFF))) |
| 3728 |
mv debian/ure/$(OODIR)/program/classes/java_websocket.jar \ |
| 3729 |
debian/ure-java/$(OODIR)/program/classes/java_websocket.jar |
| 3730 |
endif |
| 3731 |
# remove libraries split out to extra packages |
| 3732 |
# will be installed using mh_* or jh_* in install-indep |
| 3733 |
for i in juh jurt ridl unoloader libreoffice; do \ |
| 3734 |
rm debian/ure/$(OODIR)/program/classes/$$i.jar; \ |
| 3735 |
done |
| 3736 |
for i in libjuh.so javaldx libjpipe.so libjuhx.so \ |
| 3737 |
javavendors.xml JREProperties.class \ |
| 3738 |
jvmfwk3rc libjava_uno.so; do \ |
| 3739 |
mv debian/ure/$(OODIR)/program/$$i \ |
| 3740 |
debian/ure-java/$(OODIR)/program; \ |
| 3741 |
done |
| 3742 |
endif |
| 3743 |
# and the public libs to their respective packages |
| 3744 |
for i in sal cppu; do \ |
| 3745 |
mkdir -p debian/libuno-$${i}3t64/$(OODIR)/program; \ |
| 3746 |
mkdir -p debian/libuno-$${i}3t64/usr/lib/$(DEB_HOST_MULTIARCH); \ |
| 3747 |
mv debian/ure/$(OODIR)/program/libuno_$${i}.so.3 \ |
| 3748 |
debian/libuno-$${i}3t64/$(OODIR)/program; \ |
| 3749 |
ln -sf /$(OODIR)/program/`basename libuno_$$i.so.3` debian/libuno-$${i}3t64/usr/lib/$(DEB_HOST_MULTIARCH)/`basename libuno_$$i.so.3`; \ |
| 3750 |
done |
| 3751 |
for i in salhelpergcc3 cppuhelpergcc3 purpenvhelpergcc3; do \ |
| 3752 |
mkdir -p debian/libuno-$${i}-3t64/$(OODIR)/program; \ |
| 3753 |
mkdir -p debian/libuno-$${i}-3t64/usr/lib/$(DEB_HOST_MULTIARCH); \ |
| 3754 |
mv debian/ure/$(OODIR)/program/libuno_$${i}.so.3 \ |
| 3755 |
debian/libuno-$${i}-3t64/$(OODIR)/program; \ |
| 3756 |
ln -sf /$(OODIR)/program/`basename libuno_$$i.so.3` debian/libuno-$${i}-3t64/usr/lib/$(DEB_HOST_MULTIARCH)/`basename libuno_$$i.so.3`; \ |
| 3757 |
done |
| 3758 |
# we also need libxmlreaderlo.so, libreglo.so and libunoidllo.so (libuno_cppuhelpergcc3.so.3 |
| 3759 |
# needs it) and libstorelo.so (libreglo.so needs it) |
| 3760 |
mkdir -p debian/uno-libs-private/$(OODIR)/program |
| 3761 |
for i in libxmlreaderlo.so libreglo.so libstorelo.so libunoidllo.so; do \ |
| 3762 |
mv debian/ure/$(OODIR)/program/$$i \ |
| 3763 |
debian/uno-libs-private/$(OODIR)/program; \ |
| 3764 |
done |
| 3765 |
|
| 3766 |
ifeq "$(ENABLE_EVO2)" "y" |
| 3767 |
mkdir -p -m755 $(PKGDIR)-evolution/$(OODIR)/program |
| 3768 |
mv $(PKGDIR)-gnome/$(OODIR)/program/libevoab*.so $(PKGDIR)-evolution/$(OODIR)/program |
| 3769 |
mv $(PKGDIR)-gnome/$(OODIR)/share/registry/evoab.xcd \ |
| 3770 |
$(PKGDIR)-evolution/$(OODIR)/share/registry |
| 3771 |
endif |
| 3772 |
|
| 3773 |
ifeq "$(ENABLE_GUI)" "y" |
| 3774 |
ifneq "$(PACKAGE_GEN)" "y" |
| 3775 |
rm -f $(PKGDIR)-core/$(OODIR)/program/libvclplug_genlo.so |
| 3776 |
endif |
| 3777 |
|
| 3778 |
ifeq "$(BUILD_GTK3)" "y" |
| 3779 |
# split out gtk stuff |
| 3780 |
mkdir -p $(PKGDIR)-gtk3/$(OODIR)/program/ |
| 3781 |
mkdir -p debian/liblibreofficekitgtk/$(OODIR)/program |
| 3782 |
mv $(PKGDIR)-gnome/$(OODIR)/program/*gtk3* $(PKGDIR)-gtk3/$(OODIR)/program/ |
| 3783 |
ifeq "$(ENABLE_PACKAGEKIT)" "y" |
| 3784 |
# FIXME: ended up in -gtk3 due to a bug. should it stay there or be in -gnome? |
| 3785 |
mv $(PKGDIR)-gnome/$(OODIR)/program/liblosessioninstalllo.so \ |
| 3786 |
$(PKGDIR)-gtk3/$(OODIR)/program/ |
| 3787 |
endif |
| 3788 |
mv $(PKGDIR)-core/$(OODIR)/program/liblibreofficekitgtk.so \ |
| 3789 |
debian/liblibreofficekitgtk/$(OODIR)/program |
| 3790 |
endif |
| 3791 |
ifeq "$(BUILD_GTK4)" "y" |
| 3792 |
mkdir -p $(PKGDIR)-gtk4/$(OODIR)/program/ |
| 3793 |
mv $(PKGDIR)-gnome/$(OODIR)/program/*gtk4* $(PKGDIR)-gtk4/$(OODIR)/program |
| 3794 |
mv $(PKGDIR)-core/$(OODIR)/program/libavmediagtk.so $(PKGDIR)-gtk4/$(OODIR)/program |
| 3795 |
endif |
| 3796 |
|
| 3797 |
ifeq "$(ENABLE_QT6_MULTIMEDIA)" "y" |
| 3798 |
mv $(PKGDIR)-core/$(OODIR)/program/libavmediaqt6.so $(PKGDIR)-qt6/$(OODIR)/program |
| 3799 |
endif |
| 3800 |
|
| 3801 |
endif |
| 3802 |
|
| 3803 |
ifeq "$(ENABLE_INTROSPECTION)" "y" |
| 3804 |
echo "workdir/CustomTarget/sysui/share/libreoffice/LOKDocView-0.1.typelib /usr/lib/$(DEB_HOST_MULTIARCH)/girepository-1.0" >> debian/gir1.2-lokdocview-0.1.install |
| 3805 |
dh_install -pgir1.2-lokdocview-0.1 |
| 3806 |
endif |
| 3807 |
ifeq "$(PACKAGE_LOKIT)" "y" |
| 3808 |
ifeq "$(ENABLE_INTROSPECTION)" "y" |
| 3809 |
echo "workdir/CustomTarget/sysui/share/libreoffice/LOKDocView-0.1.gir /usr/share/gir-1.0/" >> debian/libreofficekit-dev-gtk.install |
| 3810 |
endif |
| 3811 |
dh_install -plibreofficekit-dev-gtk |
| 3812 |
endif |
| 3813 |
|
| 3814 |
ifeq "$(PACKAGE_BASE)" "y" |
| 3815 |
mkdir -p $(PKGDIR)-base-core/$(OODIR)/program |
| 3816 |
mv $(PKGDIR)-base/$(OODIR)/program/libdbalo.so \ |
| 3817 |
$(PKGDIR)-base-core/$(OODIR)/program |
| 3818 |
mv $(PKGDIR)-base/$(OODIR)/program/libdbahsqllo.so \ |
| 3819 |
$(PKGDIR)-base-core/$(OODIR)/program |
| 3820 |
endif |
| 3821 |
|
| 3822 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3823 |
ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) |
| 3824 |
# link to system hsqldb |
| 3825 |
mkdir -p $(PKGDIR)-base/$(OODIR)/program/classes |
| 3826 |
ln -sf $(HSQLDB_JAR) \ |
| 3827 |
$(PKGDIR)-base/$(OODIR)/program/classes/hsqldb.jar |
| 3828 |
endif |
| 3829 |
ifneq (,$(filter java-websocket, $(SYSTEM_STUFF))) |
| 3830 |
# link to system Java Websocket to go sure someone assumes it's there |
| 3831 |
mkdir -p debian/ure-java/$(OODIR)/program/classes |
| 3832 |
ln -sf $(JAVA_WEBSOCKET_JAR) \ |
| 3833 |
debian/ure-java/$(OODIR)/program/classes/java_websocket.jar |
| 3834 |
endif |
| 3835 |
endif |
| 3836 |
|
| 3837 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3838 |
# move the officebean so into libofficebean-java (into the arch-dep |
| 3839 |
# JNI paths). the jar will be installed using mh_ ... |
| 3840 |
rm -rf debian/libofficebean-java |
| 3841 |
mkdir -p -m755 debian/libofficebean-java/usr/lib/jni |
| 3842 |
mkdir -p -m755 debian/libofficebean-java/$(OODIR)/program |
| 3843 |
mv $(PKGDIR)-core/$(OODIR)/program/libofficebean.so \ |
| 3844 |
debian/libofficebean-java/usr/lib/jni |
| 3845 |
cd debian/libofficebean-java/$(OODIR)/program && \ |
| 3846 |
ln -s /usr/lib/jni/libofficebean.so libofficebean.so |
| 3847 |
sed -e s/@version@/$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1,2,3)/ \ |
| 3848 |
< $(SOURCE_TREE)/bean/pom.officebean.xml > debian/pom.officebean.xml |
| 3849 |
# ... here. |
| 3850 |
mh_installpoms -plibofficebean-java |
| 3851 |
mh_installjar -plibofficebean-java -l debian/pom.officebean.xml instdir/program/classes/officebean.jar |
| 3852 |
# create symlink where LO expects it |
| 3853 |
mkdir -p $(CURDIR)/debian/libofficebean-java/$(OODIR)/program/classes |
| 3854 |
cd $(CURDIR)/debian/libofficebean-java/$(OODIR)/program/classes && \ |
| 3855 |
ln -s /usr/share/java/officebean.jar officebean.jar |
| 3856 |
# fix up Class-Path |
| 3857 |
jh_classpath --classpath="libreoffice.jar" \ |
| 3858 |
debian/libofficebean-java/usr/share/java/officebean.jar |
| 3859 |
endif |
| 3860 |
|
| 3861 |
mkdir -p -m755 $(PKGDIR)-base/usr/share/applications \ |
| 3862 |
$(PKGDIR)-core/usr/share/applications |
| 3863 |
|
| 3864 |
sed -i -e 's/Education;Science;//' $(PKGDIR)-math/usr/share/applications/libreoffice-math.desktop |
| 3865 |
# invalid, according to lintian. make it shut up. |
| 3866 |
for i in writer calc impress draw math base; do \ |
| 3867 |
perl -pi -e 's/Application;//; s/X-Red-Hat-Base;//; s/X-SuSE-Core-Office;//; s/X-MandrivaLinux-.*;//;' $(PKGDIR)-$$i/usr/share/applications/libreoffice-$$i.desktop; \ |
| 3868 |
done |
| 3869 |
|
| 3870 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 3871 |
# PyUNO packaging |
| 3872 |
install -d debian/python3-uno/$(PYTHON_SITE) |
| 3873 |
# prepend stuff so that it works when the module is not in LOs |
| 3874 |
# directories but in $(PYTHON_SITE). Can't be a patch (anymore) |
| 3875 |
# as otherwise the python-based unittests fail miserably. |
| 3876 |
echo "import sys, os" > debian/python3-uno/$(PYTHON_SITE)/uno.py |
| 3877 |
echo "sys.path.append('/$(OODIR)/program')" >> debian/python3-uno/$(PYTHON_SITE)/uno.py |
| 3878 |
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:/$(OODIR)/program/fundamentalrc')" >> debian/python3-uno/$(PYTHON_SITE)/uno.py |
| 3879 |
cat debian/python3-uno/$(OODIR)/program/uno.py >> debian/python3-uno/$(PYTHON_SITE)/uno.py |
| 3880 |
rm -f debian/python3-uno/$(OODIR)/program/uno.py |
| 3881 |
mv debian/python3-uno/$(OODIR)/program/unohelper.py debian/python3-uno/$(PYTHON_SITE) |
| 3882 |
touch debian/python3-uno/$(OODIR)/program/pythonloader.unorc |
| 3883 |
chmod u+w debian/python3-uno/$(OODIR)/program/pythonloader.unorc |
| 3884 |
( echo 'PYTHONHOME=file:///usr/lib/python$(PYMAJOR).$(PYMINOR)' ;\ |
| 3885 |
echo 'PYTHONPATH=$$PYTHONHOME $$PYTHONHOME/site-packages $$PYTHONHOME/lib-dynload $$PYTHONHOME/lib-tk $$ORIGIN' \ |
| 3886 |
) >> debian/python3-uno/$(OODIR)/program/pythonloader.unorc |
| 3887 |
chmod u-w debian/python3-uno/$(OODIR)/program/pythonloader.unorc |
| 3888 |
ifeq "$(ENABLE_SCRIPT_PROVIDER_PYTHON)" "y" |
| 3889 |
rm -f debian/libreoffice-script-provider-python/$(OODIR)/share/extensions/script-provider-for-python/registration/LICENSE |
| 3890 |
endif |
| 3891 |
|
| 3892 |
mkdir -p debian/python3-uno/usr/share/doc/python3-uno |
| 3893 |
cp -r $(SOURCE_TREE)/pyuno/demo \ |
| 3894 |
debian/python3-uno/usr/share/doc/python3-uno; \ |
| 3895 |
for i in $(SOURCE_TREE)/pyuno/doc/*; do \ |
| 3896 |
cp $$i debian/python3-uno/usr/share/doc/python3-uno; \ |
| 3897 |
done |
| 3898 |
cd debian/python3-uno/usr/share/doc/python3-uno && \ |
| 3899 |
find . -type d -name "CVS" | xargs -r rm -rf |
| 3900 |
endif |
| 3901 |
|
| 3902 |
# should be empty now, remove if there |
| 3903 |
rm -rf $(PKGDIR)-core/$(OODIR)/ure |
| 3904 |
|
| 3905 |
ifeq "$(PACKAGE_SDK)" "y" |
| 3906 |
# create wrapper scripts |
| 3907 |
cd $(PKGDIR)-dev/$(OOSDKDIR)/bin && \ |
| 3908 |
for i in *; do \ |
| 3909 |
mv $$i $$i.bin && \ |
| 3910 |
( \ |
| 3911 |
echo "#!/bin/sh"; \ |
| 3912 |
echo "# wrapper script for OOos SDK programs"; \ |
| 3913 |
echo ""; \ |
| 3914 |
echo 'LD_LIBRARY_PATH=/$(OODIR)/program /$(OOSDKDIR)/bin/`basename $$0`.bin "$$@"'; \ |
| 3915 |
) > $$i; \ |
| 3916 |
chmod 755 $$i; \ |
| 3917 |
done |
| 3918 |
# remove symlink, it should be in -dev-doc |
| 3919 |
cd $(PKGDIR)-dev/$(OOSDKDIR) && \ |
| 3920 |
rm docs |
| 3921 |
|
| 3922 |
rm -f $(PKGDIR)-dev/usr/share/doc/libreoffice/sdk/readme/LICENSE.gz |
| 3923 |
endif |
| 3924 |
|
| 3925 |
# remove empty resource directories |
| 3926 |
for i in draw base writer impress calc math; do \ |
| 3927 |
rm -rf $(PKGDIR)-$$i/$(OODIR)/program/resource; \ |
| 3928 |
done |
| 3929 |
|
| 3930 |
ifeq "$(ENABLE_JAVA)" "y" |
| 3931 |
mkdir -p $(PKGDIR)-sdbc-hsqldb/$(OODIR)/program/classes |
| 3932 |
mkdir -p $(PKGDIR)-sdbc-hsqldb/usr/share/libreoffice/program/classes |
| 3933 |
mkdir -p $(PKGDIR)-sdbc-hsqldb/$(OODIR)/share/registry |
| 3934 |
mv $(PKGDIR)-base/$(OODIR)/program/libhsqldb.so \ |
| 3935 |
$(PKGDIR)-sdbc-hsqldb/$(OODIR)/program |
| 3936 |
ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) |
| 3937 |
mv $(PKGDIR)-base/usr/lib/libreoffice/program/classes/hsqldb.jar \ |
| 3938 |
$(PKGDIR)-sdbc-hsqldb/usr/lib/libreoffice/program/classes |
| 3939 |
endif |
| 3940 |
for i in lib share; do \ |
| 3941 |
mv $(PKGDIR)-base/usr/$$i/libreoffice/program/classes/sdbc_hsqldb.jar \ |
| 3942 |
$(PKGDIR)-sdbc-hsqldb/usr/$$i/libreoffice/program/classes; \ |
| 3943 |
done |
| 3944 |
endif |
| 3945 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 3946 |
mkdir -p $(PKGDIR)-sdbc-firebird/$(OODIR)/program |
| 3947 |
mv $(PKGDIR)-core/$(OODIR)/program/libfirebird_sdbclo.so \ |
| 3948 |
$(PKGDIR)-sdbc-firebird/$(OODIR)/program |
| 3949 |
ifeq (,$(filter firebird, $(SYSTEM_STUFF))) |
| 3950 |
for i in libEngine12.so libfbclient.so.2; do \ |
| 3951 |
mv $(PKGDIR)-core/$(OODIR)/program/$$i \ |
| 3952 |
$(PKGDIR)-sdbc-firebird/$(OODIR)/program; \ |
| 3953 |
done |
| 3954 |
endif |
| 3955 |
endif |
| 3956 |
ifeq "$(ENABLE_MARIADB)" "y" |
| 3957 |
mkdir -p $(PKGDIR)-sdbc-mysql/$(OODIR)/program |
| 3958 |
mv $(PKGDIR)-base/$(OODIR)/program/libmysqlclo.so \ |
| 3959 |
$(PKGDIR)-sdbc-mysql/$(OODIR)/program |
| 3960 |
# FIXME. Do in scp2 |
| 3961 |
mkdir -p $(PKGDIR)-sdbc-mysql/$(OODIR)/share/registry |
| 3962 |
install -m644 instdir/share/registry/mysqlc.xcd \ |
| 3963 |
$(PKGDIR)-sdbc-mysql/$(OODIR)/share/registry |
| 3964 |
endif |
| 3965 |
|
| 3966 |
mkdir -p $(PKGDIR)-base-drivers/$(OODIR)/program |
| 3967 |
for i in `find $(PKGDIR)-base/$(OODIR)/program/ -name "*.so" \ |
| 3968 |
-a \! -name "libdbulo*" -a \! -name "libdbaxml*" -a \! -name "libdbp*" -a \! -name "libabplo.so"`; do \ |
| 3969 |
mv $$i \ |
| 3970 |
$(PKGDIR)-base-drivers/$(OODIR)/program; \ |
| 3971 |
done |
| 3972 |
|
| 3973 |
ifeq ($(ENABLE_LPSOLVE),y) |
| 3974 |
ifeq (,$(filter lpsolve, $(SYSTEM_STUFF))) |
| 3975 |
mv $(PKGDIR)-core/$(OODIR)/program/liblpsolve55.so \ |
| 3976 |
$(PKGDIR)-calc/$(OODIR)/program |
| 3977 |
endif |
| 3978 |
endif |
| 3979 |
|
| 3980 |
# remove application/vnd.apache.parquet from .desktop if parquet is |
| 3981 |
# disabled. |
| 3982 |
ifneq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 3983 |
if ! objdump -p /usr/lib/$(DEB_HOST_MULTIARCH)/liborcus-0.*so | grep NEED | grep -q parquet; then \ |
| 3984 |
sed -i "s,application/vnd.apache.parquet;,," $(PKGDIR)-calc/usr/share/applications/libreoffice-calc.desktop; \ |
| 3985 |
fi |
| 3986 |
else |
| 3987 |
# the internal orcus doesn't build with --enable-parquet-filter at all |
| 3988 |
sed -i "s,application/vnd.apache.parquet;,," $(PKGDIR)-calc/usr/share/applications/libreoffice-calc.desktop |
| 3989 |
endif |
| 3990 |
|
| 3991 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 3992 |
# create no-GUI packages |
| 3993 |
for p in $(shell dh_listpackages -a | grep nogui | grep -v libreoffice-nogui | cut -d- -f2- | sed -e s/-nogui// | xargs); do \ |
| 3994 |
rm -rf $(PKGDIR)-$$p-nogui; \ |
| 3995 |
cp -ra $(PKGDIR)-$$p $(PKGDIR)-$$p-nogui; \ |
| 3996 |
for i in $(PKGDIR)-$$p-nogui/$(OODIR)/program/*; do \ |
| 3997 |
if [ -e instdir-nogui/program/`basename $$i` ]; then \ |
| 3998 |
cp -v instdir-nogui/program/`basename $$i` \ |
| 3999 |
$(PKGDIR)-$$p-nogui/$(OODIR)/program; \ |
| 4000 |
else \ |
| 4001 |
rm -fv $(PKGDIR)-$$p-nogui/$(OODIR)/program/`basename $$i`; \ |
| 4002 |
fi; \ |
| 4003 |
done; \ |
| 4004 |
done |
| 4005 |
# remove lib*uilo.so in -nogui |
| 4006 |
find debian/libreoffice-*-nogui/$(OODIR)/program -name "lib*uilo.so" -a ! -name "libuuilo.so" \ |
| 4007 |
-a ! -name "libforuilo.so" -exec rm {} \; |
| 4008 |
rm -f debian/libreoffice-base-nogui/$(OODIR)/program/libdbulo.so |
| 4009 |
# no need to have the Extension Manager GUI |
| 4010 |
rm -f debian/libreoffice-core-nogui/$(OODIR)/program/libdeploymentgui.so |
| 4011 |
# and (no UI, so not needed) not needed .desktop files. .ui files are needed though because otherwise |
| 4012 |
# it obscurely fails (#1028290) or just crashes (https://lists.debian.org/debian-backports/2023/06/msg00000.html) :( |
| 4013 |
find debian/libreoffice-*-nogui/usr/share/applications/*.desktop -exec rm {} \; |
| 4014 |
# unneeded launchers |
| 4015 |
find debian/libreoffice-*-nogui/usr/bin/lo* -exec rm {} \; |
| 4016 |
# otherwise we get errors since the launchers are missing |
| 4017 |
find debian/libreoffice-*-nogui/usr/share/metainfo/libreoffice-*.appdata.xml -exec rm {} \; |
| 4018 |
|
| 4019 |
# OGLTrans.so is not in -impress-nogui so we don't need this either |
| 4020 |
rm -f debian/libreoffice-impress-nogui/$(OODIR)/share/registry/ogltrans.xcd |
| 4021 |
rm -f debian/libreoffice-impress-nogui/$(OODIR)/share/config/soffice.cfg/simpress/transitions-ogl.xml |
| 4022 |
rm -rf debian/libreoffice-impress-nogui/$(OODIR)/opengl |
| 4023 |
endif |
| 4024 |
|
| 4025 |
rm -f *.bug-script |
| 4026 |
for i in $(ARCH_DEP_PACKAGES); do \ |
| 4027 |
if [ -e debian/$$i.bug-script.in ]; then \ |
| 4028 |
cat debian/$$i.bug-script.in \ |
| 4029 |
| sed -e "s/@PLATFORMID@/$(PLATFORMID)/" \ |
| 4030 |
| sed -e "s/@RTL_OS@/$(RTL_OS)/" \ |
| 4031 |
| sed -e "s/@RTL_ARCH@/$(RTL_ARCH)/" \ |
| 4032 |
| sed -e "s/@OOVER@/$(OOVER)/" \ |
| 4033 |
> debian/$$i.bug-script; \ |
| 4034 |
fi ;\ |
| 4035 |
if [ -e debian/$$i.ucf ]; then \ |
| 4036 |
if [ ! -e debian/$$i.bug-script.in ]; then \ |
| 4037 |
printf "#!/bin/sh\n\n" > debian/$$i.bug-script; \ |
| 4038 |
fi ;\ |
| 4039 |
echo "ucfq $$i >&3" >> debian/$$i.bug-script; \ |
| 4040 |
fi ;\ |
| 4041 |
done |
| 4042 |
for i in $(ARCH_DEP_PACKAGES); do \ |
| 4043 |
if [ -e debian/$$i.bug-control ]; then \ |
| 4044 |
if grep -q "^report-with:" debian/$$i.bug-control; then \ |
| 4045 |
extra_packages=`grep "^report-with:" debian/$$i.bug-control | sed -e "s/^report-with: //"`; \ |
| 4046 |
for p in $$extra_packages; do \ |
| 4047 |
if [ $$i != $$p ] && [ -f debian/$$p.bug-script ] && ! echo $$added_packages | grep -q $$p && \ |
| 4048 |
! grep -q bug\/$$p\/script debian/$$i.bug-script; then \ |
| 4049 |
printf "#!/bin/sh\n" >> debian/$$i.bug-script; \ |
| 4050 |
printf "if [ -x /usr/share/bug/$$p/script ]; then /usr/share/bug/$$p/script; fi\n" >> debian/$$i.bug-script; \ |
| 4051 |
added_packages="$$added_packages $$p"; \ |
| 4052 |
fi; \ |
| 4053 |
done; \ |
| 4054 |
added_packages=; \ |
| 4055 |
fi; \ |
| 4056 |
fi; \ |
| 4057 |
done |
| 4058 |
# generate .links files from *.in |
| 4059 |
for PKG in $(ARCH_DEP_PACKAGES); do \ |
| 4060 |
LINKS=debian/$$PKG.links ; \ |
| 4061 |
if [ -e $$LINKS.in ]; then \ |
| 4062 |
sed -e "s#\@OODIR\@#$(OODIR)#g" \ |
| 4063 |
< $$LINKS.in > $$LINKS ; \ |
| 4064 |
fi; \ |
| 4065 |
done |
| 4066 |
|
| 4067 |
ifeq (,$(findstring $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) |
| 4068 |
rm -f $(PKGDIR)-core/$(OODIR)/program/libunopkgapp.so |
| 4069 |
rm -f $(PKGDIR)-core/$(OODIR)/program/unopkg.bin |
| 4070 |
rm -f $(PKGDIR)-core/$(OODIR)/program/libdeploymentgui.so |
| 4071 |
endif |
| 4072 |
|
| 4073 |
touch $@ |
| 4074 |
|
| 4075 |
# Install files generated by setup into arch-independent package directories |
| 4076 |
install-indep: $(STAMP_DIR)/install-indep |
| 4077 |
#$(STAMP_DIR)/install-indep: debian/libreoffice.install |
| 4078 |
#$(STAMP_DIR)/install-indep: debian/libreoffice.dirs |
| 4079 |
$(STAMP_DIR)/install-indep: $(STAMP_DIR)/build-indep $(STAMP_DIR)/install-common |
| 4080 |
dh_testdir |
| 4081 |
dh_testroot |
| 4082 |
|
| 4083 |
ifneq "$(shell echo $(USE_GSTREAMER) | grep -q y && echo 0)" "0" |
| 4084 |
# sound doesn't work anyway, remove the .wav files to save space |
| 4085 |
rm -rf $(PKGDIR)-common/$(OODIR)/share/gallery/sounds |
| 4086 |
rm -f $(PKGDIR)-common/$(OODIR)/share/gallery/sg9.* |
| 4087 |
endif |
| 4088 |
|
| 4089 |
rm -f $(PKGDIR)-common/$(OODIR)/program/oo_product.bmp |
| 4090 |
|
| 4091 |
# install openoffice-xlate-lang |
| 4092 |
install -d -m755 $(PKGDIR)-common/usr/share/$(OODIRNAME)/bin |
| 4093 |
install -m755 $(SOURCE_TREE)/bin/lo-xlate-lang \ |
| 4094 |
$(PKGDIR)-common/usr/share/$(OODIRNAME)/bin |
| 4095 |
|
| 4096 |
ifeq "$(ENABLE_HELP)" "n" |
| 4097 |
# when we don't build helpcontent2 here we are missing helpxsl.zip so |
| 4098 |
# this file doesn't get installed either. Do it manually.. |
| 4099 |
mkdir -p -m755 $(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/help && \ |
| 4100 |
cp $(SOURCE_TREE)/xmlhelp/util/main_transform.xsl \ |
| 4101 |
$(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/help |
| 4102 |
cp $(SOURCE_TREE)/xmlhelp/util/idxcaption.xsl \ |
| 4103 |
$(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/help |
| 4104 |
cp $(SOURCE_TREE)/xmlhelp/util/idxcontent.xsl \ |
| 4105 |
$(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/help |
| 4106 |
endif |
| 4107 |
|
| 4108 |
ifeq "$(PACKAGE_SDK)" "y" |
| 4109 |
ifeq "$(PACKAGE_SDK_DOCS)" "y" |
| 4110 |
rm -f $(PKGDIR)-dev-doc/usr/share/doc/libreoffice-dev-doc/LICENSE |
| 4111 |
perl -pi -e 's,license.html,http://www.gnu.org/licenses/lgpl.html,' \ |
| 4112 |
$(PKGDIR)-dev-doc/$(OOSDKDIR)/index.html |
| 4113 |
find $(PKGDIR)-dev-doc/$(OODIR)/sdk/examples -type f -exec chmod 644 {} \; |
| 4114 |
endif |
| 4115 |
endif |
| 4116 |
|
| 4117 |
ifeq "$(ENABLE_JAVA)" "y" |
| 4118 |
# move common Java stuff to -java-common |
| 4119 |
rm -rf $(PKGDIR)-java-common |
| 4120 |
mkdir -p $(PKGDIR)-java-common/$(OODIR)/program/classes |
| 4121 |
mkdir -p $(PKGDIR)-java-common/$(OODIR)/share/Scripts |
| 4122 |
mkdir -p $(PKGDIR)-java-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4123 |
mv $(PKGDIR)-common/$(OODIR)/share/Scripts/java \ |
| 4124 |
$(PKGDIR)-java-common/$(OODIR)/share/Scripts |
| 4125 |
# remove unoil and officebean; installed later/in install-arch by mh_* and in extra packages anyway |
| 4126 |
rm -f $(PKGDIR)-common/$(OODIR)/program/classes/unoil.jar |
| 4127 |
rm -f $(PKGDIR)-common/$(OODIR)/program/classes/officebean.jar |
| 4128 |
# and move the rest |
| 4129 |
mv $(PKGDIR)-common/$(OODIR)/program/classes/* \ |
| 4130 |
$(PKGDIR)-java-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4131 |
cd $(PKGDIR)-java-common/$(OODIR)/program/classes && \ |
| 4132 |
for i in $(CURDIR)/$(PKGDIR)-java-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/*; do \ |
| 4133 |
case "`basename $$i`" in aportisdoc.jar|pexcel.jar|pocketword.jar) continue ;; \ |
| 4134 |
*) ln -s `echo $$i | sed -e 's,$(CURDIR)/$(PKGDIR)-java-common,,'` `basename $$i` ;; esac; \ |
| 4135 |
done |
| 4136 |
|
| 4137 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 4138 |
ifeq "$(ENABLE_JUNIT4)" "y" |
| 4139 |
rm -rf $(PKGDIR)-subsequentcheckbase |
| 4140 |
mkdir -p $(PKGDIR)-subsequentcheckbase/$(OODIR)/program/classes/ |
| 4141 |
for jar in OOoRunner test test-tools ConnectivityTools; do \ |
| 4142 |
cp workdir/Jar/$$jar.jar $(PKGDIR)-subsequentcheckbase/$(OODIR)/program/classes/; \ |
| 4143 |
done |
| 4144 |
# fix Class-Path: to not include build path |
| 4145 |
jh_classpath --classpath="libreoffice.jar OOoRunner.jar file:///usr/share/java/junit4.jar "\ |
| 4146 |
$(PKGDIR)-subsequentcheckbase/$(OODIR)/program/classes/test.jar |
| 4147 |
endif |
| 4148 |
|
| 4149 |
rm -rf $(PKGDIR)-smoketest-data |
| 4150 |
mkdir -p $(PKGDIR)-smoketest-data/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4151 |
mkdir -p $(PKGDIR)-smoketest-data/$(OODIR)/program/classes |
| 4152 |
mv $(PKGDIR)-java-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/smoketest.jar \ |
| 4153 |
$(PKGDIR)-smoketest-data/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4154 |
mv $(PKGDIR)-java-common/$(OODIR)/program/classes/smoketest.jar \ |
| 4155 |
$(PKGDIR)-smoketest-data/$(OODIR)/program/classes |
| 4156 |
rm -f $(PKGDIR)-java-common/$(OODIR)/program/classes/smoketest.jar |
| 4157 |
|
| 4158 |
mkdir -p $(PKGDIR)-smoketest-data/usr/share/libreoffice |
| 4159 |
cp workdir/Extension/TestExtension.oxt \ |
| 4160 |
$(PKGDIR)-smoketest-data/usr/share/libreoffice |
| 4161 |
cp workdir/Zip/smoketestdoc.sxw \ |
| 4162 |
$(PKGDIR)-smoketest-data/usr/share/libreoffice |
| 4163 |
else |
| 4164 |
rm -f $(PKGDIR)-java-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/smoketest.jar |
| 4165 |
rm -f $(PKGDIR)-java-common/$(OODIR)/program/classes/smoketest.jar |
| 4166 |
endif |
| 4167 |
endif |
| 4168 |
|
| 4169 |
# fix permissions |
| 4170 |
chmod 644 $(PKGDIR)-common/$(OODIR)/CREDITS.fodt |
| 4171 |
# Do we really need this (ALV2 mandating it) or can this go? |
| 4172 |
chmod 644 $(PKGDIR)-common/$(OODIR)/NOTICE |
| 4173 |
|
| 4174 |
# set PYTHONPATH in unopkg |
| 4175 |
perl -pi -e 's,unset XENVIRONMENT,unset XENVIRONMENT\n\nexport PYTHONPATH=\"/$(OODIR)/program\"\n\n,' \ |
| 4176 |
$(PKGDIR)-common/$(OODIR)/program/unopkg |
| 4177 |
|
| 4178 |
mkdir -p debian/fonts-opensymbol/usr/share/fonts/truetype/libreoffice |
| 4179 |
mv $(PKGDIR)-common/$(OODIR)/share/fonts/truetype/opens___.ttf \ |
| 4180 |
debian/fonts-opensymbol/usr/share/fonts/truetype/libreoffice |
| 4181 |
# this is double-installed since https://cgit.freedesktop.org/libreoffice/core/commit/?id=25f4cc12fb59284392914c93a0ae6ad199ecc069 |
| 4182 |
rm -f $(PKGDIR)-common/$(OODIR)/program/resource/common/fonts/opens___.ttf |
| 4183 |
mkdir -p debian/fonts-opensymbol/etc/fonts/conf.d |
| 4184 |
mkdir -p debian/fonts-opensymbol/usr/share/fontconfig/conf.avail |
| 4185 |
# this only works with --without-fonts. Otherwise we get all stuff here, |
| 4186 |
# not only the Symbol->OpenSymbol part... But we don't support --with-fonts |
| 4187 |
# build here right now anyway. |
| 4188 |
mv $(PKGDIR)-common/$(OODIR)/share/fonts/truetype/fc_local.conf \ |
| 4189 |
debian/fonts-opensymbol/usr/share/fontconfig/conf.avail/30-opensymbol.conf |
| 4190 |
cd debian/fonts-opensymbol/etc/fonts/conf.d/ && \ |
| 4191 |
ln -s /usr/share/fontconfig/conf.avail/30-opensymbol.conf |
| 4192 |
|
| 4193 |
# remove extra license files |
| 4194 |
rm -rf $(PKGDIR)-common/$(OODIR)/licenses |
| 4195 |
rm -f $(PKGDIR)-common/$(OODIR)/share/readme/LICENSE* |
| 4196 |
rm -f $(PKGDIR)-common/$(OODIR)/THIRDPARTYLICENSEREADME.html |
| 4197 |
rm -f $(PKGDIR)-common/$(OODIR)/LICENSE |
| 4198 |
|
| 4199 |
# remove extra readme files |
| 4200 |
rm -rf $(PKGDIR)-common/$(OODIR)/readmes |
| 4201 |
rm -f $(PKGDIR)-common/$(OODIR)/share/readme/README* |
| 4202 |
rm -f $(PKGDIR)-common/$(OODIR)/README.html |
| 4203 |
rm -f $(PKGDIR)-common/$(OODIR)/README |
| 4204 |
|
| 4205 |
# URE got moved to /usr/lib, so this is obsolete |
| 4206 |
for i in ure/lib ure; do \ |
| 4207 |
if [ -e $(PKGDIR)-common/$(OODIR)/$$i ]; then \ |
| 4208 |
rmdir $(PKGDIR)-common/$(OODIR)/$$i; \ |
| 4209 |
fi; \ |
| 4210 |
done |
| 4211 |
|
| 4212 |
# move psprint.conf into /etc. for non-GUI it somehow is not installed |
| 4213 |
# do do it manually. FIXME: is psprint.conf still a thing? |
| 4214 |
ifeq "$(ENABLE_GUI)" "y" |
| 4215 |
mkdir -p $(PKGDIR)-common/etc/$(OODIRNAME) |
| 4216 |
mv $(PKGDIR)-common/$(OODIR)/share/psprint/psprint.conf \ |
| 4217 |
$(PKGDIR)-common/etc/$(OODIRNAME) |
| 4218 |
else |
| 4219 |
mkdir -p $(PKGDIR)-common/etc/$(OODIRNAME) |
| 4220 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/psprint |
| 4221 |
install -m644 vcl/unx/generic/printer/configuration/psprint.conf \ |
| 4222 |
$(PKGDIR)-common/etc/$(OODIRNAME) |
| 4223 |
endif |
| 4224 |
ln -s /etc/$(OODIRNAME)/psprint.conf \ |
| 4225 |
$(PKGDIR)-common/$(OODIR)/share/psprint/psprint.conf |
| 4226 |
|
| 4227 |
# prepare a fake sofficerc in the place where OOo expects it |
| 4228 |
# which does nothing except reference the "normal" one |
| 4229 |
# which we put into /etc |
| 4230 |
mkdir -p $(PKGDIR)-common/etc/$(OODIRNAME) |
| 4231 |
mv $(PKGDIR)-common/$(OODIR)/program/sofficerc \ |
| 4232 |
$(PKGDIR)-common/etc/$(OODIRNAME)/sofficerc |
| 4233 |
( \ |
| 4234 |
echo "# *DO NOT* CHANGE THIS FILE. IT ONLY TAKES THE SETTINGS FROM"; \ |
| 4235 |
echo "# /etc/$(OODIRNAME)/sofficerc. CHANGE THAT FILE IF YOU"; \ |
| 4236 |
echo "# REALLY WANT TO CHANGE SOMETHING."; \ |
| 4237 |
echo "FHS_CONFIG_FILE=file:///etc/$(OODIRNAME)/sofficerc"; \ |
| 4238 |
echo "" >> $(PKGDIR)-common/$(OODIR)/program/sofficerc; \ |
| 4239 |
) > $(PKGDIR)-common/$(OODIR)/program/sofficerc |
| 4240 |
cat $(PKGDIR)-common/etc/$(OODIRNAME)/sofficerc \ |
| 4241 |
| perl -p -e 's/(.*)=(.*)/$$1=\$${\$$FHS_CONFIG_FILE:Bootstrap:$$1}/' \ |
| 4242 |
>> $(PKGDIR)-common/$(OODIR)/program/sofficerc |
| 4243 |
# except for URE_BOOTSTRAP... |
| 4244 |
TMP=`mktemp -q`; \ |
| 4245 |
grep -v URE_BOOTSTRAP $(PKGDIR)-common/$(OODIR)/program/sofficerc > $$TMP && mv $$TMP $(PKGDIR)-common/$(OODIR)/program/sofficerc && \ |
| 4246 |
grep URE_BOOTSTRAP $(PKGDIR)-common/etc/$(OODIRNAME)/sofficerc >> $(PKGDIR)-common/$(OODIR)/program/sofficerc && \ |
| 4247 |
grep -v URE_BOOTSTRAP $(PKGDIR)-common/etc/$(OODIRNAME)/sofficerc > $$TMP && mv $$TMP $(PKGDIR)-common/etc/$(OODIRNAME)/sofficerc |
| 4248 |
|
| 4249 |
install -m 644 debian/soffice.sh \ |
| 4250 |
$(PKGDIR)-common/etc/$(OODIRNAME)/soffice.sh |
| 4251 |
|
| 4252 |
set -e; \ |
| 4253 |
for i in $(IMAGES); do \ |
| 4254 |
z=images_$$i.zip; p=$$i; \ |
| 4255 |
case "$$i" in \ |
| 4256 |
breeze*) p=breeze; ;; \ |
| 4257 |
colibre*) p=colibre; ;; \ |
| 4258 |
elementary*) p=elementary; ;; \ |
| 4259 |
karasa_jaga*) p=karasa-jaga; ;; \ |
| 4260 |
sifr*) p=sifr; ;; \ |
| 4261 |
sukapura*) p=sukapura; ;; \ |
| 4262 |
*) ;; \ |
| 4263 |
esac; \ |
| 4264 |
mkdir -p $(PKGDIR)-style-$$p/$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config; \ |
| 4265 |
mv $(PKGDIR)-common/$(OODIR)/share/config/$$z \ |
| 4266 |
$(PKGDIR)-style-$$p/$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config/; \ |
| 4267 |
mkdir -p $(PKGDIR)-style-$$p/$(OODIR)/share/config; \ |
| 4268 |
ln -s /$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config/$$z \ |
| 4269 |
$(PKGDIR)-style-$$p/$(OODIR)/share/config/$$z; \ |
| 4270 |
done |
| 4271 |
mkdir -p $(PKGDIR)-help-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config; \ |
| 4272 |
mv $(PKGDIR)-common/$(OODIR)/share/config/images_helpimg.zip \ |
| 4273 |
$(PKGDIR)-help-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config/; \ |
| 4274 |
mkdir -p $(PKGDIR)-help-common/$(OODIR)/share/config; \ |
| 4275 |
ln -s /$(shell echo $(OODIR) | sed -e s/lib/share/)/share/config/images_helpimg.zip \ |
| 4276 |
$(PKGDIR)-help-common/$(OODIR)/share/config/images_helpimg.zip; \ |
| 4277 |
|
| 4278 |
ifeq "$(DEB_VENDOR)" "Debian" |
| 4279 |
# install Debian presentation template |
| 4280 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/template/en-US/presnt |
| 4281 |
install -m644 debian/templates/*.otp $(PKGDIR)-common/$(OODIR)/share/template/en-US/presnt/ |
| 4282 |
endif |
| 4283 |
|
| 4284 |
ifeq "$(PACKAGE_SDK_DOCS)" "y" |
| 4285 |
# add symlinks for docs and examples |
| 4286 |
cd $(PKGDIR)-dev-doc/$(OOSDKDIR) && \ |
| 4287 |
rm -rf docs && \ |
| 4288 |
ln -sf /usr/share/doc/libreoffice/sdk/docs docs |
| 4289 |
endif |
| 4290 |
|
| 4291 |
ifeq "$(ENABLE_JAVA)" "y" |
| 4292 |
ifeq "$(ENABLE_SCRIPT_PROVIDER_BSH)" "y" |
| 4293 |
mkdir -p $(PKGDIR)-script-provider-bsh/$(OODIR)/share/Scripts |
| 4294 |
mv $(PKGDIR)-common/$(OODIR)/share/Scripts/beanshell \ |
| 4295 |
$(PKGDIR)-script-provider-bsh/$(OODIR)/share/Scripts |
| 4296 |
mkdir -p $(PKGDIR)-script-provider-bsh/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4297 |
mv $(PKGDIR)-script-provider-bsh/$(OODIR)/program/classes/ScriptProviderForBeanShell.jar \ |
| 4298 |
$(PKGDIR)-script-provider-bsh/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4299 |
ln -s /$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/ScriptProviderForBeanShell.jar \ |
| 4300 |
$(PKGDIR)-script-provider-bsh/$(OODIR)/program/classes |
| 4301 |
endif |
| 4302 |
|
| 4303 |
ifeq "$(ENABLE_SCRIPT_PROVIDER_JS)" "y" |
| 4304 |
mkdir -p $(PKGDIR)-script-provider-js/$(OODIR)/share/Scripts |
| 4305 |
mv $(PKGDIR)-common/$(OODIR)/share/Scripts/javascript \ |
| 4306 |
$(PKGDIR)-script-provider-js/$(OODIR)/share/Scripts |
| 4307 |
mkdir -p $(PKGDIR)-script-provider-js/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4308 |
mv $(PKGDIR)-script-provider-js/$(OODIR)/program/classes/ScriptProviderForJavaScript.jar \ |
| 4309 |
$(PKGDIR)-script-provider-js/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4310 |
ln -s /$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/ScriptProviderForJavaScript.jar \ |
| 4311 |
$(PKGDIR)-script-provider-js/$(OODIR)/program/classes |
| 4312 |
endif |
| 4313 |
|
| 4314 |
ifeq "$(ENABLE_REPORTBUILDER)" "y" |
| 4315 |
mkdir -p $(PKGDIR)-report-builder/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes |
| 4316 |
for i in reportbuilder.jar reportbuilderwizard.jar; do \ |
| 4317 |
mv $(PKGDIR)-report-builder/$(OODIR)/program/classes/$$i \ |
| 4318 |
$(PKGDIR)-report-builder/$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes; \ |
| 4319 |
ln -s /$(shell echo $(OODIR) | sed -e s/lib/share/)/program/classes/$$i \ |
| 4320 |
$(PKGDIR)-report-builder/$(OODIR)/program/classes/$$i; \ |
| 4321 |
done |
| 4322 |
endif |
| 4323 |
|
| 4324 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 4325 |
rm -f $(PKGDIR)-wiki-publisher/$(OODIR)/share/extensions/wiki-publisher/registration/LICENSE |
| 4326 |
rm -f $(PKGDIR)-wiki-publisher/$(OODIR)/share/extensions/wiki-publisher/license/THIRDPARTYLICENSEREADME.html |
| 4327 |
endif |
| 4328 |
|
| 4329 |
ifeq "$(ENABLE_NLPSOLVER)" "y" |
| 4330 |
rm -f $(PKGDIR)-nlpsolver/$(OODIR)/share/extensions/nlpsolver/registration/LICENSE |
| 4331 |
endif |
| 4332 |
endif |
| 4333 |
|
| 4334 |
# unopkg creates stuff in there. |
| 4335 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/prereg |
| 4336 |
mkdir -p $(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/usr/var/)/share/prereg/bundled |
| 4337 |
ln -s /$(shell echo $(OODIR) | sed -e s/usr/var/)/share/prereg/bundled \ |
| 4338 |
$(PKGDIR)-common/$(OODIR)/share/prereg/bundled |
| 4339 |
|
| 4340 |
# dedup |
| 4341 |
cd $(PKGDIR)-common/usr/share/icons && \ |
| 4342 |
rdfind -outputname /dev/null -makesymlinks true hicolor gnome |
| 4343 |
# should happen on dh_link, apparently didn't fix the /home/... symlinks |
| 4344 |
# so do this... |
| 4345 |
symlinks -r -s -c $(PKGDIR)-common |
| 4346 |
|
| 4347 |
# looks like it's pretty nonstandard to have symlinks; this breaks |
| 4348 |
# e.g. thegeneration from the appdata files. So get rid of those |
| 4349 |
# and move them to the libreoffice-* names after all. |
| 4350 |
mkdir -p $(PKGDIR)-common/usr/share/applications |
| 4351 |
for i in startcenter xsltfilter; do \ |
| 4352 |
rm -f $(PKGDIR)-common/usr/share/applications/libreoffice-$$i.desktop; \ |
| 4353 |
mv $(PKGDIR)-common/$(OODIR)/share/xdg/$$i.desktop \ |
| 4354 |
$(PKGDIR)-common/usr/share/applications/libreoffice-$$i.desktop; \ |
| 4355 |
done |
| 4356 |
|
| 4357 |
# fix the shebangs to make lintian happy |
| 4358 |
sed -i "s,/usr/bin/env perl,/usr/bin/perl,g" \ |
| 4359 |
$(PKGDIR)-common/usr/share/$(OODIRNAME)/bin/lo-xlate-lang |
| 4360 |
|
| 4361 |
for i in $(ARCH_INDEP_PACKAGES); do \ |
| 4362 |
if [ -e debian/$$i.bug-script.in ]; then \ |
| 4363 |
cat debian/$$i.bug-script.in \ |
| 4364 |
| sed -e "s/@PLATFORMID@/$(PLATFORMID)/" \ |
| 4365 |
> debian/$$i.bug-script; \ |
| 4366 |
fi ;\ |
| 4367 |
if [ -e debian/$$i.ucf ]; then \ |
| 4368 |
if [ ! -e debian/$$i.bug-script.in ]; then \ |
| 4369 |
printf "#!/bin/sh\n\n" > debian/$$i.bug-script; \ |
| 4370 |
fi ;\ |
| 4371 |
echo "ucfq $$i >&3" >> debian/$$i.bug-script; \ |
| 4372 |
fi ;\ |
| 4373 |
done |
| 4374 |
for i in $(ARCH_INDEP_PACKAGES); do \ |
| 4375 |
if [ -e debian/$$i.bug-control ]; then \ |
| 4376 |
if grep -q "^report-with:" debian/$$i.bug-control; then \ |
| 4377 |
extra_packages=`grep "^report-with:" debian/$$i.bug-control | sed -e "s/^report-with: //"`; \ |
| 4378 |
for p in $$extra_packages; do \ |
| 4379 |
if [ $$i != $$p ] && [ -f debian/$$p.bug-script ] && ! echo $$added_packages | grep -q $$p && \ |
| 4380 |
! grep -q bug\/$$p\/script debian/$$i.bug-script; then \ |
| 4381 |
printf "#!/bin/sh\n" >> debian/$$i.bug-script; \ |
| 4382 |
printf "if [ -x /usr/share/bug/$$p/script ]; then /usr/share/bug/$$p/script; fi\n" >> debian/$$i.bug-script; \ |
| 4383 |
added_packages="$$added_packages $$p"; \ |
| 4384 |
fi; \ |
| 4385 |
done; \ |
| 4386 |
added_packages=; \ |
| 4387 |
fi; \ |
| 4388 |
fi; \ |
| 4389 |
done |
| 4390 |
# generate .links files from *.in |
| 4391 |
for PKG in $(ARCH_INDEP_PACKAGES); do \ |
| 4392 |
LINKS=debian/$$PKG.links ; \ |
| 4393 |
if [ -e $$LINKS.in ]; then \ |
| 4394 |
sed -e "s#\@OODIR\@#$(OODIR)#g" \ |
| 4395 |
< $$LINKS.in > $$LINKS ; \ |
| 4396 |
fi; \ |
| 4397 |
done |
| 4398 |
|
| 4399 |
# install extension shell lib for use by extensions not from here |
| 4400 |
install -D -m644 debian/shell-lib-extensions.sh \ |
| 4401 |
$(PKGDIR)-common/usr/share/$(OODIRNAME)/shell-lib-extensions.sh |
| 4402 |
|
| 4403 |
ifneq "$(ENABLE_HELP)" "n" |
| 4404 |
ifneq "$(ENABLE_HTML_HELP)" "y" |
| 4405 |
# those are needed in /usr/share, too |
| 4406 |
mkdir -p $(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/) |
| 4407 |
mv $(PKGDIR)-common/$(OODIR)/help \ |
| 4408 |
$(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/) |
| 4409 |
endif |
| 4410 |
endif |
| 4411 |
# help is in /usr/share |
| 4412 |
sed -i 's,$$(instpath)/help,/$(shell echo $(OODIR) | sed -e s/lib/share/)/help,' \ |
| 4413 |
$(PKGDIR)-common/$(OODIR)/share/registry/main.xcd |
| 4414 |
|
| 4415 |
# compat dirs, the split icons thing need it |
| 4416 |
mkdir -p $(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program |
| 4417 |
mkdir -p $(PKGDIR)-common/$(shell echo $(OODIR) | sed -e s/lib/share/)/program |
| 4418 |
|
| 4419 |
# enable session handling and recovery |
| 4420 |
perl -pi -e 's,<prop oor:name="DocumentStoreUIEnabled" oor:type="xs:boolean"><value>false</value></prop>,<prop oor:name="DocumentStoreUIEnabled" oor:type="xs:boolean"><value>true</value></prop>,' $(PKGDIR)-common/$(OODIR)/share/registry/main.xcd |
| 4421 |
|
| 4422 |
# examples. move where they belong |
| 4423 |
mkdir -p $(PKGDIR)-common/usr/share/doc/libreoffice-common/examples |
| 4424 |
for i in oo-ldap.xcd.sample oo-ad-ldap.xcd.sample; do \ |
| 4425 |
mv $(PKGDIR)-common/$(OODIR)/share/registry/$$i \ |
| 4426 |
$(PKGDIR)-common/usr/share/doc/libreoffice-common/examples; \ |
| 4427 |
mkdir -p $(PKGDIR)-common/etc/libreoffice/registry; \ |
| 4428 |
ln -s /usr/share/doc/libreoffice-common/examples/$$i $(PKGDIR)-common/$(OODIR)/share/registry/$$i; \ |
| 4429 |
done |
| 4430 |
|
| 4431 |
#ifeq "$(PACKAGE_SDK)" "y" |
| 4432 |
# # install gengal stuff into -dev-gui |
| 4433 |
# mkdir -p $(PKGDIR)-dev-gui/$(OODIR)/program |
| 4434 |
# install -m644 $(SOURCE_TREE)/svx/$(shell . $(SOURCE_TREE)/bin/get_config_variables OUTPATH PROEXT; echo $$OUTPATH$$PROEXT)/bin/gengalrc \ |
| 4435 |
# $(PKGDIR)-dev-gui/$(OODIR)/program/gengalrc |
| 4436 |
#endif |
| 4437 |
|
| 4438 |
# package the Java public libraries... |
| 4439 |
ifeq "$(ENABLE_JAVA)" "y" |
| 4440 |
# somehow --has-package-version doesn't overwrite version and without <version>...</version> |
| 4441 |
# we get a NullPointerException when calling mh_installjar |
| 4442 |
for i in ridl unoloader libreoffice; do \ |
| 4443 |
sed -e s/@version@/$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1,2,3)/ \ |
| 4444 |
< $(SOURCE_TREE)/ridljar/pom.$$i.xml > debian/pom.$$i.xml; \ |
| 4445 |
done |
| 4446 |
sed -e s/@version@/$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1,2,3)/ \ |
| 4447 |
< $(SOURCE_TREE)/jurt/pom.jurt.xml > debian/pom.jurt.xml |
| 4448 |
sed -e s/@version@/$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1,2,3)/ \ |
| 4449 |
< $(SOURCE_TREE)/javaunohelper/pom.juh.xml > debian/pom.juh.xml |
| 4450 |
sed -e s/@version@/$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1,2,3)/ \ |
| 4451 |
< $(SOURCE_TREE)/unoil/pom.unoil.xml > debian/pom.unoil.xml |
| 4452 |
for i in juh jurt unoil ridl libreoffice; do \ |
| 4453 |
mh_installpoms -pliblibreoffice-java; \ |
| 4454 |
mh_installjar -pliblibreoffice-java -l debian/pom.$$i.xml instdir/program/classes/$$i.jar; \ |
| 4455 |
done |
| 4456 |
mh_installpoms -plibunoloader-java |
| 4457 |
mh_installjar -plibunoloader-java -l debian/pom.unoloader.xml instdir/program/classes/unoloader.jar |
| 4458 |
|
| 4459 |
# create symlinks where LO expects them |
| 4460 |
for i in juh jurt unoil ridl libreoffice; do \ |
| 4461 |
mkdir -p $(CURDIR)/debian/liblibreoffice-java/$(OODIR)/program/classes; \ |
| 4462 |
cd $(CURDIR)/debian/liblibreoffice-java/$(OODIR)/program/classes; \ |
| 4463 |
ln -s /usr/share/java/$$i.jar $$i.jar; \ |
| 4464 |
done |
| 4465 |
mkdir -p $(CURDIR)/debian/libunoloader-java/$(OODIR)/program/classes; \ |
| 4466 |
cd $(CURDIR)/debian/libunoloader-java/$(OODIR)/program/classes; \ |
| 4467 |
ln -s /usr/share/java/unoloader.jar unoloader.jar |
| 4468 |
|
| 4469 |
# fix up Class-Path |
| 4470 |
# make libreoffice.jar to be able to find libjpipe.so. |
| 4471 |
# See http://markmail.org/message/yacqa7oowugxwmn2 (for juh.jar back then...) |
| 4472 |
# also: javaunohelper/com/sun/star/comp/helper/Bootstrap.java: NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" ); |
| 4473 |
# seems to work nevertheless (if called from program/classes?) but fix it |
| 4474 |
# nevertheless |
| 4475 |
jh_classpath --classpath="unoloader.jar ../ /$(OODIR)/program" \ |
| 4476 |
$(CURDIR)/debian/liblibreoffice-java/usr/share/java/libreoffice.jar |
| 4477 |
endif |
| 4478 |
|
| 4479 |
ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" |
| 4480 |
mkdir -p $(PKGDIR)-common/etc/apparmor.d |
| 4481 |
./sysui/desktop/share/apparmor.sh /$(OODIR)/ sysui/desktop/apparmor/ \ |
| 4482 |
$(PKGDIR)-common/etc/apparmor.d/ false $(CHECK_APPARMOR_PROFILES) |
| 4483 |
ifneq "$(ENABLE_APPARMOR_PROFILES)" "y" |
| 4484 |
# disable the apparmor files per default |
| 4485 |
mkdir -p $(PKGDIR)-common/etc/apparmor.d/disable |
| 4486 |
cd $(PKGDIR)-common/etc/apparmor.d/disable && \ |
| 4487 |
for i in oosplash senddoc soffice.bin xpdfimport; do \ |
| 4488 |
ln -sf /etc/apparmor.d/libreoffice-$$i \ |
| 4489 |
libreoffice-$$i; \ |
| 4490 |
done |
| 4491 |
endif |
| 4492 |
endif |
| 4493 |
|
| 4494 |
# not installed if skia is disabled. Arch-indep builds disable skia for build-dep and |
| 4495 |
# speed reasons and it is supposed to end up in an arch-indep package (libreoffice-common) |
| 4496 |
# So install this manually if skia is disabled |
| 4497 |
ifneq "$(ENABLE_SKIA)" "y" |
| 4498 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/skia |
| 4499 |
install -m644 $(SOURCE_TREE)/vcl/skia/skia_denylist_vulkan.xml \ |
| 4500 |
$(PKGDIR)-common/$(OODIR)/share/skia/skia_denylist_vulkan.xml |
| 4501 |
endif |
| 4502 |
|
| 4503 |
# fix fundamentalrc to not cause |
| 4504 |
# /usr/lib/libreoffice/program/../program/xpdfimport calls |
| 4505 |
# we know the path and the apparmor profiles disallow this... |
| 4506 |
sed -i "s,^BRAND_BASE_DIR=.*,BRAND_BASE_DIR=file:///$(OODIR)," \ |
| 4507 |
$(PKGDIR)-common/$(OODIR)/program/fundamentalrc |
| 4508 |
|
| 4509 |
# make config xml "pretty" to make ucf --three-way work |
| 4510 |
t=`mktemp -q`; \ |
| 4511 |
xmllint --encode UTF-8 --pretty 1 debian/libreoffice-common/$(OODIR)/share/registry/main.xcd > $$t; \ |
| 4512 |
mv $$t debian/libreoffice-common/$(OODIR)/share/registry/main.xcd |
| 4513 |
|
| 4514 |
mkdir -p debian/libreoffice-common/$(OODIR)/share/.registry |
| 4515 |
mv debian/libreoffice-common/$(OODIR)/share/registry/main.xcd \ |
| 4516 |
debian/libreoffice-common/$(OODIR)/share/.registry/main.xcd |
| 4517 |
|
| 4518 |
# make sure we have a share/extensions dir owned by -common |
| 4519 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/extensions |
| 4520 |
|
| 4521 |
# we need a common dir here otherwise the junit tests fail. See |
| 4522 |
# https://lists.freedesktop.org/archives/libreoffice/2025-January/092950.html. |
| 4523 |
# FIXME: The question is why it doesn't end up in the install without this, though... |
| 4524 |
mkdir -p $(PKGDIR)-common/$(OODIR)/share/wordbook/common |
| 4525 |
|
| 4526 |
touch $@ |
| 4527 |
|
| 4528 |
binary-arch: $(STAMP_DIR)/binary-arch |
| 4529 |
$(STAMP_DIR)/binary-arch: $(STAMP_DIR)/prepare $(STAMP_DIR)/build-arch $(STAMP_DIR)/install-arch debian/control $(STAMP_DIR)/maintscripts |
| 4530 |
dh_testdir |
| 4531 |
dh_testroot |
| 4532 |
|
| 4533 |
for pkg in $(ARCH_DEP_PACKAGES) ; do \ |
| 4534 |
rm -f debian/$$pkg.*.debhelper;\ |
| 4535 |
rm -rf debian/$$pkg/DEBIAN;\ |
| 4536 |
done |
| 4537 |
|
| 4538 |
dh_installdocs -a -A |
| 4539 |
cp workdir/CustomTarget/readlicense_oo/readme/README_en-US \ |
| 4540 |
$(PKGDIR)-core/usr/share/doc/libreoffice-core/README |
| 4541 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4542 |
cp workdir/CustomTarget/readlicense_oo/readme/README_en-US \ |
| 4543 |
$(PKGDIR)-core-nogui/usr/share/doc/libreoffice-core-nogui/README |
| 4544 |
endif |
| 4545 |
dh_ucf -a |
| 4546 |
for i in $(ARCH_DEP_PACKAGES); do \ |
| 4547 |
if [ -e debian/$$i.postinst.debhelper ] && grep -q ucf debian/$$i.postinst.debhelper; then \ |
| 4548 |
sed -i "s/ucf\ /ucf --three-way --debconf-ok /" debian/$$i.postinst.debhelper; \ |
| 4549 |
sed -i "s/ucfr\ /ucfr --force /" debian/$$i.postinst.debhelper; \ |
| 4550 |
fi ; \ |
| 4551 |
if [ -e debian/$$i.postrm.debhelper ] && grep -q ucf debian/$$i.postrm.debhelper; then \ |
| 4552 |
sed -i "s/ucfr\ /ucfr --force /" debian/$$i.postrm.debhelper; \ |
| 4553 |
fi ; \ |
| 4554 |
done |
| 4555 |
dh_installdebconf -a |
| 4556 |
dh_installman -a |
| 4557 |
for i in writer calc draw base math impress; do \ |
| 4558 |
for i in `find $(PKGDIR)-$$i -type l -name "lo*.1"`; do \ |
| 4559 |
mv $$i $$i.gz; \ |
| 4560 |
if [ "`readlink $$i`" != "libreoffice.1.gz" ]; then \ |
| 4561 |
ln -sf libreoffice.1.gz $$i.gz; \ |
| 4562 |
fi; \ |
| 4563 |
done; \ |
| 4564 |
done |
| 4565 |
dh_installchangelogs -a -XChangeLog -k |
| 4566 |
dh_installmime -a |
| 4567 |
ifeq "$(ENABLE_PYTHON)" "y" |
| 4568 |
dh_python3 -ppython3-uno --no-ext-rename --no-guessing-deps |
| 4569 |
dh_python3 -ppython3-uno --no-ext-rename --no-guessing-deps $(OODIR)/program |
| 4570 |
endif |
| 4571 |
dh_lintian -a |
| 4572 |
dh_bugfiles -a -A |
| 4573 |
dh_link -a |
| 4574 |
ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" |
| 4575 |
for i in libuno-cppu3t64 libuno-sal3t64 libreoffice-core libreoffice-writer; do \ |
| 4576 |
rm -rf debian/.debhelper/$$i/dbgsym-root; \ |
| 4577 |
done |
| 4578 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4579 |
for i in libreoffice-core-nogui libreoffice-writer-nogui; do \ |
| 4580 |
rm -rf debian/.debhelper/$$i/dbgsym-root; \ |
| 4581 |
done |
| 4582 |
endif |
| 4583 |
ifeq "$(USE_DWZ)" "y" |
| 4584 |
dh_dwz -a $(DH_DWZ_ARGS) -- $(DWZ_ARGS) |
| 4585 |
endif |
| 4586 |
dh_strip -a |
| 4587 |
# dh_strip --dbg-package= is not idempotent, force copying of the binaries |
| 4588 |
# again... |
| 4589 |
rm -f $(STAMP_DIR)/install-common |
| 4590 |
|
| 4591 |
# install gdb helpers |
| 4592 |
mkdir -p debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR) |
| 4593 |
mv $(CURDIR)/debian/tmp/usr/share/gdb/auto-load/$(OODIR)/program \ |
| 4594 |
debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR) |
| 4595 |
mkdir -p debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/libreoffice/gdb |
| 4596 |
mv $(CURDIR)/debian/tmp/usr/share/libreoffice/gdb/libreoffice \ |
| 4597 |
debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/libreoffice/gdb |
| 4598 |
|
| 4599 |
# move sal and cppu gdb helpers into their respective packages |
| 4600 |
for i in sal cppu; do \ |
| 4601 |
mkdir -p debian/.debhelper/libuno-$${i}3t64/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program; \ |
| 4602 |
mkdir -p debian/.debhelper/libuno-$${i}3t64/dbgsym-root/usr/share/libreoffice/gdb/libreoffice; \ |
| 4603 |
mv debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program/libuno_$$i.so.3-gdb.py \ |
| 4604 |
debian/.debhelper/libuno-$${i}3t64/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program; \ |
| 4605 |
mv debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/libreoffice/gdb/libreoffice/$$i.py \ |
| 4606 |
debian/.debhelper/libuno-$${i}3t64/dbgsym-root/usr/share/libreoffice/gdb/libreoffice; \ |
| 4607 |
done |
| 4608 |
|
| 4609 |
# move sw and writerfilter gdb helpers to writer-dbgsym |
| 4610 |
mkdir -p debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program |
| 4611 |
mkdir -p debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/libreoffice/gdb/libreoffice/ |
| 4612 |
for i in sw sw_writerfilter; do \ |
| 4613 |
if [ -f debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program/lib$${i}lo.so-gdb.py ]; then \ |
| 4614 |
mv debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program/lib$${i}lo.so-gdb.py \ |
| 4615 |
debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/gdb/auto-load/$(OODIR)/program/; \ |
| 4616 |
fi; \ |
| 4617 |
mv debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/libreoffice/gdb/libreoffice/$$i.py \ |
| 4618 |
debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/libreoffice/gdb/libreoffice; \ |
| 4619 |
done |
| 4620 |
|
| 4621 |
# populate -nogui-dbgsym from the gui counterparts |
| 4622 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4623 |
mkdir -p debian/.debhelper/libreoffice-core-nogui/dbgsym-root/usr/share/gdb/auto-load/ |
| 4624 |
mkdir -p debian/.debhelper/libreoffice-core-nogui/dbgsym-root/usr/share/libreoffice/ |
| 4625 |
cp -ra debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/gdb/auto-load/$(OODIR) \ |
| 4626 |
debian/.debhelper/libreoffice-core-nogui/dbgsym-root/usr/share/gdb/auto-load/ |
| 4627 |
cp -ra debian/.debhelper/libreoffice-core/dbgsym-root/usr/share/libreoffice/gdb \ |
| 4628 |
debian/.debhelper/libreoffice-core-nogui/dbgsym-root/usr/share/libreoffice |
| 4629 |
mkdir -p debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/usr/share/gdb |
| 4630 |
mkdir -p debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/usr/share/libreoffice/ |
| 4631 |
cp -ra debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/gdb/auto-load/ \ |
| 4632 |
debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/usr/share/gdb |
| 4633 |
cp -ra debian/.debhelper/libreoffice-writer/dbgsym-root/usr/share/libreoffice/gdb \ |
| 4634 |
debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/usr/share/libreoffice |
| 4635 |
endif |
| 4636 |
else |
| 4637 |
dh_strip -a --no-automatic-dbgsym |
| 4638 |
endif |
| 4639 |
dh_fixperms -a |
| 4640 |
ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" |
| 4641 |
# dh_fixperms is not run on -dbgsym. And we get 0775 directories. Fix it |
| 4642 |
# manually |
| 4643 |
#16:29 < nthykier> _rene_: I would recommend a "find debian/.debhelper/libreoffice-core/dbgsym-root |
| 4644 |
# debian/$(UNO_LIBS_DBG_ROOT) debian/.debhelper/libreoffice-writer/dbgsym-root -exec |
| 4645 |
# chmod go=rX,u+rw,a-s {} +" |
| 4646 |
#16:29 < nthykier> Should be faster and is the same expression as used by |
| 4647 |
# dh_fixperms |
| 4648 |
find debian/.debhelper/libreoffice-core/dbgsym-root debian/.debhelper/libuno*/dbgsym-root debian/.debhelper/libreoffice-writer/dbgsym-root ! -type l -exec chmod go=rX,u+rw,a-s {} + |
| 4649 |
endif |
| 4650 |
dh_icons -a |
| 4651 |
dh_compress -a -X.py -X.mk -X.sxd |
| 4652 |
ifeq "$(ENABLE_INTROSPECTION)" "y" |
| 4653 |
dh_girepository -a -ldebian/libreofficekit-dev-gtk/usr/share/gir-1.0 -pdebian/liblibreofficekitgtk/$(OODIR)/program |
| 4654 |
endif |
| 4655 |
dh_strip_nondeterminism -a |
| 4656 |
for i in sal3 salhelpergcc3-3; do \ |
| 4657 |
cat debian/libuno-$${i}t64.symbols.in \ |
| 4658 |
| sed -e "s/@UREPACKAGEVERSION@/$(shell grep UREPACKAGEVERSION $(SOURCE_TREE)/instsetoo_native/util/openoffice.lst | awk '{ print $$2 }' | cut -d. -f1-3)/" \ |
| 4659 |
> debian/libuno-$${i}t64.symbols; \ |
| 4660 |
done |
| 4661 |
for i in sal3 cppu3 salhelpergcc3-3 cppuhelpergcc3-3 purpenvhelpergcc3-3; do \ |
| 4662 |
dh_makeshlibs -plibuno-$${i}t64 -V"libuno-$${i}t64 (>= 4:$(shell grep UREPACKAGEVERSION $(SOURCE_TREE)/instsetoo_native/util/openoffice.lst | awk '{ print $$2 }' | cut -d. -f1-3)~)" -- -c2 -V -v$(BINARY_VERSION); \ |
| 4663 |
done |
| 4664 |
dh_makeshlibs -n -pure -V"ure (>= 4:$(shell grep UREPACKAGEVERSION $(SOURCE_TREE)/instsetoo_native/util/openoffice.lst | awk '{ print $$2 }' | cut -d. -f1-3)~)" -- -d -V -v$(BINARY_VERSION) |
| 4665 |
dh_installdeb -a |
| 4666 |
rm -f debian/shlibs.local |
| 4667 |
ifeq "$(BUILD_KFREEBSD)" "y" |
| 4668 |
cat debian/shlibs.override.libc >> debian/shlibs.local |
| 4669 |
endif |
| 4670 |
# no shlibs dependencies on internal libs (which are dynamic) |
| 4671 |
ifeq (,$(filter icu, $(SYSTEM_STUFF))) |
| 4672 |
cat debian/shlibs.override.icu >> debian/shlibs.local |
| 4673 |
endif |
| 4674 |
ifeq (,$(filter libvisio, $(SYSTEM_STUFF))) |
| 4675 |
cat debian/shlibs.override.libvisio >> debian/shlibs.local |
| 4676 |
endif |
| 4677 |
ifeq (,$(filter libwpd, $(SYSTEM_STUFF))) |
| 4678 |
cat debian/shlibs.override.libwpd >> debian/shlibs.local |
| 4679 |
endif |
| 4680 |
ifeq (,$(filter libwpg, $(SYSTEM_STUFF))) |
| 4681 |
cat debian/shlibs.override.libwpg >> debian/shlibs.local |
| 4682 |
endif |
| 4683 |
ifeq (,$(filter libwps, $(SYSTEM_STUFF))) |
| 4684 |
cat debian/shlibs.override.libwps >> debian/shlibs.local |
| 4685 |
endif |
| 4686 |
ifeq (,$(filter libodfgen, $(SYSTEM_STUFF))) |
| 4687 |
cat debian/shlibs.override.libodfgen >> debian/shlibs.local |
| 4688 |
endif |
| 4689 |
ifeq (,$(filter libmwaw, $(SYSTEM_STUFF))) |
| 4690 |
cat debian/shlibs.override.libmwaw >> debian/shlibs.local |
| 4691 |
endif |
| 4692 |
ifeq (,$(filter librevenge, $(SYSTEM_STUFF))) |
| 4693 |
cat debian/shlibs.override.librevenge >> debian/shlibs.local |
| 4694 |
endif |
| 4695 |
ifeq (,$(filter libetonyek, $(SYSTEM_STUFF))) |
| 4696 |
cat debian/shlibs.override.libetonyek >> debian/shlibs.local |
| 4697 |
endif |
| 4698 |
ifeq (,$(filter libstaroffice, $(SYSTEM_STUFF))) |
| 4699 |
cat debian/shlibs.override.libstaroffice >> debian/shlibs.local |
| 4700 |
endif |
| 4701 |
ifeq (,$(filter orcus, $(SYSTEM_STUFF))) |
| 4702 |
cat debian/shlibs.override.orcus >> debian/shlibs.local |
| 4703 |
endif |
| 4704 |
ifeq (,$(filter liblangtag, $(SYSTEM_STUFF))) |
| 4705 |
cat debian/shlibs.override.liblangtag >> debian/shlibs.local |
| 4706 |
endif |
| 4707 |
ifeq "$(ENABLE_FIREBIRD)" "y" |
| 4708 |
ifneq (,$(filter firebird, $(SYSTEM_STUFF))) |
| 4709 |
# force the values of .shlibs which gives us a stricter dependency |
| 4710 |
# - e.g. (wanted) (>= 3.0.0~) - instead of .symbols which gives os only a |
| 4711 |
# (>= 2.5.0.25784~ReleaseCandidate1.ds2)... |
| 4712 |
# Also go sure on libfbclient2s upper version (see e.g. #1094284 and |
| 4713 |
# https://lists.debian.org/debian-release/2025/01/msg00708.html) |
| 4714 |
cat /var/lib/dpkg/info/libfbclient2*.shlibs \ |
| 4715 |
| sed -e "s/$$/, libfbclient2 (<< $(shell echo "$(FIREBIRD_VERSION) + 1" | bc)~)/" >> debian/shlibs.local |
| 4716 |
endif |
| 4717 |
endif |
| 4718 |
|
| 4719 |
dh_shlibdeps -a -Nlibreoffice-core-nogui -Nure \ |
| 4720 |
-Lure -Llibuno-sal3t64 -Llibpuno-cppu3t64 -Llibuno-salhelpergcc3-3t64 -Llibcppuhelpergcc3-3t64 -Llibuno-purpenvhelpergcc3-3t64 \ |
| 4721 |
-l$(CURDIR)/debian/libuno-sal3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppu3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-salhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppuhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-purpenvhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/ure/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-core/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-base-core/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-base/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-writer/$(OODIR)/program \ |
| 4722 |
$(SHLIBS_OVERRIDE) |
| 4723 |
dh_shlibdeps -pure \ |
| 4724 |
-Llibuno-sal3t64 -Llibpuno-cppu3t64 -Llibuno-salhelpergcc3-3t64 -Llibcppuhelpergcc3-3t64 -Llibuno-purpenvhelpergcc3-3t64 \ |
| 4725 |
-l$(CURDIR)/debian/libuno-sal3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppu3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-salhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppuhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-purpenvhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/ure/$(OODIR)/program \ |
| 4726 |
-- -xure |
| 4727 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4728 |
dh_shlibdeps -plibreoffice-core-nogui \ |
| 4729 |
-Lure -Llibuno-sal3t64 -Llibpuno-cppu3t64 -Llibuno-salhelpergcc3-3t64 -Llibcppuhelpergcc3-3t64 -Llibuno-purpenvhelpergcc3-3t64 \ |
| 4730 |
-l$(CURDIR)/debian/libuno-sal3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppu3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-salhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-cppuhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/libuno-purpenvhelpergcc3-3t64/$(OODIR)/program:$(CURDIR)/debian/ure/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-core-nogui/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-base-core/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-base/$(OODIR)/program:$(CURDIR)/$(PKGDIR)-writer/$(OODIR)/program \ |
| 4731 |
$(SHLIBS_OVERRIDE) |
| 4732 |
endif |
| 4733 |
ifneq (,$(filter coinmp, $(SYSTEM_STUFF))) |
| 4734 |
perl -pi -e "s/coinor-libcoinutils3v5/coinor-libcoinutils3v5 $(COINUTILS_MINVER)/" \ |
| 4735 |
debian/libreoffice-calc.substvars |
| 4736 |
perl -pi -e "s/coinor-libcoinmp1v5/coinor-libcoinmp1v5 $(COINMP_MINVER)/" \ |
| 4737 |
debian/libreoffice-calc.substvars |
| 4738 |
endif |
| 4739 |
ifeq "$(ENABLE_JAVA)" "y" |
| 4740 |
for p in $(ARCH_DEP_PACKAGES); do \ |
| 4741 |
jh_depends -p$$p -Xure -Xbase-files; \ |
| 4742 |
done |
| 4743 |
# jh_depends adds ure (${source:Version}) entries. They are overly strict |
| 4744 |
# and do not fit anyway given ure has a different versioning scheme. Excluded |
| 4745 |
# above, readd here unversioned |
| 4746 |
perl -pi -e 's/^(java:Depends.*$$)/\1, ure/' \ |
| 4747 |
debian/libofficebean-java.substvars |
| 4748 |
endif |
| 4749 |
ifneq "$(PLASMA_ARCHITECTURE)" "all" |
| 4750 |
# hack in a libreoffice-core dependency |
| 4751 |
if grep -q misc\:Depends debian/libreoffice-plasma.substvars; then \ |
| 4752 |
sed -i 's/misc:Depends=\(.*\)/misc:Depends=$1, libreoffice-core (= $${binary:Version})' \ |
| 4753 |
debian/libreoffice-plasma.substvars; \ |
| 4754 |
else \ |
| 4755 |
echo 'misc:Depends=libreoffice-core (= $${binary:Version})' \ |
| 4756 |
>> debian/libreoffice-plasma.substvars; \ |
| 4757 |
fi |
| 4758 |
endif |
| 4759 |
echo "sal-private-abi:Provides=libreoffice-sal-private-abi (= $(shell grep UREPACKAGEVERSION $(SOURCE_TREE)/instsetoo_native/util/openoffice.lst | awk '{ print $$2 }' | cut -d. -f1-3))" \ |
| 4760 |
>> debian/libuno-sal3t64.substvars |
| 4761 |
echo "salhelper-private-abi:Provides=libreoffice-salhelper-private-abi (= $(shell grep UREPACKAGEVERSION $(SOURCE_TREE)/instsetoo_native/util/openoffice.lst | awk '{ print $$2 }' | cut -d. -f1-3))" \ |
| 4762 |
>> debian/libuno-salhelpergcc3-3t64.substvars |
| 4763 |
# Generate (Static-)Built-Using |
| 4764 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 4765 |
# dh-cargo-built-using creates the substvars in debian/. Fake one so we don't need to |
| 4766 |
# do the fake target dir as below (and then throw it away again for the next one...) |
| 4767 |
# but can just run it in rust_uno |
| 4768 |
mkdir -p $(CURDIR)/rust_uno/debian |
| 4769 |
cd $(CURDIR)/rust_uno && \ |
| 4770 |
/usr/share/cargo/bin/dh-cargo-built-using libreoffice-core |
| 4771 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4772 |
cd $(CURDIR)/rust_uno && \ |
| 4773 |
/usr/share/cargo/bin/dh-cargo-built-using libreoffice-core-nogui |
| 4774 |
endif |
| 4775 |
# and add the stuff to the real file |
| 4776 |
cat $(CURDIR)/rust_uno/debian/libreoffice-core.substvars \ |
| 4777 |
>> $(CURDIR)/debian/libreoffice-core.substvars |
| 4778 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4779 |
cat $(CURDIR)/rust_uno/debian/libreoffice-core-nogui.substvars \ |
| 4780 |
>> $(CURDIR)/debian/libreoffice-core-nogui.substvars |
| 4781 |
endif |
| 4782 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 4783 |
grep Built-Using $(CURDIR)/debian/libreoffice-core.substvars \ |
| 4784 |
>> $(CURDIR)/debian/libreoffice-rust-uno-example.substvars |
| 4785 |
endif |
| 4786 |
rm -rf $(CURDIR)/rust_uno/debian |
| 4787 |
endif |
| 4788 |
ifeq "$(ENABLE_YRS)" "y" |
| 4789 |
# Symlink the build target dir to target/$(DEB_HOST_RUST_TYPE)/release |
| 4790 |
# since dh-cargo-built-using expects it there |
| 4791 |
mkdir -p $(CURDIR)/target/$(DEB_HOST_RUST_TYPE)/ |
| 4792 |
ln -s $(CURDIR)/debian/cargo_registry/yffi/target/$(DEB_HOST_RUST_TYPE)/$(CARGO_CHANNEL) target/$(DEB_HOST_RUST_TYPE)/ |
| 4793 |
/usr/share/cargo/bin/dh-cargo-built-using libreoffice-core |
| 4794 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4795 |
/usr/share/cargo/bin/dh-cargo-built-using libreoffice-core-nogui |
| 4796 |
endif |
| 4797 |
rm -rf $(CURDIR)/target |
| 4798 |
endif |
| 4799 |
dh_gencontrol -a $(DEBHELPER_OPTIONS) \ |
| 4800 |
-- \ |
| 4801 |
-V'base-version=$(BASE_VERSION)' \ |
| 4802 |
-V'oover=$(OOVER)' \ |
| 4803 |
-V'next-oover=$(NEXT_OOVER)' \ |
| 4804 |
-V'help-l10n-virtual-version=$(HELP_L10N_VIRTUAL_VERSION)' \ |
| 4805 |
-V'base-hsqldb-depends=$(BASE_HSQLDB_DEPENDS)' \ |
| 4806 |
-V'base-firebird-recommends=$(BASE_FIREBIRD_RECOMMENDS)' \ |
| 4807 |
-V'java-common-depends=$(JAVA_COMMON_DEPENDS) $(JAVA_COMMON_DEPENDS_VERSION)' \ |
| 4808 |
-V'java-runtime-depends=$(JAVA_RUNTIME_DEPENDS)' \ |
| 4809 |
-V'Binary-Version=$(BINARY_VERSION)' \ |
| 4810 |
-V'ooo-officebean-dep=$(OOO_OFFICEBEAN_DEP)' \ |
| 4811 |
-V'plasma-iconset-dep=$(PLASMA_ICONSET_DEP)' \ |
| 4812 |
-V'kf5-qt5-depends=$(KF5_QT5_DEPENDS)' \ |
| 4813 |
-V'kf6-qt6-depends=$(KF6_QT6_DEPENDS)' \ |
| 4814 |
-V'lpsolve-dep=$(LPSOLVE_DEP)' \ |
| 4815 |
-V'gstreamer-plugins-suggests=$(GSTREAMER_PLUGINS_SUGGESTS)' \ |
| 4816 |
-V'libebook-dep=$(LIBEBOOK_DEP)' \ |
| 4817 |
-V'pyuno-depends=$(PYUNO_DEPENDS)' \ |
| 4818 |
-V'gnome-gtk-recommends=$(GNOME_GTK_RECOMMENDS)' \ |
| 4819 |
-V'firebird-engine-depends=$(FIREBIRD_ENGINE_DEPENDS)' \ |
| 4820 |
-V'libsane-suggests=$(shell dpkg -S /usr/lib/$(DEB_HOST_MULTIARCH)/libsane.so.1 | cut -d: -f1)' \ |
| 4821 |
-V'liberation-fonts-recommends=$(LIBERATION_FONTS_RECOMMENDS)' \ |
| 4822 |
-V'afdko-recommends=$(AFDKO_RECOMMENDS)' \ |
| 4823 |
-v$(BINARY_VERSION) |
| 4824 |
ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" |
| 4825 |
for i in libuno-sal3t64 libuno-cppu3t64 libuno-salhelpergcc3-3t64 libuno-cppuhelpergcc3-3t64 libuno-purpenvhelpergcc3-3t64 \ |
| 4826 |
libreoffice-core libreoffice-writer; do \ |
| 4827 |
perl -pi -e 's/^(Depends:.*)/\1\nRecommends: gdb, python3-six/' \ |
| 4828 |
debian/.debhelper/$$i/dbgsym-root/DEBIAN/control; \ |
| 4829 |
done |
| 4830 |
perl -pi -e 's/Recommends: /Recommends: libreoffice-core-dbgsym, /' \ |
| 4831 |
debian/.debhelper/libreoffice-writer/dbgsym-root/DEBIAN/control |
| 4832 |
ifeq "$(BUILD_NOGUI_PACKAGES)" "y" |
| 4833 |
for i in libreoffice-core libreoffice-writer; do \ |
| 4834 |
perl -pi -e 's/^(Depends:.*)/\1\nRecommends: gdb, python3-six/' \ |
| 4835 |
debian/.debhelper/$$i-nogui/dbgsym-root/DEBIAN/control; \ |
| 4836 |
done |
| 4837 |
perl -pi -e 's/Recommends: /Recommends: libreoffice-core-nogui-dbgsym, /' \ |
| 4838 |
debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/DEBIAN/control |
| 4839 |
perl -pi -e 's/^(Recommends:.*)/Replaces: libreoffice-core-nogui-dbgsym (<< 1:6.4.3~rc1-3)\n\1/' \ |
| 4840 |
debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/DEBIAN/control |
| 4841 |
perl -pi -e 's/^(Replaces:.*)/Breaks: libreoffice-core-nogui-dbgsym (<< 1:6.4.3~rc1-3)\n\1/' \ |
| 4842 |
debian/.debhelper/libreoffice-writer-nogui/dbgsym-root/DEBIAN/control |
| 4843 |
endif |
| 4844 |
endif |
| 4845 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 4846 |
dh_gencontrol -plibreoffice-dev-dotnet -- \ |
| 4847 |
-v$(shell echo `basename instdir/sdk/dotnet/LibreOffice.Bindings*.nupkg .nupkg` | sed -e "s/LibreOffice.Bindings.//")+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4848 |
endif |
| 4849 |
ifeq "$(ENABLE_RUST_UNO)" "y" |
| 4850 |
dh_gencontrol -plibrust-rust-uno-dev -- \ |
| 4851 |
-v$(RUST_UNO_VERSION)+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4852 |
endif |
| 4853 |
|
| 4854 |
dh_md5sums -a |
| 4855 |
dh_builddeb -a $(DEBHELPER_OPTIONS) |
| 4856 |
|
| 4857 |
touch $@ |
| 4858 |
|
| 4859 |
binary-indep: $(STAMP_DIR)/binary-indep |
| 4860 |
$(STAMP_DIR)/binary-indep: $(STAMP_DIR)/prepare $(STAMP_DIR)/build-indep $(STAMP_DIR)/install-indep debian/control $(STAMP_DIR)/maintscripts $(STAMP_DIR)/langpacks |
| 4861 |
ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_JAVA_ARCHS))) |
| 4862 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4863 |
echo "For uploads with binary-all packages, please use arches where Java is enabled" |
| 4864 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4865 |
endif |
| 4866 |
#ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CLI_ARCHS))) |
| 4867 |
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4868 |
# echo "For uploads with binary-all packages, please use arches where CLI/.NET is enabled" |
| 4869 |
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4870 |
#endif |
| 4871 |
dh_testdir |
| 4872 |
ifneq ($(PACKAGE_SDK_DOCS),y) |
| 4873 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4874 |
echo "For uploads with binary-all packages, please use arches where the SDK docs are enabled!!!!" |
| 4875 |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
| 4876 |
endif |
| 4877 |
dh_testdir |
| 4878 |
dh_testroot |
| 4879 |
|
| 4880 |
for pkg in $(ARCH_INDEP_PACKAGES) ; do \ |
| 4881 |
rm -f debian/$$pkg.*.debhelper;\ |
| 4882 |
rm -rf debian/$$pkg/DEBIAN;\ |
| 4883 |
done |
| 4884 |
|
| 4885 |
dh_installdocs -i -A |
| 4886 |
cp workdir/CustomTarget/readlicense_oo/readme/README_en-US \ |
| 4887 |
$(PKGDIR)-common/usr/share/doc/libreoffice-common/README |
| 4888 |
dh_ucf -i |
| 4889 |
for i in $(ARCH_INDEP_PACKAGES); do \ |
| 4890 |
if [ -e debian/$$i.postinst.debhelper ] && grep -q ucf debian/$$i.postinst.debhelper; then \ |
| 4891 |
sed -i "s/ucf\ /ucf --three-way /" debian/$$i.postinst.debhelper; \ |
| 4892 |
sed -i "s/ucfr\ /ucfr --force /" debian/$$i.postinst.debhelper; \ |
| 4893 |
fi ; \ |
| 4894 |
if [ -e debian/$$i.postrm.debhelper ] && grep -q ucf debian/$$i.postrm.debhelper; then \ |
| 4895 |
sed -i "s/ucfr\ /ucfr --force /" debian/$$i.postrm.debhelper; \ |
| 4896 |
fi ; \ |
| 4897 |
done |
| 4898 |
dh_installman -i |
| 4899 |
for i in `find $(PKGDIR)-common -type l -name "lo*.1"`; do \ |
| 4900 |
mv $$i $$i.gz; \ |
| 4901 |
if [ "`readlink $$i`" != "libreoffice.1.gz" ]; then \ |
| 4902 |
ln -sf libreoffice.1.gz $$i.gz; \ |
| 4903 |
fi; \ |
| 4904 |
done |
| 4905 |
dh_installchangelogs -i -XChangeLog -Nlibreoffice-librelogo -k |
| 4906 |
ifeq "$(PACKAGE_LIBRELOGO)" "y" |
| 4907 |
dh_installchangelogs -plibreoffice-librelogo -k librelogo/source/ChangeLog |
| 4908 |
endif |
| 4909 |
ifeq "$(PACKAGE_SDK_DOCS)" "y" |
| 4910 |
dh_doxygen -plibreoffice-dev-doc |
| 4911 |
endif |
| 4912 |
dh_installmime -i |
| 4913 |
dh_python3 -ppython3-access2base |
| 4914 |
dh_python3 -ppython3-scriptforge |
| 4915 |
dh_python3 -plibreoffice-script-provider-python |
| 4916 |
ifeq "$(ENABLE_HELP)" "y" |
| 4917 |
ifeq "$(ENABLE_HTML_HELP)" "y" |
| 4918 |
for iso in $(shell echo $(HELPISOS) | tr A-Z a-z); do \ |
| 4919 |
sed -e s/@LCODE@/$$iso/ < debian/libreoffice-help.lintian-overrides.in \ |
| 4920 |
> debian/libreoffice-help-$$iso.lintian-overrides; \ |
| 4921 |
done |
| 4922 |
endif |
| 4923 |
endif |
| 4924 |
dh_lintian -i |
| 4925 |
dh_bugfiles -i -A |
| 4926 |
dh_link -i |
| 4927 |
dh_fixperms -i |
| 4928 |
dh_icons -i |
| 4929 |
ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" |
| 4930 |
for i in oosplash senddoc soffice.bin xpdfimport; do \ |
| 4931 |
dh_apparmor -plibreoffice-common --profile-name=libreoffice-$$i; \ |
| 4932 |
done |
| 4933 |
endif |
| 4934 |
dh_compress -i -X.py -X.mk -X.sxd -X.xcd.sample |
| 4935 |
dh_strip_nondeterminism -i |
| 4936 |
dh_installdeb -i |
| 4937 |
ifeq "$(ENABLE_JAVA)" "y" |
| 4938 |
for p in $(ARCH_INDEP_PACKAGES); do \ |
| 4939 |
if echo "$$p" | grep -q help; then continue; fi; \ |
| 4940 |
jh_depends -p$$p \ |
| 4941 |
-Xlibreoffice-report-builder -Xbase-files; \ |
| 4942 |
done |
| 4943 |
endif |
| 4944 |
ifeq (,$(filter rhino, $(SYSTEM_STUFF))) |
| 4945 |
# jh_depends adds a librhino-java Depends where we still use internal rhino |
| 4946 |
perl -pi -e "s/librhino-java//" \ |
| 4947 |
debian/libreoffice-script-provider-js.substvars |
| 4948 |
endif |
| 4949 |
ifeq "$(BUILD_TEST_PACKAGES)" "y" |
| 4950 |
perl -pi -e 's/junit4/junit4 $(JUNIT_MIN_VER)/' \ |
| 4951 |
debian/libreoffice-subsequentcheckbase.substvars |
| 4952 |
endif |
| 4953 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 4954 |
# noop, since not signed/versioned |
| 4955 |
#dh_makeclilibs -i |
| 4956 |
# nothing to depend on, dotnet-sdk-8.0 has no clideps and so no dep info |
| 4957 |
# for net itself |
| 4958 |
# And dh_makeclilibs doesn't create a .clilibs for our libs either |
| 4959 |
#dh_clideps -i |
| 4960 |
# hack in until dh_clideps works (see above). This is according to the generated .csproj |
| 4961 |
# ProjectReference |
| 4962 |
echo "cli:Depends=libuno-net-basetypes-cil" >> debian/libuno-net-uretypes-cil.substvars |
| 4963 |
echo "cli:Depends=libuno-net-uretypes-cil" >> debian/libuno-net-oootypes-cil.substvars |
| 4964 |
echo "cli:Depends=libuno-net-uretypes-cil" >> debian/ure-dotnet.substvars |
| 4965 |
endif |
| 4966 |
dh_gencontrol -i $(DEBHELPER_OPTIONS) \ |
| 4967 |
-Nfonts-opensymbol -- \ |
| 4968 |
-V'base-version=$(BASE_VERSION)' \ |
| 4969 |
-V'oover=$(OOVER)' \ |
| 4970 |
-V'next-oover=$(NEXT_OOVER)' \ |
| 4971 |
-V'help-l10n-virtual-version=$(HELP_L10N_VIRTUAL_VERSION)' \ |
| 4972 |
-V'java-common-depends=$(JAVA_COMMON_DEPENDS)' \ |
| 4973 |
-V'java-runtime-depends=$(JAVA_RUNTIME_DEPENDS)' \ |
| 4974 |
-V'textcat-data-recommends=$(TEXTCAT_DATA_RECOMMENDS)' \ |
| 4975 |
-V'numbertext-data-recommends=$(NUMBERTEXT_DATA_RECOMMENDS)' \ |
| 4976 |
-V'pyuno-depends=$(PYUNO_DEPENDS)' \ |
| 4977 |
-V'help-depends=$(HELP_DEPENDS)' \ |
| 4978 |
-V'help-recommends=$(HELP_RECOMMENDS)' \ |
| 4979 |
-V'help-common-depends=$(HELP_COMMON_DEPENDS)' \ |
| 4980 |
-V'report-builder-jar-depends=$(REPORT_BUILDER_JAR_DEPENDS)' \ |
| 4981 |
-V'liberation2-font-recommends=$(LIBERATION2_FONT_RECOMMENDS)' \ |
| 4982 |
-V'Binary-Version=$(BINARY_VERSION)' \ |
| 4983 |
-v$(BINARY_VERSION) |
| 4984 |
dh_gencontrol -pfonts-opensymbol -- \ |
| 4985 |
-v`echo $(BINARY_VERSION) | cut -d: -f1`:$(shell fontforge -lang=ff -c 'Open($$1); Print ($$fontversion); Quit(0);' debian/fonts-opensymbol/usr/share/fonts/truetype/libreoffice/opens___.ttf)+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4986 |
ifeq "$(ENABLE_DOTNET)" "y" |
| 4987 |
dh_gencontrol -plibuno-net-basetypes-cil -- \ |
| 4988 |
-v$(shell grep Version net_ure/DotnetLibrary_net_basetypes.mk | sed -e 's,.*<Version>\(.*\)</Version>.*,\1,')+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4989 |
dh_gencontrol -plibuno-net-oootypes-cil -- \ |
| 4990 |
-v$(shell grep Version net_ure/DotnetLibrary_net_oootypes.mk | sed -e 's,.*<Version>\(.*\)</Version>.*,\1,')+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4991 |
dh_gencontrol -plibuno-net-uretypes-cil -- \ |
| 4992 |
-v$(shell grep Version net_ure/DotnetLibrary_net_uretypes.mk | sed -e 's,.*<Version>\(.*\)</Version>.*,\1,')+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4993 |
endif |
| 4994 |
ifeq "$(ENABLE_MEDIAWIKI)" "y" |
| 4995 |
dh_gencontrol -plibreoffice-wiki-publisher -- \ |
| 4996 |
-V'java-common-depends=$(JAVA_COMMON_DEPENDS)' \ |
| 4997 |
-V'java-runtime-depends=$(JAVA_RUNTIME_DEPENDS)' \ |
| 4998 |
-v`echo $(BINARY_VERSION) | cut -d: -f1`:$(shell grep "<version" $(SOURCE_TREE)/swext/mediawiki/src/description.xml | perl -pi -e 's,<version value=\"(.*)\"/>,\1,; s/^\s+//')+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 4999 |
endif |
| 5000 |
ifeq "$(ENABLE_NLPSOLVER)" "y" |
| 5001 |
dh_gencontrol -plibreoffice-nlpsolver -- \ |
| 5002 |
-V'java-common-depends=$(JAVA_COMMON_DEPENDS)' \ |
| 5003 |
-V'java-runtime-depends=$(JAVA_RUNTIME_DEPENDS)' \ |
| 5004 |
-v`echo $(BINARY_VERSION) | cut -d: -f1`:$(shell grep "<version" $(SOURCE_TREE)/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/description.xml | perl -pi -e 's,<version value=\"(.*)\"/>,\1,; s/^\s+//')+LibO`echo $(BINARY_VERSION) | cut -d: -f2` |
| 5005 |
endif |
| 5006 |
dh_md5sums -i |
| 5007 |
dh_builddeb -i $(DEBHELPER_OPTIONS) |
| 5008 |
|
| 5009 |
touch $@ |
| 5010 |
|
| 5011 |
binary: binary-arch binary-indep |
| 5012 |
|
| 5013 |
ifeq "$(USE_GIT_TARBALLS)" "y" |
| 5014 |
# $(1) is the upstream name of the repo |
| 5015 |
# $(2) is the name of the tarball |
| 5016 |
# $(3) is the path to archive (empty for everything) |
| 5017 |
# |
| 5018 |
# according to policy get-orig-source has to download to the current dir, thus |
| 5019 |
# should not require a dh_testdir. However, like this we can have clean deps |
| 5020 |
# from build and download the source, configure, build, pack in on piece. As |
| 5021 |
# get-orig-source is an optional target anyway, we stick to support only this |
| 5022 |
# case and not random dirs. see also: debian bug 494141 |
| 5023 |
# also, we need to run configure to create the external tarball anyway |
| 5024 |
|
| 5025 |
GIT_INSTALLED:=$(shell which git >/dev/null 2>/dev/null && echo "y") |
| 5026 |
|
| 5027 |
get_orig_tarball=$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig$(1).tar.xz |
| 5028 |
|
| 5029 |
define pack_gittarball |
| 5030 |
$(if $(GIT_INSTALLED),,$(error You need git.)) |
| 5031 |
dh_testdir |
| 5032 |
TMPD=`mktemp -d $(if $(TMP),-p $(TMP))` && \ |
| 5033 |
mkdir $${TMPD}/archive && \ |
| 5034 |
git clone --bare $(GIT_BASEURL)/$(1) $${TMPD}/repo -b $(GIT_BRANCH) && \ |
| 5035 |
git archive --remote $${TMPD}/repo --format=tar --prefix libreoffice-$(DEB_VERSION_UPSTREAM)/ $(GIT_TAG) |tar x -C $${TMPD}/archive && \ |
| 5036 |
tar cvJf $(2) -C $${TMPD}/archive/$(3) --transform 's,./,,' . && \ |
| 5037 |
rm -rf $${TMPD} |
| 5038 |
endef |
| 5039 |
|
| 5040 |
define unpack_gittarball |
| 5041 |
dh_testdir |
| 5042 |
mkdir -p $(CURDIR)/$(1) |
| 5043 |
test -f $(CURDIR)/$(1)/.gitignore || tar xvJf $(2) -C $(CURDIR)/$(1) $(3) |
| 5044 |
endef |
| 5045 |
|
| 5046 |
ifneq ($(filter get-orig-source unpack,$(MAKECMDGOALS)),) |
| 5047 |
$(call get_orig_tarball): |
| 5048 |
$(call pack_gittarball,core,$@,) |
| 5049 |
|
| 5050 |
$(call get_orig_tarball,-helpcontent2): |
| 5051 |
$(call pack_gittarball,help,$@,libreoffice-$(DEB_VERSION_UPSTREAM)/) |
| 5052 |
|
| 5053 |
$(call get_orig_tarball,-%): |
| 5054 |
$(call pack_gittarball,$*,$@,libreoffice-$(DEB_VERSION_UPSTREAM)/) |
| 5055 |
|
| 5056 |
# Get upstream external sources |
| 5057 |
$(call get_orig_tarball,-tarballs): helpcontent2/makefile.pmk translations/makefile.mk .gitignore |
| 5058 |
dh_testdir |
| 5059 |
rm -rf tarballs |
| 5060 |
mkdir -p tarballs |
| 5061 |
quilt push -a |
| 5062 |
./autogen.sh $(filter-out --disable-fetch-external,$(CONFIGURE_FLAGS)) --with-all-tarballs |
| 5063 |
$(MAKE) download gb_LO_VER=$(DEB_VERSION_UPSTREAM) |
| 5064 |
tar cvJf $@ -C tarballs --transform 's,./,,' . |
| 5065 |
|
| 5066 |
# using flag files for unpacking |
| 5067 |
.gitignore: $(call get_orig_tarball) |
| 5068 |
$(call unpack_gittarball,,$<,--strip-components=1) |
| 5069 |
|
| 5070 |
translations/makefile.mk: $(call get_orig_tarball,-translations) |
| 5071 |
$(call unpack_gittarball,translations,$<,) |
| 5072 |
|
| 5073 |
helpcontent2/makefile.pmk: $(call get_orig_tarball,-helpcontent2) |
| 5074 |
$(call unpack_gittarball,helpcontent2,$<,) |
| 5075 |
|
| 5076 |
tarballs/fetch.log: $(call get_orig_tarball,-tarballs) patched |
| 5077 |
$(call unpack_gittarball,tarballs,$<,) |
| 5078 |
|
| 5079 |
get-orig-source: $(call get_orig_tarball,-tarballs) tarballs/fetch.log |
| 5080 |
dh_testdir |
| 5081 |
|
| 5082 |
unpack: tarballs/fetch.log |
| 5083 |
dh_testdir |
| 5084 |
endif |
| 5085 |
endif |
| 5086 |
|
| 5087 |
ifeq "$(USE_SOURCE_TARBALLS)" "y" |
| 5088 |
get-orig-source: |
| 5089 |
uscan --watchfile=$(CURDIR)/debian/watch --verbose --force |
| 5090 |
endif |
| 5091 |
|
| 5092 |
.PHONY: control |
| 5093 |
.PHONY: clean-debdir clean-instsetoo clean-objectdirs clean default |
| 5094 |
.PHONY: prepare build build-indep build-arch install-arch install-indep |
| 5095 |
.PHONY: get-orig-source unpack patched |
| 5096 |
.PHONY: $(stampdir_targets) |
| 5097 |
|
| 5098 |
# vim:set noet ai sts=8 sw=8 tw=0: |