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
|
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
include $(TOPDIR)/rules.mk
PKG_NAME:= opensips
PKG_VERSION:= 1.5.1
PKG_RELEASE:= 1
PKG_BUILDDEP+= openssl
PKG_MD5SUM:= 87c6fe40c143775d6a1be1beb75c3eb2
PKG_DESCR:= a high-performance, configurable, free SIP server
PKG_SECTION:= net
PKG_VARIANT:= tls
PKG_URL:= http://opensips.org
PKG_SITES:= http://opensips.org/pub/opensips/$(PKG_VERSION)/src/
DISTFILES:= $(PKG_NAME)-$(PKG_VERSION)-$(PKG_VARIANT)_src.tar.gz
WRKDIST= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_VARIANT)
include $(TOPDIR)/mk/package.mk
define PKG_mod_template
INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
${2}-install:
[ -z "$(2)" ] || install -d -m 0755 $$(IDIR_$(1))/usr/lib/opensips/modules/
$(CP) $(WRKBUILD)/modules/$(2)/$(2).so \
$$(IDIR_$(1))/usr/lib/opensips/modules/
endef
$(eval $(call PKG_template,OPENSIPS,opensips,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_ACCOUNTING,opensips-mod-acc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_AUTH,opensips-mod-auth,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_AUTH_DB,opensips-mod-auth-db,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_AVPOPS,opensips-mod-avpops,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_DISPATCHER,opensips-mod-dispatcher,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_DIVERSION,opensips-mod-diversion,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_FLATSTORE,opensips-mod-flatstore,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_GFLAGS,opensips-mod-gflags,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_GROUP,opensips-mod-group,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_MEDIAPROXY,opensips-mod-mediaproxy,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_MSILO,opensips-mod-msilo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_NATHELPER,opensips-mod-nathelper,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_OPTIONS,opensips-mod-options,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_PDT,opensips-mod-pdt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_PERMISSIONS,opensips-mod-permissions,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_PIKE,opensips-mod-pike,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_SMS,opensips-mod-sms,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_UAC,opensips-mod-uac,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_UAC_REDIRECT,opensips-mod-uac-redirect,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_URI,opensips-mod-uri,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_URI_DB,opensips-mod-uri-db,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,OPENSIPS_MOD_XLOG,opensips-mod-xlog,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_ACCOUNTING,acc))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH,auth))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH_DB,auth_db))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_AVPOPS,avpops))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_DISPATCHER,dispatcher))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_DIVERSION,diversion))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_FLATSTORE,db_flatstore))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_GFLAGS,gflags))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_GROUP,group))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_MEDIAPROXY,mediaproxy))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_MSILO,msilo))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_NATHELPER,nathelper))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_OPTIONS,options))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_PDT,pdt))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_PERMISSIONS,permissions))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_PIKE,pike))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_SMS,sms))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_SPEEDIAL,speeddial))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC,uac))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC_REDIRECT,uac_redirect))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_URI,uri))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_URI_DB,uri_db))
$(eval $(call PKG_mod_template,OPENSIPS_MOD_XLOG,xlog))
# Select here the modules for the ipk package
OPENSIPS_MODULES:= sl tm rr maxfwd usrloc registrar db_text textops exec mi_fifo
OPENSIPS_MODULE_FILES:= $(foreach module,$(OPENSIPS_MODULES),modules/$(module)/$(module).so)
OPENSIPS_MODULES:= $(patsubst %,modules/%,$(OPENSIPS_MODULES))
do-build:
$(MAKE) -C $(WRKBUILD) \
prefix=/ \
extra_defs="-DUSE_PTHREAD_MUTEX" \
TLS=1 \
NO_EPOLL=1 \
CC="$(TARGET_CC)" \
OS="linux" \
ARCH="$(ARCH)" \
CFLAGS="$(TARGET_CFLAGS) -fPIC" \
LOCALBASE="$(STAGING_DIR)/usr" \
SYSBASE="$(STAGING_DIR)/usr" \
all modules
do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
${INSTALL_DIR} $(IDIR_OPENSIPS)/etc/opensips
${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/sbin
${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/lib/opensips/modules
$(CP) $(WRKBUILD)/$(PKG_NAME) $(IDIR_OPENSIPS)/usr/sbin/
(cd $(WRKBUILD);\
$(CP) $(OPENSIPS_MODULE_FILES) $(IDIR_OPENSIPS)/usr/lib/opensips/modules/; \
)
$(CP) ./files/opensips.cfg $(IDIR_OPENSIPS)/etc/opensips/
include ${TOPDIR}/mk/pkg-bottom.mk
|