summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-10-31 00:15:51 +0100
committerMichael Stahl <mstahl@redhat.com>2013-10-31 10:42:24 +0100
commit704451d95d7b1c32f0e623bde5b4de4236ff9579 (patch)
tree9fb2fd2466d93104302c7e3adea44e8447f8ac4b
parentgbuild: remove unused gb_Helper_make_outdir_clean_target (diff)
downloadcore-704451d95d7b1c32f0e623bde5b4de4236ff9579.tar.gz
core-704451d95d7b1c32f0e623bde5b4de4236ff9579.zip
gbuild: add ExtensionPackage class
Change-Id: I65ca50ccc512e35a5b95c2482f3a8833d1a7294b
-rw-r--r--Makefile.in1
-rw-r--r--instsetoo_native/util/openoffice.lst.in4
-rw-r--r--solenv/gbuild/ExtensionPackage.mk53
-rw-r--r--solenv/gbuild/TargetLocations.mk3
-rw-r--r--solenv/gbuild/gbuild.mk1
5 files changed, 60 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index a3af10711ddc..00b1531a852f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,7 @@ gbuild_TARGETS := AllLangHelp \
Dictionary \
Executable \
Extension \
+ ExtensionPackage \
ExternalPackage \
ExternalProject \
GeneratedPackage \
diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 24df6ece1da9..e179c980e739 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -78,7 +78,7 @@ LibreOffice
downloadname LibreOffice_{productversion}_{os}_install_{languages}
langpackdownloadname LibreOffice_{productversion}_languagepack_{os}_install_{languages}
helppackdownloadname LibreOffice_{productversion}_helppack_{os}_install_{languages}
- include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
+ include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
}
}
@@ -131,7 +131,7 @@ LibreOffice_Dev
downloadname LibreOfficeDev_{productversion}_{os}_install_{languages}
langpackdownloadname LibreOfficeDev_{productversion}_languagepack_{os}_install_{languages}
helppackdownloadname LibreOfficeDev_{productversion}_helppack_{os}_install_{languages}
- include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
+ include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
}
}
diff --git a/solenv/gbuild/ExtensionPackage.mk b/solenv/gbuild/ExtensionPackage.mk
new file mode 100644
index 000000000000..34a9bd418fb3
--- /dev/null
+++ b/solenv/gbuild/ExtensionPackage.mk
@@ -0,0 +1,53 @@
+# -*- 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/.
+#
+
+# ExtensionPackage class
+#
+# Unpacks a binary .oxt file into the instdir extension directory and
+# writes a file-list.
+
+$(call gb_ExtensionPackage_get_clean_target,%) :
+ $(call gb_Output_announce,$*,$(false),OXP,3)
+ $(call gb_Helper_abbreviate_dirs,\
+ rm -rf $(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/$* \
+ $(call gb_ExtensionPackage_get_target,$*))
+
+$(call gb_ExtensionPackage_get_preparation_target,%) :
+ mkdir -p $(dir $@) && touch $@
+
+$(call gb_ExtensionPackage_get_target,%) :
+ $(call gb_Output_announce,$*,$(true),OXP,3)
+ $(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $@) \
+ && rm -rf $(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/$* \
+ && unzip -q $(ZIPFILE) -d $(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/$* \
+ && zipinfo -1 $(ZIPFILE) | grep -v '/$$' \
+ | sed s+^+$(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/$*/+ > $@)
+
+# call gb_ExtensionPackage_ExtensionPackage,package,oxt
+define gb_ExtensionPackage_ExtensionPackage
+$(call gb_ExtensionPackage_get_target,$(1)) : ZIPFILE := $(2)
+$(call gb_ExtensionPackage_get_target,$(1)) : $(2)
+$(2) :| $(call gb_ExtensionPackage_get_preparation_target,$(1))
+$(call gb_ExtensionPackage_get_target,$(1)) :| \
+ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/.dir
+
+$$(eval $$(call gb_Module_register_target,$(call gb_ExtensionPackage_get_target,$(1)),$(call gb_ExtensionPackage_get_clean_target,$(1))))
+$(call gb_Helper_make_userfriendly_targets,$(1),ExtensionPackage)
+
+endef
+
+# call gb_ExtensionPackage_use_external_project,package,externalproject
+define gb_ExtensionPackage_use_external_project
+$(call gb_ExtensionPackage_get_preparation_target,$(1)) : \
+ $(call gb_ExternalProject_get_target,$(2))
+
+endef
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 90f9decdab08..8504e549685a 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -84,6 +84,8 @@ gb_Executable_get_runtime_target = $(WORKDIR_FOR_BUILD)/Executable/$(1).run
gb_Extension_get_target = $(WORKDIR)/Extension/$(1).oxt
gb_Extension_get_rootdir = $(WORKDIR)/Extension/$(1)/root
gb_Extension_get_workdir = $(WORKDIR)/Extension/$(1)
+gb_ExtensionPackage_get_target = $(WORKDIR)/ExtensionPackage/$(1).filelist
+gb_ExtensionPackage_get_preparation_target = $(WORKDIR)/ExtensionPackage/$(1).prepare
gb_ExternalPackage_get_target = $(WORKDIR)/ExternalPackage/$(1)
gb_ExternalProject_get_statedir = $(WORKDIR)/ExternalProject/$(1)
gb_ExternalProject_get_preparation_target = $(WORKDIR)/ExternalProject/$(1).prepare
@@ -255,6 +257,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
Executable \
ExternalPackage \
Extension \
+ ExtensionPackage \
Gallery \
GeneratedPackage \
HelpTarget \
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 425a6995710b..b7f2db535ae3 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -320,6 +320,7 @@ include $(foreach class, \
HelpTarget \
AllLangHelp \
Extension \
+ ExtensionPackage \
Dictionary \
InstallModuleTarget \
InstallModule \