Skip to content

Commit 59fccc5

Browse files
committed
add packaging for debian and redhat/fedora
1 parent a06a8e0 commit 59fccc5

File tree

12 files changed

+166
-3
lines changed

12 files changed

+166
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
build/
22
opensips.egg-info/
3-
__pycache__/
3+
__pycache__/
4+
/debian
5+
.pybuild/

opensips/event/asyncevent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ def handle(self, callback):
6262

6363
try:
6464
self.buf.push(data)
65-
while j := self.buf.pop():
65+
j = self.buf.pop()
66+
while j:
6667
callback(j)
68+
j = self.buf.pop()
6769
except JsonBufferMaxAttempts:
6870
callback(None)
6971
return

opensips/event/event.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ def handle(self, callback):
8585

8686
try:
8787
self.buf.push(data)
88-
while j := self.buf.pop():
88+
j = self.buf.pop()
89+
while j:
8990
callback(j)
91+
j = self.buf.pop()
9092
except JsonBufferMaxAttempts:
9193
callback(None)
9294
return

packaging/debian/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/usr/
2+
/DEBIAN/
3+
/.pybuild/
4+
/files
5+
/opensips-cli/
6+
/debhelper-build-stamp
7+
/opensips-cli.substvars
8+
/opensips-cli\.*debhelper*

packaging/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
python3-opensips (0.1.3-1) stable; urgency=low
2+
3+
* Minor Public Release.
4+
5+
-- Razvan Crainea <razvan@opensips.org> Tue, 19 Nov 2024 14:30:00 +0300
6+

packaging/debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

packaging/debian/control

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Source: python3-opensips
2+
Section: python
3+
Priority: optional
4+
Maintainer: Razvan Crainea <razvan@opensips.org>
5+
Build-Depends: debhelper (>= 9), dh-python, python3 (>= 3.6)
6+
Standards-Version: 3.9.8
7+
Homepage: https://github.com/OpenSIPS/python-opensips
8+
9+
Package: python3-opensips
10+
Architecture: all
11+
Multi-Arch: foreign
12+
Depends: python3 (>= 3.6), ${misc:Depends}, ${python3:Depends}
13+
Description: A collection of Python packages for OpenSIPS.
14+
These modules are designed to be as lightweight as possible and provide a
15+
simple interface for interacting with OpenSIPS.
16+
.
17+
OpenSIPS is a very fast and flexible SIP (RFC3261)
18+
server. Written entirely in C, OpenSIPS can handle thousands calls
19+
per second even on low-budget hardware.
20+
.
21+
C Shell-like scripting language provides full control over the server's
22+
behaviour. Its modular architecture allows only required functionality to be
23+
loaded.
24+
.
25+
Among others, the following modules are available: Digest Authentication, CPL
26+
scripts, Instant Messaging, MySQL/PostgreSQL support, Presence Agent, Radius
27+
Authentication, Record Routing, SMS Gateway, Jabber/XMPP Gateway, Transaction
28+
Module, SIP Registrar and User Location, Load Balancing/Dispatching/LCR,
29+
XMLRPC Interface.

packaging/debian/copyright

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: python-opensips
3+
Source: https://github.com/OpenSIPS/python-opensips
4+
5+
Files: *
6+
Copyright: 2024, OpenSIPS Project
7+
License: GPL-3+
8+
9+
License: GPL-3+
10+
This program is free software; you can redistribute it
11+
and/or modify it under the terms of the GNU General Public
12+
License as published by the Free Software Foundation; either
13+
version 3 of the License, or (at your option) any later
14+
version.
15+
.
16+
This program is distributed in the hope that it will be
17+
useful, but WITHOUT ANY WARRANTY; without even the implied
18+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19+
PURPOSE. See the GNU General Public License for more
20+
details.
21+
.
22+
You should have received a copy of the GNU General Public
23+
License along with this package; if not, write to the Free
24+
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25+
Boston, MA 02110-1301 USA
26+
.
27+
On Debian systems, the full text of the GNU General Public
28+
License version 2 can be found in the file
29+
`/usr/share/common-licenses/GPL-3'.

packaging/debian/rules

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/make -f
2+
3+
VERSION=$(shell python -Bc 'import sys; sys.path.append("."); from opensips.version import __version__; print(__version__)')
4+
NAME=python3-opensips
5+
6+
%:
7+
dh $@ --with python3 --buildsystem=pybuild
8+
9+
.PHONY: tar
10+
tar:
11+
tar --transform 's,^\.,$(NAME),' \
12+
--exclude=.git \
13+
--exclude=.gitignore \
14+
--exclude=*.swp \
15+
--exclude=build \
16+
-czf ../$(NAME)_$(VERSION).orig.tar.gz .

packaging/debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

0 commit comments

Comments
 (0)