Browse code

pkg/gentoo: Added ebuild for v3.3.2

Claudio Furrer authored on 17/10/2012 17:38:52
Showing 3 changed files
... ...
@@ -2,6 +2,11 @@
2 2
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
3 3
 # $Header: $
4 4
 
5
+*sip-router-3.3.2 (17 Oct 2012)
6
+
7
+  17 Oct 2012; Claudio G. Furrer <elcaio@gmail.com> +sip-router.3.3.2.ebuild:
8
+  Version bump (series 3.3.x).
9
+
5 10
 *sip-router-3.3.1 (5 Oct 2012)
6 11
 
7 12
   5 Oct 2012; Claudio G. Furrer <elcaio@gmail.com> +sip-router.3.3.1.ebuild:
... ...
@@ -5,10 +5,12 @@ DIST kamailio-3.1.6_src.tar.gz 7002535 SHA256 eb69af9d5bf851c802618ffe9f901200a7
5 5
 DIST kamailio-3.2.3_src.tar.gz 7227846 SHA256 673253bb3ec2f0cccba0fcddc8c93b3a41da4a1f63b5220736ee348d5ca3d131 SHA512 59dae999b0a598156032ba86e29cabf2053de1e7cb6dcb4a3b0ad76e4f0acc18980c804185a8edb545a360247676be13cbab77f2465875bb9591ca3885e85368 WHIRLPOOL b7978bba572724d709744a6c4e61aef740c611e011ef20469b51f9a419e88776329e4936ac664b1bce2c2b4b0b861c17ac927935637d0795c124597a1f163b2c
6 6
 DIST kamailio-3.2.4_src.tar.gz 7253378 SHA256 f367de0957807479f6c3f1df6ad3033819504c99f6007b90bc73ff0535657ab7 SHA512 9fe97296ac4321f8c9c052011b66ba298951499b4c27d16cb3b3e8aa6b9619e7ef91679c5ce22f4b0639bb06ceedc859efd2df3199338fb5da73005f11926eac WHIRLPOOL bf020eaab1b1e339165e51628ec37de8cbf9defde92248a37b519689516ee200287638a2ec489a180c05633bd9d7ddd933793f50ca97f360ad3a8310599d1493
7 7
 DIST kamailio-3.3.1_src.tar.gz 7468878 SHA256 45c153776efad809ec1f88710d7d3cd57c9f805050611378eaccf99bed63a122 SHA512 aa14c17fe113502266819f7824b377d8856aa48380ed4e66f2540d86a646cd19052b5e6da7f28f4b92fcbdd57b4182969536702f6f8f27119295a5c944242883 WHIRLPOOL c01fb645893284e7941f82dd61b3f79761600ac217dc8326614b16580c7d28d5a263c7235379901846948ec80dca695e69a6f617b2df5e1e0802d111432700bd
8
+DIST kamailio-3.3.2_src.tar.gz 7483530 SHA256 dae3ca1c6372ae5a01a7b8e9d49e297c1cee01032b77524d00e6d5082fbeef61 SHA512 4b1ed2d6b6028a3cc3c18ee7f5e54143c15a7d6a4fc6cf7710f3d70415355bfe2e893c7384b94acc0f67c09abf670b87ea15afce0917b085d0419a05b6e771b9 WHIRLPOOL df4a6497c221af621a0f72a84fecad0dc0c09eb485bb40444f35518406cab340fd6eceef6c558283e30c39901f44b0e22ba595503b3f2354dd329bb6adc3edc1
8 9
 EBUILD sip-router-3.1.5.ebuild 8024 SHA256 1adb67682eaa5a9dfee306473023bf7403068199a0e8916db521e230452b1e78 SHA512 8e8bf4b491e9dd5c17230fdd338138188f16a584e9a4e22baea4ac22a767ff8e40860618a630afd959f57fcf0948d7081827ddbcc1a6b62d691518d4716e6a2f WHIRLPOOL 820bbfcb11137d0a9414a9f9ebbb5be6930b269d1341c1b323ea682a55d1514312b918f7150b33034722c4d239f2f4b66a8edf41bec587f382ad24a140278088
9 10
 EBUILD sip-router-3.1.6.ebuild 8106 SHA256 a2959cdeef926236cdbadf06b4c2340ffca7cde1338499a14ca511c60ab3556a SHA512 ac238b7dd0a669a16caa047c99d74c0d0425759340b59785b1a3e593ae9e245d1e8dcf71b052070d8681c5b0db03abf2e7250b7f20fb09837d727809272f2515 WHIRLPOOL d3d332d549b9e73a6e685bbbe8e093372d794fd506e0826103450cc8a59bfa4c7f939d3893dab09ed845541c74ff64d8d04c3aad24ffea9b6964457806e7d387
