update dev300-m58
[ooovba.git] / sysui / desktop / solaris / makefile.mk
blob32dc11be96a94ab8c5994d516e63d64e7a50ec2e
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.23 $
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 #*************************************************************************
32 PRJ=..$/..
34 PRJNAME=sysui
35 TARGET=solaris
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 # --- Product Version Information ----------------------------------
43 .INCLUDE : ../productversion.mk
45 # --- Files --------------------------------------------------------
47 .IF "$(OS)"=="SOLARIS"
49 PKGFILES = $(BIN)$/pkg$/{$(PRODUCTLIST)}-desktop-integration.tar.gz
51 PKGDATESTRING = $(shell @date -u +%Y.%m.%d)
52 PKGARCH=all
54 FASPAC=`test -f $(SOLARBINDIR)/faspac-so.sh && echo "/sbin/sh" || echo "echo"`
56 .ENDIF
58 # --- Targets -------------------------------------------------------
60 .INCLUDE : target.mk
62 .IF "$(OS)"=="SOLARIS"
64 ALLTAR : $(PKGFILES)
66 # --- pkginfo ----------------------------------------------------
68 # Copy the pkginfo file to $(MISC)
69 $(MISC)/{$(PRODUCTLIST)}/{pkginfo depend} : $$(@:f) ../productversion.mk makefile.mk
70 @$(MKDIRHIER) $(@:d)
71 @cat $(@:f) | tr -d "\015" | sed -e "s/%PRODUCTNAME/$(PRODUCTNAME.$(@:d:d:f)) $(PRODUCTVERSION.$(@:d:d:f))/g" -e "s/%pkgprefix/$(@:d:d:f:s/.//)/" > $@
73 # --- mailcap ---------------------------------
75 # Copy the prototype file to $(MISC)
76 $(MISC)/{$(PRODUCTLIST)}/mailcap : $$(@:f) ../productversion.mk
77 @$(MKDIRHIER) $(@:d)
78 @cat $(@:f) | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(@:d:d:f))/g" -e "s_%SOURCE_$(MISC)/$(@:d:d:f)_g" > $@
80 # --- copyright--------------------------------
82 # Copy the copyright file to $(MISC)
83 $(MISC)/{$(PRODUCTLIST)}/copyright : $$(@:f)
84 @$(MKDIRHIER) $(@:d)
85 @cat $(@:f) | tr -d "\015" > $@
87 # --- postinstall--------------------------------
90 # Copy the postinstall file to $(MISC)
91 $(MISC)/{$(PRODUCTLIST)}/postinstall : $$(@:f)
92 @$(MKDIRHIER) $(@:d)
93 @cat $(@:f) | tr -d "\015" > $@
95 # --- postremove--------------------------------
97 # Copy the postremove file to $(MISC)
98 $(MISC)/{$(PRODUCTLIST)}/postremove : $$(@:f)
99 @$(MKDIRHIER) $(@:d)
100 @cat $(@:f) | tr -d "\015" > $@
102 # --- openoffice.xml---------------------------
104 .IF "$(common_build)"=="TRUE"
105 # Copy the openoffice.org.xml file to $(MISC)
106 #$(MISC)/$(foreach,i,$(PRODUCTLIST) $i/$i.xml) : $(COMMONMISC)/$$(@:b)/openoffice.org.xml
107 $(MISC)/$(foreach,i,$(PRODUCTLIST) $(MISC)/$i/openoffice.org.xml) : $(COMMONMISC)/$$(@:b)/openoffice.org.xml
108 $(MKDIRHIER) $(@:d)
109 echo hier hier $@
110 cat $< | tr -d "\015" > $@
111 .ENDIF # "$(COMMON_BUILD)"==""
113 # --- prototype ---------------------------------------------------
115 # Copy the prototype file to $(MISC)
116 $(MISC)/{$(PRODUCTLIST)}$/prototype : $$(@:f) ../productversion.mk makefile.mk
117 @$(MKDIRHIER) $(@:d)
118 cat $(@:f) | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(@:d:d:f))/g" -e "s_%SOURCE_$(COMMONMISC)/$(@:d:d:f)_g" -e "s/%ICONPREFIX/$(ICONPREFIX.$(@:d:d:f))/g" > $@
120 # --- packaging ---------------------------------------------------
122 #$(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/$$(@:b:b:s/-desktop-integration//).xml
123 $(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/openoffice.org.xml
124 $(PKGFILES) : $(MISC)$/{$(PRODUCTLIST)}$/prototype
125 @-$(RM) $(BIN)$/$(@:f)
126 @$(MKDIRHIER) $(@:d)
127 pkgmk -l 1073741824 -r . -f $(MISC)$/$(@:b:b:s/-/ /:1)$/prototype -o -d $(PKGDIR) ARCH=$(PKGARCH) VERSION=$(PKGVERSION.$(@:b:s/-/ /:1)),REV=$(PKGREV).$(PKGDATESTRING)
128 .IF "$(DONTCOMPRESS)"==""
129 $(FASPAC) $(SOLARBINDIR)/faspac-so.sh -a -d $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
130 .ENDIF # "$(DONTCOMPRESS)"==""
131 @tar -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int | gzip > $@
132 @rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
134 .ENDIF