1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
37 # --- Settings -----------------------------------------------------
39 .INCLUDE
: settings.mk
41 # --- Product Version Information ----------------------------------
43 .INCLUDE
: ..
/productversion.mk
45 # --- Files --------------------------------------------------------
47 MENUFILES
=$(PKGDIR
)$/{$(PRODUCTLIST
)}3.2-$(TARGET
)-menus-
$(PKGVERSION
)-noarch-
$(PKGREV
).tgz
49 .IF
"$(USE_SHELL)"=="bash"
53 # --- Targets -------------------------------------------------------
57 .IF
"$(OS)" == "LINUX"
61 $(MISC
)/$(TARGET
)/usr
/share
/applications
/ :
64 # --- slackware-specific stuff ------------------------------------
65 # symlinks shall not be included in the tarball, but created with the doinst-script
67 # FIXME: removal of *-extension.* only to create identical packages to OOF680
68 %/usr
/share
/applications
:
70 /bin
/sh
-c
"cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.2//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/3.2//)) KDEMAINDIR=/opt/kde .$/create_tree.sh"
71 $(RM
) $*$/opt
$/kde
$/share
$/icons
$/*$/*$/*$/*-extension.png
72 $(RM
) $*$/opt
$/kde
$/share
$/mimelnk
$/application
$/*-extension.desktop
73 $(RM
) $*$/usr
$/share
$/applications
$/*.desktop
74 $(RM
) $*$/usr
$/bin
$/soffice
76 %$/install$/doinst.sh
: update-script
77 @echo
"( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//)) )" > $@
78 @echo
"( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//)) )" >> $@
79 @echo
"( cd usr/bin ; rm -rf soffice )" >> $@
80 @echo
"( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/program/soffice soffice )" >> $@
81 @echo
$(ECHOPARAM
) $(foreach,i
,$(shell @cat
$(COMMONMISC
)$/$(*:b
:s
/-/ /:1:s
/3.2//)/launcherlist
) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))-$i )") >> $@
84 %$/install$/slack-desc
: slack-desc
86 @sed
-e
"s/PKGNAME/$(*:b:s/-/ /:1:s/3.2//)-$(TARGET)-menus/g" -e
"s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/3.2//))/g" \
87 -e
"s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.2//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/3.2//))/g" \
88 -e
"s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.2//))/g" \
89 -e
"s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/g" $< > $@
91 # needed to satisfy the slackware package tools - they need
92 # the entries like this
93 # ./ <- very important
95 # the follwoing does not work (no description found then):
98 # and this doesn't work either (broken file-list, package cannot be removed)
101 $(MISC
)/$(TARGET
)/empty.
tar :
102 @
$(MKDIRHIER
) $(@
:d
)/empty
103 @
tar -C
$(MISC
)/$(TARGET
)/empty
--owner
=root
--group
=root
--same-owner
-cf
$@ .
106 # --- packaging ---------------------------------------------------
108 $(MENUFILES
) : makefile.mk slack-desc update-script
$(COMMONMISC
)$/{$(PRODUCTLIST
)}$/build.flag
109 $(MENUFILES
) : $(MISC
)/$(TARGET
)/empty.
tar
110 @
-$(MKDIRHIER
) $(@
:d
)
111 -$(RM
) $(@
:d
)$/$(@
:b
:s
/-/ /:1)-$(TARGET
)-menus-
*.tgz
112 -$(RM
) -r
$(MISC
)$/$(@
:b
)
113 dmake
$(MISC
)$/$(@
:b
)$/usr
/share
/applications
$(MISC
)$/$(@
:b
)$/install$/slack-desc
$(MISC
)$/$(@
:b
)$/install$/doinst.sh
114 @
$(COPY
) $(MISC
)/$(TARGET
)$/empty.
tar $@.tmp
115 @
tar -C
$(MISC
)/$(@
:b
) --owner
=root
--group
=root
--same-owner
--exclude application.flag
-rf
$@.tmp
install usr opt
118 $(RM
) -r
$(MISC
)$/$(@
:b
)