This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
/
Makefile.am
114 lines (94 loc) · 3.03 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#
# Copyright 2017 VMware, Inc
#
SRCROOT = @top_srcdir@
BUILDROOT = @abs_top_builddir@
STAGEDIR = $(BUILDROOT)/stage
MAKEROOT=$(SRCROOT)/support/make
include $(MAKEROOT)/makedefs.mk
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
vmcommon \
vmevent \
vmidentity/ssoclients \
vmdir \
lwraft \
vmdns \
vmafd \
vmca \
mutentca \
vmidentity \
config
if ENABLE_PLUGINS
SUBDIRS+=plugins
endif
PACKAGES=\
$(LIGHTWAVE_STAGE_DIR)/$(ARCH)/$(LIGHTWAVE_RPM) \
$(LIGHTWAVE_STAGE_DIR)/$(ARCH)/$(LIGHTWAVE_CLIENT_RPM)
RPMBUILD=/usr/bin/rpmbuild
RPMBUILD_ROOT=$(CURDIR)/rpmbuild
RPMBUILD_BUILD=$(RPMBUILD_ROOT)/BUILD
RPMBUILD_SPECS=$(RPMBUILD_ROOT)/SPECS
RPMBUILD_RPMS=$(RPMBUILD_ROOT)/RPMS
RPMBUILD_SRCS=$(RPMBUILD_ROOT)/SOURCES
RPMBUILD_SRPMS=$(RPMBUILD_ROOT)/SRPMS
RPMBUILD_TMP=$(RPMBUILD_ROOT)/tmp
RPMBUILD_DIRS= \
$(RPMBUILD_BUILD) \
$(RPMBUILD_SPECS) \
$(RPMBUILD_RPMS) \
$(RPMBUILD_SRCS) \
$(RPMBUILD_SRPMS) \
$(RPMBUILD_TMP)
PKG_SPEC=lightwave.spec
.PHONY: package stage
stage:
make -C $(BUILDROOT) DESTDIR=$(STAGEDIR) install
package: stage $(RPMBUILD_SPECS)/$(PKG_SPEC) | $(RPMBUILD_DIRS)
cd $(RPMBUILD_ROOT) && \
$(RM) -f $(RPMBUILD_RPMS)/$(ARCH)/*.rpm && \
$(RPMBUILD) \
--quiet \
--bb \
--noclean \
--define "_topdir $(RPMBUILD_ROOT)" \
--define "_prefix /opt/vmware" \
--define "_bindir /opt/vmware/bin" \
--define "_sbindir /opt/vmware/sbin" \
--define "_lib64dir /opt/vmware/lib64" \
--define "_datadir /opt/vmware/share" \
--define "_logdir $(LIGHTWAVE_LOGDIR)" \
--define "_includedir /opt/vmware/include" \
--define "_localstatedir /var/lib/vmware" \
--define "_likewise_open_prefix /opt/likewise" \
--define "_vmevent_prefix /opt/vmware" \
--define "_vmevent_ver $(VMEVENT_MAJOR_VER).$(VMEVENT_MINOR_VER)" \
--define "_vmdir_prefix /opt/vmware" \
--define "_vmafd_prefix /opt/vmware" \
--define "_vmca_prefix /opt/vmware" \
--define "_mutentca_prefix /opt/vmware" \
--define "_vmdns_prefix /opt/vmware" \
--define "_vmsts_prefix /opt/vmware" \
--define "_javahome $(JAVA_HOME)" \
--define "_anthome $(ANT_HOME)" \
--define "_version $(LW_SERVER_MAJOR_VER).$(LW_SERVER_MINOR_VER).$(LW_SERVER_RELEASE_VER)" \
--define "_patch $(LW_SERVER_PATCH_VER)" \
--define "_dist $(DIST)" \
--buildroot $(STAGEDIR) \
SPECS/$(PKG_SPEC)
$(RPMBUILD_SPECS)/$(PKG_SPEC) : $(CURDIR)/package/rpm/$(PKG_SPEC) | $(RPMBUILD_SPECS)
@$(CP) -f $< $@
$(RPMBUILD_DIRS):
@$(MKDIR) -p $@
$(RPMBUILD_SPECS):
@$(MKDIR) -p $@
$(RPMBUILD_RPMS):
@$(MKDIR) -p $@
$(RPMBUILD_SRCS):
@$(MKDIR) -p $@
$(RPMBUILD_SRPMS):
@$(MKDIR) -p $@
$(RPMBUILD_TMP):
@$(MKDIR) -p $@
$(RPMBUILD_ROOT):
@$(MKDIR) -p $@