xref: /aoo41x/main/sysui/desktop/solaris/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..
29
30PRJNAME=sysui
31TARGET=solaris
32
33# --- Settings -----------------------------------------------------
34
35.INCLUDE :  settings.mk
36
37# --- Product Version Information ----------------------------------
38
39.INCLUDE :  ../productversion.mk
40
41# --- Files --------------------------------------------------------
42
43.IF "$(OS)"=="SOLARIS"
44
45PKGFILES = $(BIN)$/pkg$/{$(PRODUCTLIST)}-desktop-integration.tar.gz
46
47PKGDATESTRING = $(shell @date -u +%Y.%m.%d)
48PKGARCH=all
49
50FASPAC=`test -f $(SOLARBINDIR)/faspac-so.sh && echo "/sbin/sh" || echo "echo"`
51
52.ENDIF
53
54# --- Targets -------------------------------------------------------
55
56.INCLUDE :  target.mk
57
58.IF "$(OS)"=="SOLARIS"
59
60ALLTAR : $(PKGFILES)
61
62# --- pkginfo ----------------------------------------------------
63
64# Copy the pkginfo file to $(MISC)
65$(MISC)/{$(PRODUCTLIST)}/{pkginfo depend} : $$(@:f) ../productversion.mk makefile.mk
66	@$(MKDIRHIER) $(@:d)
67	@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/.//)/" > $@
68
69# --- mailcap ---------------------------------
70
71# Copy the prototype file to $(MISC)
72$(MISC)/{$(PRODUCTLIST)}/mailcap : $$(@:f) ../productversion.mk
73	@$(MKDIRHIER) $(@:d)
74	@cat $(@:f) | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(@:d:d:f))/g" -e "s_%SOURCE_$(MISC)/$(@:d:d:f)_g" > $@
75
76# --- copyright--------------------------------
77
78# Copy the copyright file to $(MISC)
79$(MISC)/{$(PRODUCTLIST)}/copyright : $$(@:f)
80	@$(MKDIRHIER) $(@:d)
81	@cat $(@:f) | tr -d "\015" > $@
82
83# --- postinstall--------------------------------
84
85
86# Copy the postinstall file to $(MISC)
87$(MISC)/{$(PRODUCTLIST)}/postinstall : $$(@:f)
88	@$(MKDIRHIER) $(@:d)
89	@cat $(@:f) | tr -d "\015" > $@
90
91# --- postremove--------------------------------
92
93# Copy the postremove file to $(MISC)
94$(MISC)/{$(PRODUCTLIST)}/postremove : $$(@:f)
95	@$(MKDIRHIER) $(@:d)
96	@cat $(@:f) | tr -d "\015" > $@
97
98# --- openoffice.xml---------------------------
99
100.IF "$(common_build)"=="TRUE"
101# Copy the openoffice.org.xml file to $(MISC)
102#$(MISC)/$(foreach,i,$(PRODUCTLIST) $i/$i.xml) :  $(COMMONMISC)/$$(@:b)/openoffice.org.xml
103$(MISC)/$(foreach,i,$(PRODUCTLIST) $(MISC)/$i/openoffice.org.xml) :  $(COMMONMISC)/$$(@:b)/openoffice.org.xml
104	$(MKDIRHIER) $(@:d)
105	echo hier hier $@
106	cat $< | tr -d "\015" > $@
107.ENDIF			# "$(COMMON_BUILD)"==""
108
109# --- prototype ---------------------------------------------------
110
111# Copy the prototype file to $(MISC)
112$(MISC)/{$(PRODUCTLIST)}$/prototype : $$(@:f) ../productversion.mk makefile.mk
113	@$(MKDIRHIER) $(@:d)
114	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" > $@
115
116# --- packaging ---------------------------------------------------
117
118#$(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/$$(@:b:b:s/-desktop-integration//).xml
119$(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/openoffice.org.xml
120$(PKGFILES) : $(MISC)$/{$(PRODUCTLIST)}$/prototype
121	@-$(RM) $(BIN)$/$(@:f)
122	@$(MKDIRHIER) $(@:d)
123	pkgmk -l 1073741824 -r . -f $(MISC)$/$(@:b:b:s/-/ /:1)$/prototype -o -d $(PKGDIR) ARCH=$(PKGARCH) VERSION=$(PKGVERSION.$(@:b:s/-/ /:1)),REV=$(PKGREV).$(PKGDATESTRING)
124.IF "$(DONTCOMPRESS)"==""
125	$(FASPAC) $(SOLARBINDIR)/faspac-so.sh -a -d $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
126.ENDIF # "$(DONTCOMPRESS)"==""
127	@tar -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int | gzip > $@
128	@rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
129
130.ENDIF
131