10 11
 EBUILD sip-router-3.2.3.ebuild 8115 SHA256 fa4b3c79a93ee13bfa8ed47952c549e848b452689d78fac8d8596b4e2966864f SHA512 e257ecf83f44f446098ec6fc7b0565e5ca6b7eb7dbeddc34baacb5592825065ef93a05ca24c3f85b6c817e4c23e407861e7c1bc79d883f4882f7153a88bbc928 WHIRLPOOL 0a44d52e6fbae7e79f2f69b115734174af30cd6b662205e81b84b92b92158e7fb94416fa4d35b5b3c0f6048f6ca7b269c46c860602a276c872b5605cd1b018f0
11 12
 EBUILD sip-router-3.2.4.ebuild 8155 SHA256 4efbbf1cea7d46f065947869723db90dc43453b6451b6830dcf5f5363a3ff5b8 SHA512 2c20dfdee22e54f8a429e4aedcc7c0771c2e03b53a7632a11fdc47335d81ed33fc89070d22775c7cba68f7874fec97ac8441338b44f62be30654092ac0f239af WHIRLPOOL 53a960bc2d8bbd3a1a0a4fc3eee5ded932fd2576b57f12e1030a58913aeab2b61e089a23849c5b65afb41abd299cb7aa9496db343a6f472fc5438de27ef7f67c
12 13
 EBUILD sip-router-3.3.1.ebuild 8327 SHA256 12ab91b617bda58321dfa4d256628f533e299bd78632f7617a1ee7d35800f416 SHA512 d1aba8330182465234f7d64969a64fd412fb1866c22b51ae02b7866aa1936eb2fbe462aa8f43379e1ae19b38e973d9e8663f1faf0412566ca776b6e214423442 WHIRLPOOL f8fb38968d94576f8191dbafdda2c0709511b7f98ae24b3855e53990c55abacb98cbca3bd6c1440656cc41ee5d81e9b57c0765fbaa2ca413d9ce98438ec7207b
13
-MISC ChangeLog 2337 SHA256 910d31eefdfe59cca23c79da591a57b7af8c197ab65f3d8f5e516c29b0d68e4b SHA512 ad9593fe60bb2ba6968b13a4ad4ff1ef40fa8850ac361bfea1023012747850609213d2d93cddc9c0fd148005517456f88900fbfd06b2176086151f762c8328cb WHIRLPOOL 509d0dad423fb9bc1e143a43b92f13ac9ef318860dabf3e2829ad0454051604737273761ecc5b2996887cf57080741a06ec80d3830489d49ca324d0c9a15abb2
14
+EBUILD sip-router-3.3.2.ebuild 8327 SHA256 12ab91b617bda58321dfa4d256628f533e299bd78632f7617a1ee7d35800f416 SHA512 d1aba8330182465234f7d64969a64fd412fb1866c22b51ae02b7866aa1936eb2fbe462aa8f43379e1ae19b38e973d9e8663f1faf0412566ca776b6e214423442 WHIRLPOOL f8fb38968d94576f8191dbafdda2c0709511b7f98ae24b3855e53990c55abacb98cbca3bd6c1440656cc41ee5d81e9b57c0765fbaa2ca413d9ce98438ec7207b
15
+MISC ChangeLog 2480 SHA256 a8bdaddc1f1f468f25499b534236fae5980466ba0333a3aaad7fd8b406f37f9d SHA512 2fc633bfbf0363822764121de7f1dda66c2264ee122ff0843b7647b84b25ad45a04fd0ce3797d84883b35defbf525b17bd67d6b4afd33cdbcff4e22dcda5d7c5 WHIRLPOOL bec2be2ad6cecadadde47f8767d4640ceaae06fc6698fb12b27c174c27c5305199cf2de7c9b277ae53adc629043a5a3dce87e3617e103000b4991e1f2914f400
14 16
 MISC metadata.xml 234 SHA256 4009ad9d312db0ece6fd53e9dfabda98e2c1037ec540eb64d6ab43fe318c1a25 SHA512 cca7444682a294c6173682dc78d73ee82ff19a6a8bc052d6850dab0a49056c0bcca347b83cd592360540399f21016fc360ea29a2234dd8fa1d6e13f6feedee16 WHIRLPOOL a37bbdac2e9489e68e1e0871eb8847dd04df20c4aae756173e7c6a13622ee60c87508f6f26e24b1dbe9c5cb929f57cb86c65042945d8129d3ba1ef8d7338b314
