xref: /aoo41x/main/sysui/desktop/solaris/makefile.mk (revision ff3f4ebc)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..$/..
25
26PRJNAME=sysui
27TARGET=solaris
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :  settings.mk
32
33# --- Product Version Information ----------------------------------
34
35.INCLUDE :  ../productversion.mk
36
37# --- Files --------------------------------------------------------
38
39.IF "$(OS)"=="SOLARIS"
40
41PKGFILES = $(BIN)$/pkg$/{$(PRODUCTLIST)}-desktop-integration.tar.gz
42
43PKGDATESTRING = $(shell @date -u +%Y.%m.%d)
44PKGARCH=all
45
46FASPAC=`test -f $(SOLARBINDIR)/faspac-so.sh && echo "/sbin/sh" || echo "echo"`
47
48.ENDIF
49
50# --- Targets -------------------------------------------------------
51
52.INCLUDE :  target.mk
53
54.IF "$(OS)"=="SOLARIS"
55
56ALLTAR : $(PKGFILES)
57
58# --- pkginfo ----------------------------------------------------
59
60# Copy the pkginfo file to $(MISC)
61$(MISC)/{$(PRODUCTLIST)}/{pkginfo depend} : $$(@:f) ../productversion.mk makefile.mk
62	@$(MKDIRHIER) $(@:d)
63	@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/.//)/" > $@
64
65# --- mailcap ---------------------------------
66
67# Copy the prototype file to $(MISC)
68$(MISC)/{$(PRODUCTLIST)}/mailcap : $$(@:f) ../productversion.mk
69	@$(MKDIRHIER) $(@:d)
70	@cat $(@:f) | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(@:d:d:f))/g" -e "s_%SOURCE_$(MISC)/$(@:d:d:f)_g" > $@
71
72# --- copyright--------------------------------
73
74# Copy the copyright file to $(MISC)
75$(MISC)/{$(PRODUCTLIST)}/copyright : $$(@:f)
76	@$(MKDIRHIER) $(@:d)
77	@cat $(@:f) | tr -d "\015" > $@
78
79# --- postinstall--------------------------------
80
81
82# Copy the postinstall file to $(MISC)
83$(MISC)/{$(PRODUCTLIST)}/postinstall : $$(@:f)
84	@$(MKDIRHIER) $(@:d)
85	@cat $(@:f) | tr -d "\015" > $@
86
87# --- postremove--------------------------------
88
89# Copy the postremove file to $(MISC)
90$(MISC)/{$(PRODUCTLIST)}/postremove : $$(@:f)
91	@$(MKDIRHIER) $(@:d)
92	@cat $(@:f) | tr -d "\015" > $@
93
94# --- openoffice.xml---------------------------
95
96.IF "$(common_build)"=="TRUE"
97# Copy the apacheopenoffice.xml file to $(MISC)
98#$(MISC)/$(foreach,i,$(PRODUCTLIST) $i/$i.xml) :  $(COMMONMISC)/$$(@:b)/apacheopenoffice.xml
99$(MISC)/$(foreach,i,$(PRODUCTLIST) $(MISC)/$i/apacheopenoffice.xml) :  $(COMMONMISC)/$$(@:b)/apacheopenoffice.xml
100	$(MKDIRHIER) $(@:d)
101	echo hier hier $@
102	cat $< | tr -d "\015" > $@
103.ENDIF			# "$(COMMON_BUILD)"==""
104
105# --- prototype ---------------------------------------------------
106
107# Copy the prototype file to $(MISC)
108$(MISC)/{$(PRODUCTLIST)}$/prototype : $$(@:f) ../productversion.mk makefile.mk
109	@$(MKDIRHIER) $(@:d)
110	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" > $@
111
112# --- packaging ---------------------------------------------------
113
114#$(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/$$(@:b:b:s/-desktop-integration//).xml
115$(PKGFILES) : $(MISC)/{$(PRODUCTLIST)}/{copyright pkginfo depend mailcap postinstall postremove} makefile.mk $(MISC)/$$(@:b:b:s/-desktop-integration//)/apacheopenoffice.xml
116$(PKGFILES) : $(MISC)$/{$(PRODUCTLIST)}$/prototype
117	@-$(RM) $(BIN)$/$(@:f)
118	@$(MKDIRHIER) $(@:d)
119	pkgmk -l 1073741824 -r . -f $(MISC)$/$(@:b:b:s/-/ /:1)$/prototype -o -d $(PKGDIR) ARCH=$(PKGARCH) VERSION=$(PKGVERSION.$(@:b:s/-/ /:1)),REV=$(PKGREV).$(PKGDATESTRING)
120.IF "$(DONTCOMPRESS)"==""
121	$(FASPAC) $(SOLARBINDIR)/faspac-so.sh -a -d $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
122.ENDIF # "$(DONTCOMPRESS)"==""
123	@tar -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int | gzip > $@
124	@rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
125
126.ENDIF
127