xref: /AOO41X/main/sysui/desktop/tg_rpm.mk (revision ff0525f24f03981d56b7579b645949f111420994)
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
24.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
25
26ALLTAR : $(RPMFLAGFILES)
27
28$(RPMFLAGFILES) : $(SPECFILE)
29    @-$(MKDIRHIER) $(@:d)
30    -$(RM) $(@:d)$(@:b:s/-/ /:1)-$(SPECFILE:b)-*
31    $(RPM) -bb $< $(RPMMACROS) \
32        --buildroot $(ABSLOCALOUT)$/misc$/$(@:b) \
33        --define "_builddir $(shell @cd $(COMMONMISC)$/$(@:b:s/-/ /:1) && pwd)" \
34        --define "productname $(PRODUCTNAME.$(@:b:s/-/ /:1))" \
35        --define "pkgprefix $(@:b:s/-/ /:1)$(PRODUCTVERSION.$(@:b:s/-/ /:1))" \
36        --define "unixfilename $(UNIXFILENAME.$(@:b:s/-/ /:1))" \
37        --define "iconprefix $(ICONPREFIX.$(@:b:s/-/ /:1))" \
38        --define "version $(PKGVERSION.$(@:b:s/-/ /:1))" \
39        --define "release $(PKGREV)" \
40        --define "_unpackaged_files_terminate_build  0" && $(TOUCH) $@
41.ENDIF
42