-
Notifications
You must be signed in to change notification settings - Fork 45
/
Makefile.am
86 lines (74 loc) · 3.02 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
## Makefile.am
##
## Process this file with automake to produce Makefile.in
SUBDIRS = include src ebin doc c_src priv mibs test
if HAVE_SYSTEMD
systemdsystemunit_DATA = scripts/ocs.service
env_DATA = scripts/ocs
endif
script_SCRIPTS = scripts/install_tables.escript \
scripts/join_cluster.escript \
scripts/install_snmp.sh \
scripts/install_certs.sh \
scripts/install_release.sh \
scripts/snapshot.escript \
scripts/export_ipdr.escript \
scripts/send_sms.escript \
scripts/voice_call.escript \
scripts/data_session.escript \
scripts/aaa-sta.escript \
scripts/fill_subs.escript
RELEASE_NAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
.PHONY: release
release: $(RELEASE_NAME).tar.gz
$(RELEASE_NAME).rel: $(PACKAGE_NAME).rel
cp $< $@
ERLTMP := $(shell mktemp -d)
if MAKE_TAR_EXTRA_FILES
$(RELEASE_NAME).tar.gz: $(RELEASE_NAME).rel ebin/$(PACKAGE_NAME).appup sys.config
mkdir -p $(ERLTMP)/lib/$(RELEASE_NAME)
cp -r $(DESTDIR)/$(ERLANG_INSTALL_LIB_DIR)/$(RELEASE_NAME)/* $(ERLTMP)/lib/$(RELEASE_NAME)
ERL_LIBS=$(ERLTMP)/lib:$(ERL_LIBS) RELDIR=releases $(ERL) \
-noinput -boot_var OTPHOME lib \
-eval "systools:make_script(\"$(RELEASE_NAME)\", \
[{variables, [{\"OTPHOME\", \"$(ERLTMP)\"}]}])" \
-eval "{ok, [{release, _, _, Apps}]} = file:consult(\"$(RELEASE_NAME).rel\"), \
ExtraFiles = [{code:where_is_file(atom_to_list(App) ++ \".appup\"), \
filename:join([lib, atom_to_list(App) ++ \"-\" ++ Vsn, ebin, \
atom_to_list(App) ++ \".appup\"])} \
|| {App, Vsn} <- Apps, \
filelib:is_regular(code:where_is_file(atom_to_list(App) ++ \".appup\"))], \
systools:make_tar(\"$(RELEASE_NAME)\", \
[{dirs, [include,mibs,doc]}, {extra_files, ExtraFiles}])" \
-s init stop
rm -rf $(ERLTMP)
else
$(RELEASE_NAME).tar.gz: $(RELEASE_NAME).rel ebin/$(PACKAGE_NAME).appup sys.config
mkdir -p $(ERLTMP)/lib/$(RELEASE_NAME)
cp -r $(DESTDIR)/$(ERLANG_INSTALL_LIB_DIR)/$(RELEASE_NAME)/* $(ERLTMP)/lib/$(RELEASE_NAME)
ERL_LIBS=$(ERLTMP)/lib:$(ERL_LIBS) RELDIR=releases $(ERL) \
-noinput -boot_var OTPHOME lib \
-eval "systools:make_script(\"$(RELEASE_NAME)\", \
[{variables, [{\"OTPHOME\", \"$(ERLTMP)\"}]}])" \
-eval "systools:make_tar(\"$(RELEASE_NAME)\", [{dirs, [include,mibs,doc]}])" \
-s init stop
rm -rf $(ERLTMP)
endif
install-data-hook: $(RELEASE_NAME).tar.gz
$(MKDIR_P) $(DESTDIR)/$(reldir)
$(INSTALL_DATA) $< $(DESTDIR)/$(reldir)
$(MKDIR_P) $(DESTDIR)/$(otpdir)/db
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log
$(MKDIR_P) $(DESTDIR)/$(otpdir)/ssl
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/abmf
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/acct
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/auth
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/export
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/http
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/ipdr
$(MKDIR_P) $(DESTDIR)/$(otpdir)/log/sasl
$(MKDIR_P) $(DESTDIR)/$(otpdir)/snmp/conf
$(MKDIR_P) $(DESTDIR)/$(otpdir)/snmp/db
$(MKDIR_P) $(DESTDIR)/$(otpdir)/bin
EXTRA_DIST = $(RELEASE_NAME).tar.gz
CLEANFILES = $(RELEASE_NAME).rel $(RELEASE_NAME).script $(RELEASE_NAME).boot $(RELEASE_NAME).tar.gz