diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /sysui/CustomTarget_deb.mk | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sysui/CustomTarget_deb.mk')
-rw-r--r-- | sysui/CustomTarget_deb.mk | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/sysui/CustomTarget_deb.mk b/sysui/CustomTarget_deb.mk new file mode 100644 index 000000000..44afba723 --- /dev/null +++ b/sysui/CustomTarget_deb.mk @@ -0,0 +1,70 @@ +# -*- 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 + fakeroot $(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 \ + 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 + + 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 + fakeroot dpkg-deb --build $(deb_WORKDIR)/$* $@ + +# vim: set noet sw=4 ts=4: |