3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=eebc16665003ee92daf96b216d6f9563
9 # PKG_VARIANT:=-tls # for tls version
12 PKG_SOURCE_URL
:=http
://openser.org
/pub
/openser
/$(PKG_VERSION
)/src
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)$(PKG_VARIANT
)_src.
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 include $(TOPDIR
)/package
/rules.mk
21 define PKG_mod_template
24 [ -z
"$(2)" ] ||
install -d
-m
0755 $$(IDIR_
$(1))/usr
/lib
/openser
/modules
/
25 $(CP
) $(PKG_BUILD_DIR
)/modules
/$(2)/$(2).so \
26 $$(IDIR_
$(1))/usr
/lib
/openser
/modules
/ ; \
27 $(RSTRIP
) $$(IDIR_
$(1))
28 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
32 $(eval
$(call PKG_template
,OPENSER
,openser
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
33 $(eval
$(call PKG_template
,OPENSER_MOD_ACCOUNTING
,openser-mod-acc
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
34 $(eval
$(call PKG_template
,OPENSER_MOD_AUTH
,openser-mod-auth
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
35 $(eval
$(call PKG_template
,OPENSER_MOD_AUTH_DB
,openser-mod-auth-db
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
36 $(eval
$(call PKG_template
,OPENSER_MOD_AUTH_RADIUS
,openser-mod-auth-radius
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
37 $(eval
$(call PKG_template
,OPENSER_MOD_AVPOPS
,openser-mod-avpops
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
38 $(eval
$(call PKG_template
,OPENSER_MOD_LCR
,openser-mod-lcr
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
39 $(eval
$(call PKG_template
,OPENSER_MOD_MEDIAPROXY
,openser-mod-mediaproxy
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
40 $(eval
$(call PKG_template
,OPENSER_MOD_MYSQL
,openser-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
41 $(eval
$(call PKG_template
,OPENSER_MOD_NATHELPER
,openser-mod-nathelper
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
42 $(eval
$(call PKG_template
,OPENSER_MOD_SMS
,openser-mod-sms
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
43 $(eval
$(call PKG_template
,OPENSER_MOD_SPEEDDIAL
,openser-mod-speeddial
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
44 $(eval
$(call PKG_template
,OPENSER_MOD_XLOG
,openser-mod-xlog
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
46 $(eval
$(call PKG_mod_template
,OPENSER_MOD_ACCOUNTING
,acc
))
47 $(eval
$(call PKG_mod_template
,OPENSER_MOD_AUTH
,auth
))
48 $(eval
$(call PKG_mod_template
,OPENSER_MOD_AUTH_DB
,auth_db
))
49 $(eval
$(call PKG_mod_template
,OPENSER_MOD_AUTH_RADIUS
,auth_radius
))
50 $(eval
$(call PKG_mod_template
,OPENSER_MOD_AVPOPS
,avpops
))
51 $(eval
$(call PKG_mod_template
,OPENSER_MOD_LCR
,lcr
))
52 $(eval
$(call PKG_mod_template
,OPENSER_MOD_MEDIAPROXY
,mediaproxy
))
53 $(eval
$(call PKG_mod_template
,OPENSER_MOD_MYSQL
,mysql
))
54 $(eval
$(call PKG_mod_template
,OPENSER_MOD_NATHELPER
,nathelper
))
55 $(eval
$(call PKG_mod_template
,OPENSER_MOD_SMS
,sms
))
56 $(eval
$(call PKG_mod_template
,OPENSER_MOD_SPEEDIAL
,speeddial
))
57 $(eval
$(call PKG_mod_template
,OPENSER_MOD_XLOG
,xlog
))
59 # Select here the modules for the ipk package
60 OPENSER_MODULES
:= sl tm rr maxfwd usrloc registrar dbtext textops exec
62 OPENSER_MODULE_FILES
:= $(foreach module
,$(OPENSER_MODULES
),modules
/$(module
)/$(module
).so
)
63 OPENSER_MODULES
:= $(patsubst %,modules
/%,$(OPENSER_MODULES
))
65 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
68 $(PKG_BUILD_DIR
)/.built
:
69 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
71 extra_defs
="-DUSE_PTHREAD_MUTEX " \
74 CFLAGS
="$(TARGET_CFLAGS)" \
75 LOCALBASE
="$(STAGING_DIR)/usr" \
76 all utils
/gen_ha1
/gen_ha1
80 mkdir
-p
$(IDIR_OPENSER
)/usr
/sbin
81 $(CP
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(IDIR_OPENSER
)/usr
/sbin
/
82 $(CP
) $(PKG_BUILD_DIR
)/utils
/gen_ha1
/gen_ha1
$(IDIR_OPENSER
)/usr
/sbin
/openser_gen_ha1
83 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc
$(IDIR_OPENSER
)/usr
/sbin
/openserctl
84 chmod
744 $(IDIR_OPENSER
)/usr
/sbin
/openserctl
85 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc.dbtext
$(IDIR_OPENSER
)/usr
/sbin
/dbtextctl
86 chmod
744 $(IDIR_OPENSER
)/usr
/sbin
/dbtextctl
87 mkdir
-p
$(IDIR_OPENSER
)/usr
/lib
/openser
/modules
88 (cd
$(PKG_BUILD_DIR
);\
89 $(CP
) $(OPENSER_MODULE_FILES
) $(IDIR_OPENSER
)/usr
/lib
/openser
/modules
/; \
91 mkdir
-p
$(IDIR_OPENSER
)/etc
/openser
92 $(CP
) $(PKG_BUILD_DIR
)/etc
/openser.cfg
$(IDIR_OPENSER
)/etc
/openser
/
93 $(RSTRIP
) $(IDIR_OPENSER
)
94 $(IPKG_BUILD
) $(IDIR_OPENSER
) $(PACKAGE_DIR
)