15 17
new file mode 100644
... ...
@@ -0,0 +1,255 @@
1
+# Copyright 1999-2012 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils flag-o-matic toolchain-funcs multilib
6
+
7
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
8
+HOMEPAGE="http://sip-router.org/"
9
+MY_P="${P/sip-router/kamailio}"
10
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
11
+S=${WORKDIR}/${MY_P}
12
+
13
+SLOT="0"
14
+LICENSE="GPL-2"
15
+KEYWORDS="~amd64 ~x86"
16
+
17
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.3.x/
18
+IUSE="flavour_kamailio flavour_ser
19
+debug ipv6 sctp
20
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
21
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence
22
+group_kxml group_kperl group_kldap group_kjson
23
+acc acc_radius alias_db app_lua app_python app_mono async auth auth_identity auth_db auth_diameter auth_radius avpops
24
+benchmark blst
25
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
26
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
27
+db_sqlite ndb_redis db_cassandra db_cluster
28
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting dmq
29
+enum exec geoip group
30
+h350 htable imc ipops iptrtpproxy jabber json jsonrpc-c kex
31
+lcr ldap
32
+matrix maxfwd msrp mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
33
+nathelper nat_traversal
34
+osp
35
+p_usrloc
36
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
37
+presence presence_conference presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml
38
+pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp purple pv
39
+qos
40
+ratelimit regex registrar rls rtimer rr rtpproxy
41
+sanity sdpops seas sipcapture siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
42
+textops textopsx tls tm tmx tmrec topoh
43
+uac uac_redirect uri_db userblacklist usrloc utils
44
+xcap_client xcap_server xhttp xhttp_rpc xlog xmlops xmlrpc xmpp"
45
+
46
+# FIXME: no ebuilds for them
47
+#db_cassandra? ( thrift dev-db/cassandra )
48
+#pdb? ( pdb-server )
49
+#seas? ( www.wesip.eu )
50
+
51
+RDEPEND="
52
+	>=sys-libs/ncurses-5.7
53
+	>=sys-libs/readline-6.1_p2
54
+	group_experimental? ( dev-libs/openssl dev-db/redis dev-db/oracle-instantclient-basic )
55
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
56
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
57
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
58
+	group_postgres? ( dev-db/postgresql-base )
59
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
60
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
61
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
62
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
63
+	group_kpostgres? ( dev-db/postgresql-base )
64
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
65
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
66
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
67
+	group_kldap? ( net-nds/openldap )
68
+	group_kjson? ( dev-libs/json-c dev-libs/libevent )
69
+	acc_radius? ( net-dialup/radiusclient-ng )
70
+	app_lua? ( >=dev-lang/lua-5.1 )
71
+	app_python? ( dev-lang/python )
72
+	app_mono? ( dev-lang/mono )
73
+	auth_identity? ( dev-libs/openssl net-misc/curl )
74
+	carrierroute? ( dev-libs/confuse )
75
+	cpl-c? ( dev-libs/libxml2 )
76
+	db_berkeley? ( >=sys-libs/db-4.6 )
77
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
78
+	db_oracle? ( dev-db/oracle-instantclient-basic )
79
+	db_postgres? ( dev-db/postgresql-base )
80
+	db_sqlite? ( >=dev-db/sqlite-3 )
81
+	db_unixodbc? ( dev-db/unixODBC )
82
+	ndb_redis? ( dev-db/redis )
83
+	dialplan? ( dev-libs/libpcre )
84
+	geoip? ( dev-libs/geoip )
85
+	h350? ( net-nds/openldap )
86
+	jabber? ( dev-libs/expat )
87
+	lcr? ( dev-libs/libpcre )
88
+	ldap? ( net-nds/openldap )
89
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
90
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
91
+	osp? ( net-libs/osptoolkit )
92
+	peering? ( net-dialup/radiusclient-ng )
93
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
94
+	presence? ( dev-libs/libxml2 )
95
+	presence_conference? ( dev-libs/libxml2 )
96
+	presence_xml? ( dev-libs/libxml2 )
97
+	pua? ( dev-libs/libxml2 )
98
+	pua_bla? ( dev-libs/libxml2 )
99
+	pua_dialoginfo? ( dev-libs/libxml2 )
100
+	pua_usrloc? ( dev-libs/libxml2 )
101
+	pua_xmpp? ( dev-libs/libxml2 )
102
+	purple? ( net-im/pidgin )
103
+	regex? ( dev-libs/libpcre )
104
+	rls? ( dev-libs/libxml2 )
105
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
106
+	tls? (
107
+		sys-libs/zlib
108
+		>=dev-libs/openssl-1.0.0a-r1
109
+	)
110
+	utils? ( net-misc/curl )
111
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
112
+	xcap_server? ( dev-libs/libxml2 )
113
+	xmlops? ( dev-libs/libxml2 )
114
+	xmpp? ( dev-libs/expat )
115
+"
116
+DEPEND="${RDEPEND}
117
+	>=sys-devel/bison-1.35
118
+	>=sys-devel/flex-2.5.4a
119
+	app-text/docbook2X"
120
+
121
+src_unpack() {
122
+	unpack ${A}
123
+	cd "${S}"
124
+
125
+	use ipv6 || \
126
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
127
+}
128
+
129
+src_compile() {
130
+	# iptrtpproxy broken as the needed netfilter module is not supported
131
+	local mod_exc="iptrtpproxy"
132
+	local group_inc=""
133
+	local k=""
134
+	if use flavour_kamailio; then
135
+		k="k"
136
+		use group_kxml && group_inc="${group_inc} kxml"
137
+		use group_kperl && group_inc="${group_inc} kperl"
138
+		use group_kldap && group_inc="${group_inc} kldap"
139
+		use group_kjson && group_inc="${group_inc} kjson"
140
+	fi
141
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
142
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
143
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
144
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
145
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
146
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
147
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
148
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
149
+	use group_stable && group_inc="${group_inc} stable"
150
+	use group_experimental && group_inc="${group_inc} experimental"
151
+	# TODO: skip_modules?
152
+
153
+	local mod_inc=""
154
+	# some IUSE flags must not be included here in mod_inc
155
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
156
+	for i in ${IUSE[@]}; do
157
+		for j in ${i[@]}; do
158
+			[[ ! "${i}" =~ "flavour_" ]] && \
159
+				[ ! "${i}" == "debug" ] && \
160
+				[ ! "${i}" == "ipv6" ] && \
161
+				[ ! "${i}" == "sctp" ] && \
162
+				[[ ! "${i}" =~ "group_" ]] && \
163
+			use "${i}" && mod_inc="${mod_inc} ${i}"
164
+		done
165
+	done
166
+
167
+	if use tls; then
168
+		tls_hooks=1
169
+	else
170
+		tls_hooks=0
171
+	fi
172
+
173
+	if use debug; then
174
+		mode=debug
175
+	else
176
+		mode=release
177
+	fi
178
+
179
+	if use flavour_kamailio; then
180
+		flavour=kamailio
181
+	else
182
+		flavour=ser # defaults to SER compatibility names
183
+	fi
184
+
185
+	if use sctp; then
186
+		sctp=1
187
+	else
188
+		sctp=0
189
+	fi
190
+
191
+	emake \
192
+		CC="$(tc-getCC)" \
193
+		CPU_TYPE="$(get-flag march)" \
194
+		SCTP="${sctp}" \
195
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
196
+		mode="${mode}" \
197
+		TLS_HOOKS="${tls_hooks}" \
198
+		FLAVOUR="${flavour}" \
199
+		group_include="${group_inc}" \
200
+		include_modules="${mod_inc}" \
201
+		exclude_modules="${mod_exc}" \
202
+		prefix="/" \
203
+		all || die "emake all failed"
204
+}
205
+
206
+src_install() {
207
+	emake -j1 \
208
+		BASEDIR="${D}" \
209
+		FLAVOUR="${flavour}" \
210
+		prefix="/" \
211
+		bin_dir=/usr/sbin/ \
212
+		cfg_dir=/etc/${flavour}/ \
213
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
214
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
215
+		man_dir="/usr/share/man/" \
216
+		doc_dir="/usr/share/doc/${flavour}/" \
217
+		share_dir="/usr/share/${flavour}/" \
218
+		data_dir="/usr/share/${flavour}/" \
219
+		install || die "emake install failed"
220
+
221
+	sed -e "s/sip-router/${flavour}/g" \
222
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
223
+	sed -e "s/sip-router/${flavour}/g" \
224
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
225
+
226
+	newinitd "${flavour}".initd "${flavour}"
227
+	newconfd "${flavour}".confd "${flavour}"
228
+}
229
+
230
+pkg_preinst() {
231
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
232
+		einfo "Adding ${flavour} user and group"
233
+		enewgroup "${flavour}"
234
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
235
+	fi
236
+
237
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
238
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
239
+
240
+}
241
+
242
+pkg_postinst() {
243
+	if [ use mediaproxy ]; then
244
+		einfo "You have enabled mediaproxy support. In order to use it, you have
245
+		to run it somewhere."
246
+	fi
247
+	if [ use rtpproxy ]; then
248
+		einfo "You have enabled rtpproxy support. In order to use it, you have
249
+		to run it somewhere."
250
+	fi
251
+}
252
+
253
+pkg_prerm () {
254
+	/etc/init.d/"${flavour}" stop >/dev/null
255
+}