summaryrefslogtreecommitdiff
path: root/sysui/CustomTarget_deb.mk
blob: 8a48894177aa4677b30d87a4cb1cb50564a791c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

include $(SRCDIR)/sysui/productlist.mk

deb_WORKDIR := $(call gb_CustomTarget_get_workdir,sysui/deb)
deb_SRCDIR := $(SRCDIR)/sysui/desktop/debian

$(eval $(call gb_CustomTarget_CustomTarget,sysui/deb))

$(eval $(call gb_CustomTarget_register_targets,sysui/deb,\
$(foreach product,$(PRODUCTLIST),\
	$(product)-desktop-integration.tar.gz \
	$(product)/DEBIAN/control \
	$(product)/DEBIAN/postinst \
	$(product)/DEBIAN/postrm \
	$(product)/DEBIAN/prerm \
	$(product)$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb) \
))

$(deb_WORKDIR)/%-desktop-integration.tar.gz: $(deb_WORKDIR)/%$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb
	$(GNUTAR) -C $(deb_WORKDIR) -cf - $(notdir $<) | gzip > $@

$(deb_WORKDIR)/%/DEBIAN/postrm: $(deb_SRCDIR)/postrm
	cat $< | tr -d "\015" | \
		sed 's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@

$(deb_WORKDIR)/%/DEBIAN/postinst: $(deb_SRCDIR)/postinst
	cat $< | tr -d "\015" | \
		sed 's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@

$(deb_WORKDIR)/%/DEBIAN/prerm: $(deb_SRCDIR)/prerm
	cat $< | tr -d "\015" | \
		sed 's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@

$(deb_WORKDIR)/%/DEBIAN/control: $(deb_SRCDIR)/control $(call gb_CustomTarget_get_workdir,sysui/share)/%/create_tree.sh
	mkdir -p $(deb_WORKDIR)/$*/usr/lib/menu
	cd $(call gb_CustomTarget_get_workdir,sysui/share)/$* \
		&& DESTDIR=$(deb_WORKDIR)/$* \
		ICON_PREFIX=$(UNIXFILENAME.$*) \
		KDEMAINDIR=/usr \
		GNOMEDIR=/usr \
		PREFIXDIR=/usr \
		./create_tree.sh
	sed $(deb_SRCDIR)/openoffice.org-debian-menus \
		-e 's/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION)/' \
		-e 's/%PREFIX/$(UNIXFILENAME.$*)/' \
		-e 's/%ICONPREFIX/$(UNIXFILENAME.$*)/' \
		> $(deb_WORKDIR)/$*/usr/lib/menu/$*$(PKGVERSIONSHORT)
	echo "Package: $*$(PKGVERSIONSHORT)-debian-menus" >$@
	cat $< | tr -d "\015" | \
		sed 's/%productname/$(PRODUCTNAME.$*) $(PRODUCTVERSION)/' \
		>> $@
	echo "Version: $(PKGVERSION)-$(LIBO_VERSION_PATCH)" >>$@
	du -k -s $(deb_WORKDIR)/$* | $(gb_AWK) -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >>$@

$(deb_WORKDIR)/%$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb: $(deb_WORKDIR)/%/DEBIAN/postrm $(deb_WORKDIR)/%/DEBIAN/postinst $(deb_WORKDIR)/%/DEBIAN/prerm $(deb_WORKDIR)/%/DEBIAN/control $(call gb_Library_get_target,getuid)

	chmod -R g-w $(deb_WORKDIR)/$*
	chmod a+rx $(deb_WORKDIR)/$*/DEBIAN \
		$(deb_WORKDIR)/$*/DEBIAN/pre* $(deb_WORKDIR)/$*/DEBIAN/post*
	chmod g-s $(deb_WORKDIR)/$*/DEBIAN
	LD_PRELOAD=$(call gb_Library_get_target,getuid) \
		   dpkg-deb --build $(deb_WORKDIR)/$* $@

# vim: set noet sw=4 ts=4:
ngs/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2021-06-03HtmlWriter: add end tag checking and helper for attribute writingTomaž Vajngerl Added an input variable to end to enter the name of which variable is ending. This is to check that the expected end tag is actually written. Added writeAttribute, which is independent from HtmlWriter and just writes the HTML attribute format to the stream. Change-Id: Ib00a4a37354cd1cb1781ba729ed4046a966e1eb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116629 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2021-04-27use more string_view in tools/streamNoel Grandin Change-Id: I2a957cd72d71fea717734488cdb3670e0bcdd6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann ...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-04-23loplugin:singlevalfields improve unaryoperatorNoel Grandin when we see a unaryoperator, unless it's one of a small set, we can know (mostly) that the field will not be written. there is still a small risk of false+ with code taking references via conditional expressions. Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e Reviewed-on: https://gerrit.libreoffice.org/53263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-03-08svtools: allow writing characters with HtmlWriterMiklos Vajna The sw HTML image export already uses HtmlWriter, so need to extend this to support XHTML alternate text, writing the character data directly is not an option. Change-Id: Iac3f2b9a3828175a5f1d0fb14ab505f8de389e52 Reviewed-on: https://gerrit.libreoffice.org/50965 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> 2018-02-28sw HTML export: allow custom XHTML namespace aliasMiklos Vajna This helps in case the HTML filter expected to produce an XHTML fragment that has an explicit namespace alias for <http://www.w3.org/1999/xhtml>. This only has an effect when HtmlWriter is used to write elements, though. Change-Id: I161caf4bb6bc6d0c21a7a67433b08bb060b447f1 Reviewed-on: https://gerrit.libreoffice.org/50448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2016-09-16loplogin:singlevalfields in include/Noel Grandin Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-03-09loplugin:constantparam in svtoolsNoel Grandin Change-Id: Ica82c2758030729ee0d1480c16720cf6c8fed487 2016-02-08loplugin:unusedmethodsNoel Grandin using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2015-10-27Reduce scope of #include <tools/stream.hxx>Matteo Casalin Change-Id: I0752cbb0cb2e0f89607d81d9eda7ce7091449fd6 2014-09-22Extend HTMLWriter: flush the stack, more values for attribute(..)Tomaž Vajngerl Change-Id: I733426ba5f82ee25751387f88942dbc66689821d 2014-04-06WaE: passing OString by value, rather pass by referenceTor Lillqvist Change-Id: I41a318b8376ae3e68701ffe6ebc745bdbec62dc8 2014-04-06HtmlWriter: add prettyPrint option, instance variablesTomaž Vajngerl Change-Id: I6a29e91cc2f328ccbd01b617b39dc9275332d1f0 2014-04-06svtools: HtmlWriter - for writing HTML structure to a streamTomaž Vajngerl HtmlWriter is used to write the structure of a HTML document to a stream. The goal is to abstract the messy construction of strings when writing attributes of a html element and other HTML specifics needed when structuring a HTML document. Change-Id: Ibdf42914e43ef02f16a43e4230575ed7340e68d8