1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 include $(SRCDIR
)/sysui
/productlist.mk
12 deb_WORKDIR
:= $(call gb_CustomTarget_get_workdir
,sysui
/deb
)
13 deb_SRCDIR
:= $(SRCDIR
)/sysui
/desktop
/debian
15 $(eval
$(call gb_CustomTarget_CustomTarget
,sysui
/deb
))
17 $(eval
$(call gb_CustomTarget_register_targets
,sysui
/deb
,\
18 $(foreach product
,$(PRODUCTLIST
),\
19 $(product
)-desktop-integration.
tar.gz \
20 $(product
)/DEBIAN
/control \
21 $(product
)/DEBIAN
/postinst \
22 $(product
)/DEBIAN
/postrm \
23 $(product
)/DEBIAN
/prerm \
24 $(product
)-freedesktop-menus_
$(PKGVERSION
)-$(LIBO_VERSION_PATCH
)_all.deb
) \
27 $(deb_WORKDIR
)/%-desktop-integration.
tar.gz
: $(deb_WORKDIR
)/%-freedesktop-menus_
$(PKGVERSION
)-$(LIBO_VERSION_PATCH
)_all.deb
28 fakeroot
$(GNUTAR
) -C
$(deb_WORKDIR
) -cf
- $(notdir $<) | gzip
> $@
30 $(deb_WORKDIR
)/%/DEBIAN
/postrm
: $(deb_SRCDIR
)/postrm
31 cat
$< | tr
-d
"\015" | \
32 sed
's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@
34 $(deb_WORKDIR
)/%/DEBIAN
/postinst
: $(deb_SRCDIR
)/postinst
35 cat
$< | tr
-d
"\015" | \
36 sed
's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@
38 $(deb_WORKDIR
)/%/DEBIAN
/prerm
: $(deb_SRCDIR
)/prerm
39 cat
$< | tr
-d
"\015" | \
40 sed
's/%PREFIX/$(UNIXFILENAME.$*)/g' >> $@
42 $(deb_WORKDIR
)/%/DEBIAN
/control
: $(deb_SRCDIR
)/control
$(call gb_CustomTarget_get_workdir
,sysui
/share
)/%/create_tree.sh
43 mkdir
-p
$(deb_WORKDIR
)/$*/usr
/lib
/menu
44 cd
$(call gb_CustomTarget_get_workdir
,sysui
/share
)/$* \
45 && DESTDIR
=$(deb_WORKDIR
)/$* \
46 ICON_PREFIX
=$(UNIXFILENAME.
$*) \
50 sed
$(deb_SRCDIR
)/openoffice.org-debian-menus \
51 -e
's/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION)/' \
52 -e
's/%PREFIX/$(UNIXFILENAME.$*)/' \
53 -e
's/%ICONPREFIX/$(UNIXFILENAME.$*)/' \
54 > $(deb_WORKDIR
)/$*/usr
/lib
/menu
/$*
55 echo
"Package: $*-freedesktop-menus" >$@
56 cat
$< | tr
-d
"\015" | \
57 sed
's/%productname/$(PRODUCTNAME.$*) $(PRODUCTVERSION)/' \
59 echo
"Version: $(PKGVERSION)-$(LIBO_VERSION_PATCH)" >>$@
60 du
-k
-s
$(deb_WORKDIR
)/$* |
$(gb_AWK
) -F
' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >>$@
62 $(deb_WORKDIR
)/%-freedesktop-menus_
$(PKGVERSION
)-$(LIBO_VERSION_PATCH
)_all.deb
: $(deb_WORKDIR
)/%/DEBIAN
/postrm
$(deb_WORKDIR
)/%/DEBIAN
/postinst
$(deb_WORKDIR
)/%/DEBIAN
/prerm
$(deb_WORKDIR
)/%/DEBIAN
/control
64 chmod
-R g-w
$(deb_WORKDIR
)/$*
65 chmod a
+rx
$(deb_WORKDIR
)/$*/DEBIAN \
66 $(deb_WORKDIR
)/$*/DEBIAN
/pre
* $(deb_WORKDIR
)/$*/DEBIAN
/post
*
67 chmod g-s
$(deb_WORKDIR
)/$*/DEBIAN
68 fakeroot dpkg-deb
--build
$(deb_WORKDIR
)/$* $@
70 # vim: set noet sw=4 ts=4: