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