summaryrefslogtreecommitdiff
path: root/Base.mk
blob: d1bfd95a8dfcd7a9a63a42db4cef6ed4524f1ed5 (plain)
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
# If home is unset this Makefile assumes the Kolab server installation
# resides in /kolab. If this is not the case this Makefile must be
# called using
#
# HOME="/mykolabroot" make TARGET
#
ifeq "x$(HOME)" "x"
  HOME = /kolab
endif

# If HOME is set to /root it is likely that somebody is calling this
# Makefile as root user. In this case this Makefile assumes that the
# Kolab server installation resides in /kolab.
#
# In the (hopefully) unlikely event that somebody really installed the
# Kolab server in /root this Makefile will fail.
ifeq "x$(HOME)" "x/root"
  HOME = /kolab
endif

# Is this an openpkg system?
OPENPKG=$(shell test -e $(HOME)/bin/openpkg && echo YES)

ifeq "x$(OPENPKG)" "xYES"
# Set the location of the rpm binary
ifeq "x$(RPM)" "x"
  RPM = $(HOME)/bin/openpkg rpm
endif
# Determine the suffix for binary packages on this system
ifeq "x$(PLATTAG)" "x"
  PLATTAG = $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(HOME:/%=%)
endif
else
  RPM =
  PLATTAG = unknown
endif

# Set the location for rpm source package installations
ifeq "x$(KOLABRPMSRC)" "x"
  KOLABRPMSRC = $(HOME)/RPM/SRC
endif

# Set the location for rpm packages
ifeq "x$(KOLABRPMPKG)" "x"
  KOLABRPMPKG = $(HOME)/RPM/PKG
endif

# Set the location for the rpm temporary directory
ifeq "x$(KOLABRPMTMP)" "x"
  KOLABRPMTMP = $(HOME)/RPM/TMP
endif

ifeq "x$(KOLABPKGURI)" "x"
  KOLABPKGURI = http://files.kolab.org/server/development-2.2/openpkg-orig-srpms/
endif