]> git.pld-linux.org Git - packages/opensips.git/commitdiff
- updated to 2.1.1
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 1 Jan 2016 13:56:55 +0000 (14:56 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 1 Jan 2016 13:56:55 +0000 (14:56 +0100)
- fix install dir on x32
- fix totally broken makefile system

make.patch [new file with mode: 0644]
opensips.spec
x32.patch [new file with mode: 0644]

diff --git a/make.patch b/make.patch
new file mode 100644 (file)
index 0000000..4e0dc87
--- /dev/null
@@ -0,0 +1,161 @@
+diff -ur opensips-2.1.1/Makefile opensips-2.1.1.make/Makefile
+--- opensips-2.1.1/Makefile    2015-08-27 17:06:47.000000000 +0200
++++ opensips-2.1.1.make/Makefile       2016-01-01 14:30:11.252303815 +0100
+@@ -55,7 +55,6 @@
+ tls_overwrite_certs?=
+-makefile_defs=0
+ DEFS:=
+ DEBUG_PARSER?=
+@@ -476,7 +475,7 @@
+ # Install everything (except modules-docbook?)
+ install: install-app install-console install-modules-all
+-opensipsmc: $(cfg-prefix)/$(cfg-dir) $(data-prefix)/$(data-dir)
++opensipsmc: $(cfg-dir) $(data-dir)
+       $(MAKE) -C menuconfig proper
+       $(MAKE) -C menuconfig \
+               MENUCONFIG_CFG_PATH=$(data-target)/menuconfig_templates/ \
+@@ -493,14 +492,14 @@
+       $(MAKE) -C db/schema
+       -@echo "Done"
+-mk-install-dirs: $(cfg-prefix)/$(cfg-dir) $(bin-prefix)/$(bin-dir) \
+-                      $(modules-prefix)/$(modules-dir) $(doc-prefix)/$(doc-dir) \
+-                      $(man-prefix)/$(man-dir)/man8 $(man-prefix)/$(man-dir)/man5 \
+-                      $(data-prefix)/$(data-dir)
++mk-install-dirs: $(cfg-dir) $(bin-dir) \
++                      $(modules-dir) $(doc-dir) \
++                      $(man-dir)/man8 $(man-dir)/man5 \
++                      $(data-dir)
+               
+ # note: on solaris 8 sed: ? or \(...\)* (a.s.o) do not work
+-install-cfg: $(cfg-prefix)/$(cfg-dir)
++install-cfg: $(cfg-dir)
+               sed -e "s#/usr/.*lib/$(NAME)/modules/#$(modules-target)#g" \
+                       < etc/$(NAME).cfg > $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample0
+               sed -e "s#/usr/.*etc/$(NAME)/tls/#$(cfg-target)tls/#g" \
+@@ -531,7 +530,7 @@
+                               $(cfg-prefix)/$(cfg-dir)/osipsconsolerc; \
+               fi
+-install-console: $(bin-prefix)/$(bin-dir)
++install-console: $(bin-dir)
+               # install osipsconsole
+               cat scripts/osipsconsole | \
+               sed -e "s#PATH_BIN[ \t]*=[ \t]*\"\./\"#PATH_BIN = \"$(bin-target)\"#g" | \
+@@ -544,7 +543,7 @@
+               $(INSTALL_BIN) /tmp/osipsconsole $(bin-prefix)/$(bin-dir)
+               rm -fr /tmp/osipsconsole
+-install-bin: $(bin-prefix)/$(bin-dir) utils
++install-bin: $(bin-dir) utils
+               # install opensips binary
+               $(INSTALL_TOUCH) $(bin-prefix)/$(bin-dir)/$(NAME) 
+               $(INSTALL_BIN) $(NAME) $(bin-prefix)/$(bin-dir)
+@@ -615,7 +614,8 @@
+                       cd utils/db_oracle; $(MAKE) all ; \
+               fi ;
+-install-modules: modules $(modules-prefix)/$(modules-dir)
++install-modules: modules $(modules-dir)
++      echo $(modules_full_path)
+       @for r in $(modules_full_path) "" ; do \
+               if [ -n "$$r" ]; then \
+                       if [ -f "$$r" ]; then \
+@@ -633,14 +633,14 @@
+ .PHONY: install-doc install-app-doc install-modules-doc
+ install-doc: install-app-doc install-modules-doc
+-install-app-doc: $(doc-prefix)/$(doc-dir)
++install-app-doc: $(doc-dir)
+       -@for d in $(install_docs) ""; do \
+               $(INSTALL_TOUCH) $(doc-prefix)/$(doc-dir)/"$$d" ; \
+               $(INSTALL_DOC) "$$d" $(doc-prefix)/$(doc-dir) ; \
+       done
+-install-modules-doc: $(doc-prefix)/$(doc-dir)
++install-modules-doc: $(doc-dir)
+       -@for r in $(modules_basenames) "" ; do \
+               if [ -n "$$r" ]; then \
+                       if [ -f modules/"$$r"/README ]; then \
+@@ -652,7 +652,7 @@
+       done 
+-install-man: $(man-prefix)/$(man-dir)/man8 $(man-prefix)/$(man-dir)/man5
++install-man: $(man-dir)/man8 $(man-dir)/man5
+               sed -e "s#/etc/$(NAME)/$(NAME)\.cfg#$(cfg-target)$(NAME).cfg#g" \
+                       -e "s#/usr/sbin/#$(bin-target)#g" \
+                       -e "s#/usr/lib/$(NAME)/modules/#$(modules-target)#g" \
+@@ -679,7 +679,7 @@
+                       $(man-prefix)/$(man-dir)/man8/opensipsunix.8
+               chmod 644  $(man-prefix)/$(man-dir)/man8/opensipsunix.8
+-install-modules-docbook: $(doc-prefix)/$(doc-dir)
++install-modules-docbook: $(doc-dir)
+       -@for r in $(modules_basenames) "" ; do \
+               if [ -n "$$r" ]; then \
+                       if [ -d modules/"$$r"/doc ]; then \
+diff -ur opensips-2.1.1/Makefile.defs opensips-2.1.1.make/Makefile.defs
+--- opensips-2.1.1/Makefile.defs       2015-08-27 17:06:47.000000000 +0200
++++ opensips-2.1.1.make/Makefile.defs  2016-01-01 14:29:50.262273910 +0100
+@@ -51,11 +51,6 @@
+ # check if already included/exported
+-ifeq ($(makefile_defs), 1)
+-else
+-makefile_defs=1
+-export makefile_defs
+-
+ # main binary name
+ MAIN_NAME=opensips
+@@ -1515,6 +1510,3 @@
+               DEFS+= -DUSE_SYSV_SEM  # try sys v sems
+               found_lock_method=yes
+ endif
+-
+-
+-endif  # ifeq ($(makefile_defs, 1)
+diff -ur opensips-2.1.1/Makefile.rules opensips-2.1.1.make/Makefile.rules
+--- opensips-2.1.1/Makefile.rules      2015-08-27 17:06:47.000000000 +0200
++++ opensips-2.1.1.make/Makefile.rules 2016-01-01 14:03:59.144326624 +0100
+@@ -61,25 +61,25 @@
+               cp $< $@; \
+       fi
+-$(cfg-prefix)/$(cfg-dir): 
++$(cfg-dir): 
+               mkdir -p $(cfg-prefix)/$(cfg-dir)
+-$(bin-prefix)/$(bin-dir):
++$(bin-dir):
+               mkdir -p $(bin-prefix)/$(bin-dir)
+-$(modules-prefix)/$(modules-dir):
++$(modules-dir):
+               mkdir -p $(modules-prefix)/$(modules-dir)
+-$(doc-prefix)/$(doc-dir):
++$(doc-dir):
+               mkdir -p $(doc-prefix)/$(doc-dir)
+-$(man-prefix)/$(man-dir)/man8:
++$(man-dir)/man8:
+               mkdir -p $(man-prefix)/$(man-dir)/man8
+-$(man-prefix)/$(man-dir)/man5:
++$(man-dir)/man5:
+               mkdir -p $(man-prefix)/$(man-dir)/man5
+-$(data-prefix)/$(data-dir):
++$(data-dir):
+               mkdir -p $(data-prefix)/$(data-dir)
index 649986828d25a110ad6d8e008d9bc42c7fea9ae8..86d32d0ff3e2602d577a745ff7515c1d2efbb509 100644 (file)
 %bcond_without mongodb         # mongodb support
 %bcond_with    sngtc           # Sangoma transcoding module support
 
+%ifarch x32
+%undefine      with_mongodb
+%endif
 Summary:       SIP proxy, redirect and registrar server
 Summary(pl.UTF-8):     Serwer SIP rejestrujący, przekierowujący i robiący proxy
 Name:          opensips
-Version:       2.1.0
-Release:       0.3
+Version:       2.1.1
+Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://opensips.org/pub/opensips/%{version}/src/%{name}-%{version}.tar.gz
-# Source0-md5: 68375c1b6cb546ad2c036b5a1c5b31b9
+# Source0-md5: ea7b3d394eb7461e172af4b900f19b70
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.service
+Patch0:                x32.patch
+Patch1:                make.patch
 URL:           http://www.opensips.org/
 %{?with_sngtc:BuildRequires:    TODO-SNGTC-BRs}
 %{?with_geoip:BuildRequires:   GeoIP-devel}
@@ -281,6 +286,8 @@ Interfejs HTTP do openSIPS.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 exclude_modules="%{exclude_modules}"
@@ -333,12 +340,13 @@ echo "$exclude_modules" > exclude_modules
 %{__make} all \
        Q= \
        exclude_modules="$exclude_modules" \
-       prefix="%{_prefix}" \
+       prefix=%{_prefix} \
+       PREFIX=%{_prefix} \
+       LIBDIR=%{_lib} \
        cfg-prefix=$RPM_BUILD_ROOT \
        cfg-target=/etc/opensips/ \
        CC="%{__cc}" \
        CC_EXTRA_OPTS="-I/usr/include/ncurses" \
-       PREFIX="%{_prefix}" \
        CFLAGS="%{rpmcflags} -Wcast-align"
 
 %install
@@ -350,8 +358,10 @@ exclude_modules="$(cat exclude_modules)"
 %{__make} install -j1 \
        Q= \
        exclude_modules="$exclude_modules" \
-       prefix="%{_prefix}" \
-       basedir=$RPM_BUILD_ROOT \
+       prefix=%{_prefix} \
+       PREFIX=%{_prefix} \
+       LIBDIR=%{_lib} \
+       BASEDIR=$RPM_BUILD_ROOT \
        cfg-prefix=$RPM_BUILD_ROOT \
        cfg-target=/etc/opensips/ \
        INSTALLMIBDIR=$RPM_BUILD_ROOT%{_datadir}/mibs
@@ -405,6 +415,24 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/opensips.cfg
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/opensipsctlrc
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/osipsconsolerc
+%dir %attr(700,root,root) %{_sysconfdir}/opensips/tls
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/README
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/ca.conf
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/request.conf
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/user.conf
+%dir %attr(700,root,root) %{_sysconfdir}/opensips/tls/rootCA
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/rootCA/cacert.pem
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/rootCA/index.txt
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/rootCA/serial
+%dir %attr(700,root,root) %{_sysconfdir}/opensips/tls/rootCA/certs
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/rootCA/certs/01.pem
+%dir %attr(700,root,root) %{_sysconfdir}/opensips/tls/rootCA/private
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/rootCA/private/cakey.pem
+%dir %attr(700,root,root) %{_sysconfdir}/opensips/tls/user
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/user/user-calist.pem
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/user/user-cert.pem
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/user/user-cert_req.pem
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensips/tls/user/user-privkey.pem
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/opensips
 %attr(754,root,root) /etc/rc.d/init.d/opensips
 %{systemdunitdir}/opensips.service
@@ -528,6 +556,7 @@ fi
 %{_datadir}/%{name}/db_berkeley
 %{_datadir}/%{name}/dbtext
 %{_datadir}/%{name}/menuconfig_templates
+%{_datadir}/%{name}/pi_http
 %{_mandir}/man*/*
 
 %files xmpp
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..ecb8234
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,50 @@
+--- opensips-2.1.0/atomic.h.orig       2015-04-22 10:20:03.000000000 +0200
++++ opensips-2.1.0/atomic.h    2015-12-31 15:23:47.575835666 +0100
+@@ -142,7 +142,11 @@
+ static __inline__ void atomic_add(unsigned long i, atomic_t *v)
+ {
+       __asm__ __volatile__(
++#if defined(__ILP32__)
++              LOCK "add %1,%0"
++#else
+               LOCK "addq %1,%0"
++#endif
+               :"=m" (v->counter)
+               :"er" (i), "m" (v->counter));
+ }
+@@ -157,7 +161,11 @@
+ static __inline__ void atomic_sub(unsigned long i, atomic_t *v)
+ {
+       __asm__ __volatile__(
++#if defined(__ILP32__)
++              LOCK "sub %1,%0"
++#else
+               LOCK "subq %1,%0"
++#endif
+               :"=m" (v->counter)
+               :"er" (i), "m" (v->counter));
+ }
+@@ -171,7 +179,11 @@
+ static __inline__ void atomic_inc(atomic_t *v)
+ {
+       __asm__ __volatile__(
++#if defined(__ILP32__)
++              LOCK "inc %0"
++#else
+               LOCK "incq %0"
++#endif
+               :"=m" (v->counter)
+               :"m" (v->counter));
+ }
+@@ -185,7 +197,11 @@
+ static __inline__ void atomic_dec(atomic_t *v)
+ {
+       __asm__ __volatile__(
++#if defined(__ILP32__)
++              LOCK "dec %0"
++#else
+               LOCK "decq %0"
++#endif
+               :"=m" (v->counter)
+               :"m" (v->counter));
+ }
This page took 0.258209 seconds and 4 git commands to generate.