forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
berkeleydb.mk
51 lines (42 loc) · 1.51 KB
/
berkeleydb.mk
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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += berkeleydb
# Berkeleydb requires registration on Oracle's website, so this is a mirror.
DOWNLOAD += https://fossies.org/linux/misc/db-$(BDB_VERSION).tar.gz
BDB_VERSION := 18.1.32
DEB_BDB_V ?= $(BDB_VERSION)
berkeleydb-setup: setup
$(call EXTRACT_TAR,db-$(BDB_VERSION).tar.gz,db-$(BDB_VERSION),berkeleydb)
ifneq ($(wildcard $(BUILD_WORK)/berkeleydb/.build_complete),)
berkeleydb:
@echo "Using previously built berkeleydb."
else
berkeleydb: berkeleydb-setup gettext openssl
cd $(BUILD_WORK)/berkeleydb/dist && ./s_config
cd $(BUILD_WORK)/berkeleydb/build_unix && ../dist/configure \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--enable-static=no \
--enable-shared=yes \
--with-mutex=Darwin/_spin_lock_try
+$(MAKE) -C $(BUILD_WORK)/berkeleydb/build_unix
+$(MAKE) -C $(BUILD_WORK)/berkeleydb/build_unix install \
DESTDIR=$(BUILD_STAGE)/berkeleydb
+$(MAKE) -C $(BUILD_WORK)/berkeleydb/build_unix install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/berkeleydb/.build_complete
endif
berkeleydb-package: berkeleydb-stage
# berkeleydb.mk Package Structure
rm -rf $(BUILD_DIST)/berkeleydb
# berkeleydb.mk Prep berkeleydb
cp -a $(BUILD_STAGE)/berkeleydb $(BUILD_DIST)
rm -rf $(BUILD_DIST)/berkeleydb/usr/docs
# berkeleydb.mk Sign
$(call SIGN,berkeleydb,general.xml)
# berkeleydb.mk Make .debs
$(call PACK,berkeleydb,DEB_BDB_V)
# berkeleydb.mk Build cleanup
rm -rf $(BUILD_DIST)/berkeleydb
.PHONY: berkeleydb berkeleydb-package