libunwind: update to 1.8.1
[openadk.git] / package / opensips / Makefile
blob57495a60f1140f2202a8eb0894fb4f660530f88f
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= opensips
7 PKG_VERSION:= 3.4.4
8 PKG_RELEASE:= 1
9 PKG_HASH:= eab3608a464884fc40f33cc639a5b124dc838799bd4a9701b7a8af49fb937fc7
10 PKG_DESCR:= high-performance, configurable, free sip server
11 PKG_SECTION:= net/voip
12 PKG_DEPENDS:= libressl
13 PKG_BUILDDEP:= libressl flex-host bison-host
14 PKG_URL:= http://opensips.org/
15 PKG_SITES:= http://opensips.org/pub/opensips/$(PKG_VERSION)/
17 DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SUBPKGS:= OPENSIPS OPENSIPS_MOD_ACCOUNTING OPENSIPS_MOD_AUTH
20 PKG_SUBPKGS+= OPENSIPS_MOD_AUTH_DB OPENSIPS_MOD_AVPOPS OPENSIPS_MOD_DISPATCHER
21 PKG_SUBPKGS+= OPENSIPS_MOD_DIVERSION OPENSIPS_MOD_FLATSTORE OPENSIPS_MOD_GFLAGS
22 PKG_SUBPKGS+= OPENSIPS_MOD_GROUP OPENSIPS_MOD_MEDIAPROXY OPENSIPS_MOD_MSILO
23 PKG_SUBPKGS+= OPENSIPS_MOD_NATHELPER OPENSIPS_MOD_OPTIONS
24 PKG_SUBPKGS+= OPENSIPS_MOD_PERMISSIONS OPENSIPS_MOD_PIKE
25 PKG_SUBPKGS+= OPENSIPS_MOD_UAC OPENSIPS_MOD_UAC_REDIRECT
27 PKGSD_OPENSIPS_MOD_ACCOUNTING:= accounting support
28 PKGSN_OPENSIPS_MOD_ACCOUNTING:= opensips
29 PKGSD_OPENSIPS_MOD_AUTH:= authentication support
30 PKGSN_OPENSIPS_MOD_AUTH:= opensips
31 PKGSD_OPENSIPS_MOD_AUTH_DB:= authentication database support
32 PKGSN_OPENSIPS_MOD_AUTH_DB:= opensips
33 PKGSD_OPENSIPS_MOD_AVPOPS:= avpops support
34 PKGSN_OPENSIPS_MOD_AVPOPS:= opensips
35 PKGSD_OPENSIPS_MOD_DISPATCHER:= dispatcher support
36 PKGSN_OPENSIPS_MOD_DISPATCHER:= opensips
37 PKGSD_OPENSIPS_MOD_DIVERSION:= diversion support
38 PKGSN_OPENSIPS_MOD_DIVERSION:= opensips
39 PKGSD_OPENSIPS_MOD_FLATSTORE:= flatstore support
40 PKGSN_OPENSIPS_MOD_FLATSTORE:= opensips
41 PKGSD_OPENSIPS_MOD_GFLAGS:= gflags support
42 PKGSN_OPENSIPS_MOD_GFLAGS:= opensips
43 PKGSD_OPENSIPS_MOD_GROUP:= group support
44 PKGSN_OPENSIPS_MOD_GROUP:= opensips
45 PKGSD_OPENSIPS_MOD_MEDIAPROXY:= mediaproxy support
46 PKGSN_OPENSIPS_MOD_MEDIAPROXY:= opensips
47 PKGSD_OPENSIPS_MOD_MSILO:= msilo support
48 PKGSN_OPENSIPS_MOD_MSILO:= opensips
49 PKGSD_OPENSIPS_MOD_NATHELPER:= nathelper support
50 PKGSN_OPENSIPS_MOD_NATHELPER:= opensips
51 PKGSD_OPENSIPS_MOD_OPTIONS:= options support
52 PKGSN_OPENSIPS_MOD_OPTIONS:= opensips
53 PKGSD_OPENSIPS_MOD_PERMISSIONS:= permissions support
54 PKGSN_OPENSIPS_MOD_PERMISSIONS:= opensips
55 PKGSD_OPENSIPS_MOD_PIKE:= pike support
56 PKGSN_OPENSIPS_MOD_PIKE:= opensips
57 PKGSD_OPENSIPS_MOD_UAC:= uac support
58 PKGSN_OPENSIPS_MOD_UAC:= opensips
59 PKGSD_OPENSIPS_MOD_UAC_REDIRECT:= uac redirect support
60 PKGSN_OPENSIPS_MOD_UAC_REDIRECT:= opensips
62 include $(ADK_TOPDIR)/mk/package.mk
64 define PKG_mod_template
66 INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
68 ${2}-install:
69 [ -z "$(2)" ] || install -d -m 0755 $$(IDIR_$(1))/usr/lib/opensips/modules/
70 $(CP) $(WRKBUILD)/modules/$(2)/$(2).so \
71 $$(IDIR_$(1))/usr/lib/opensips/modules/
73 endef
75 $(eval $(call PKG_template,OPENSIPS,opensips,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
76 $(eval $(call PKG_template,OPENSIPS_MOD_ACCOUNTING,opensips-mod-acc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
77 $(eval $(call PKG_template,OPENSIPS_MOD_AUTH,opensips-mod-auth,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
78 $(eval $(call PKG_template,OPENSIPS_MOD_AUTH_DB,opensips-mod-auth-db,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
79 $(eval $(call PKG_template,OPENSIPS_MOD_AVPOPS,opensips-mod-avpops,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
80 $(eval $(call PKG_template,OPENSIPS_MOD_DISPATCHER,opensips-mod-dispatcher,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
81 $(eval $(call PKG_template,OPENSIPS_MOD_DIVERSION,opensips-mod-diversion,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
82 $(eval $(call PKG_template,OPENSIPS_MOD_FLATSTORE,opensips-mod-flatstore,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
83 $(eval $(call PKG_template,OPENSIPS_MOD_GFLAGS,opensips-mod-gflags,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
84 $(eval $(call PKG_template,OPENSIPS_MOD_GROUP,opensips-mod-group,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
85 $(eval $(call PKG_template,OPENSIPS_MOD_MEDIAPROXY,opensips-mod-mediaproxy,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
86 $(eval $(call PKG_template,OPENSIPS_MOD_MSILO,opensips-mod-msilo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
87 $(eval $(call PKG_template,OPENSIPS_MOD_NATHELPER,opensips-mod-nathelper,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
88 $(eval $(call PKG_template,OPENSIPS_MOD_OPTIONS,opensips-mod-options,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
89 $(eval $(call PKG_template,OPENSIPS_MOD_PERMISSIONS,opensips-mod-permissions,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
90 $(eval $(call PKG_template,OPENSIPS_MOD_PIKE,opensips-mod-pike,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
91 $(eval $(call PKG_template,OPENSIPS_MOD_UAC,opensips-mod-uac,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
92 $(eval $(call PKG_template,OPENSIPS_MOD_UAC_REDIRECT,opensips-mod-uac-redirect,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
94 $(eval $(call PKG_mod_template,OPENSIPS_MOD_ACCOUNTING,acc))
95 $(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH,auth))
96 $(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH_DB,auth_db))
97 $(eval $(call PKG_mod_template,OPENSIPS_MOD_AVPOPS,avpops))
98 $(eval $(call PKG_mod_template,OPENSIPS_MOD_DISPATCHER,dispatcher))
99 $(eval $(call PKG_mod_template,OPENSIPS_MOD_DIVERSION,diversion))
100 $(eval $(call PKG_mod_template,OPENSIPS_MOD_FLATSTORE,db_flatstore))
101 $(eval $(call PKG_mod_template,OPENSIPS_MOD_GFLAGS,gflags))
102 $(eval $(call PKG_mod_template,OPENSIPS_MOD_GROUP,group))
103 $(eval $(call PKG_mod_template,OPENSIPS_MOD_MEDIAPROXY,mediaproxy))
104 $(eval $(call PKG_mod_template,OPENSIPS_MOD_MSILO,msilo))
105 $(eval $(call PKG_mod_template,OPENSIPS_MOD_NATHELPER,nathelper))
106 $(eval $(call PKG_mod_template,OPENSIPS_MOD_OPTIONS,options))
107 $(eval $(call PKG_mod_template,OPENSIPS_MOD_PERMISSIONS,permissions))
108 $(eval $(call PKG_mod_template,OPENSIPS_MOD_PIKE,pike))
109 $(eval $(call PKG_mod_template,OPENSIPS_MOD_SPEEDIAL,speeddial))
110 $(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC,uac))
111 $(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC_REDIRECT,uac_redirect))
113 # Select here the modules for the main package
114 OPENSIPS_MODULES:= sl tm rr maxfwd usrloc registrar db_text textops exec mi_fifo signaling
116 OPENSIPS_MODULE_FILES:= $(foreach module,$(OPENSIPS_MODULES),modules/$(module)/$(module).so)
117 OPENSIPS_MODULES:= $(patsubst %,modules/%,$(OPENSIPS_MODULES))
119 CONFIG_STYLE:= manual
120 BUILD_STYLE:= manual
121 INSTALL_STYLE:= manual
123 do-build:
124 PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
125 prefix=/ \
126 TLS=1 \
127 FREERADIUS=0 \
128 NICER=0 \
129 NO_EPOLL=1 \
130 CC="$(TARGET_CC)" \
131 OS="linux" \
132 ARCH="$(ADK_TARGET_ARCH)" \
133 CFLAGS="$(TARGET_CFLAGS) -fPIC" \
134 LOCALBASE="$(STAGING_TARGET_DIR)/usr" \
135 SYSBASE="$(STAGING_TARGET_DIR)/usr" \
136 all modules
138 do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
139 ${INSTALL_DIR} $(IDIR_OPENSIPS)/etc/opensips
140 ${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/sbin
141 ${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/lib/opensips/modules
142 $(CP) $(WRKBUILD)/$(PKG_NAME) $(IDIR_OPENSIPS)/usr/sbin/
143 (cd $(WRKBUILD);\
144 $(CP) $(OPENSIPS_MODULE_FILES) \
145 $(IDIR_OPENSIPS)/usr/lib/opensips/modules/; \
147 $(CP) ./files/opensips.cfg $(IDIR_OPENSIPS)/etc/opensips/
149 include ${ADK_TOPDIR}/mk/pkg-bottom.mk