[packages/norm] - updated to 1.5.9 (as 1.5r9) - removed obsolete c++,link patches
qboosh
qboosh at pld-linux.org
Tue Apr 27 21:09:37 CEST 2021
commit 1cc3b5a5a9df23739e36f2be480653200d8420d5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Apr 27 21:11:08 2021 +0200
- updated to 1.5.9 (as 1.5r9)
- removed obsolete c++,link patches
norm-c++.patch | 11 ----------
norm-link.patch | 11 ----------
norm.spec | 64 +++++++++++++++++++++++++++++++++++++++++----------------
3 files changed, 46 insertions(+), 40 deletions(-)
---
diff --git a/norm.spec b/norm.spec
index bf43cff..f6cdbdf 100644
--- a/norm.spec
+++ b/norm.spec
@@ -8,21 +8,21 @@ Summary(pl.UTF-8): Biblioteka NACK-Oriented Reliable Multicast
Name: norm
# upstream changed versioning scheme 1.5r6 -> 1.5.7, but rpm says thay 1.5r6 > 1.5.8
# so let's delay switching to avoid epoch bumps until 1.6.x series
-Version: 1.5r8
+Version: 1.5r9
%define fver %(echo %{version} | tr r .)
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/USNavalResearchLaboratory/norm/releases
-#Source0: https://github.com/USNavalResearchLaboratory/norm/releases/download/v%{fver}/src-norm-with-protolib-%{fver}.tar.gz
-Source0: https://downloads.pf.itd.nrl.navy.mil/norm/src-%{name}-%{fver}.tgz
-# Source0-md5: 6c4da91ea600643005297d8b6e8e1a04
-Patch0: %{name}-c++.patch
-Patch1: %{name}-link.patch
+Source0: https://github.com/USNavalResearchLaboratory/norm/releases/download/v%{fver}/src-norm-%{fver}.tgz
+# Source0-md5: fea518e8fa7d5205d3ff455b9f224da8
URL: https://www.nrl.navy.mil/itd/ncs/products/norm
%{?with_java:BuildRequires: jdk}
BuildRequires: libstdc++-devel
%{?with_python:BuildRequires: python-devel >= 1:2.5}
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: sed >= 4.0
BuildRequires: waf
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -44,6 +44,18 @@ Header files for NORM library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki NORM.
+%package static
+Summary: Static NORM library
+Summary(pl.UTF-8): Statyczna biblioteka NORM
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static NORM library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka NORM.
+
%package -n java-norm
Summary: Java JNI bindings for NORM
Summary(pl.UTF-8): Wiązania JNI Javy do biblioteki NORM
@@ -62,6 +74,7 @@ Summary: PyNORM - Python wrapper for NORM and Extras
Summary(pl.UTF-8): PyNORM - interfejs Pythona do biblioteki NORM oraz dodatki
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
%description -n python-pynorm
PyNORM provides a thin wrapper around the NORM C API in the main
@@ -74,20 +87,27 @@ głównym pakiecie. Zawiera także kilka dodatkowych modułów w pakiecie
extra; pozwalają one na wykorzystanie NORM na wyższym poziomie.
%prep
-%setup -q -n %{name}-%{fver}
-%patch0 -p1
-%patch1 -p1
+# despite .tgz extension it's plain tar archive
+%setup -q -c -T
+tar xf %{SOURCE0}
+#setup -n %{name}-%{fver}
+
+# load by SONAME
+%{__sed} -i -e 's/"libnorm\.so"/"libnorm.so.1"/' src/pynorm/core.py
%build
%waf configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
- %{?with_java:--build-java} \
- %{?with_python:--build-python}
+ %{?with_java:--build-java}
%waf \
--verbose
+%if %{with python}
+%py_build
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_includedir}
@@ -96,13 +116,13 @@ install -d $RPM_BUILD_ROOT%{_includedir}
--destdir=$RPM_BUILD_ROOT \
--verbose
-cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}
-
%if %{with java}
-install -D build/norm.jar $RPM_BUILD_ROOT%{_javadir}/norm.jar
+install -Dp build/norm.jar $RPM_BUILD_ROOT%{_javadir}/norm.jar
%endif
%if %{with python}
+%py_install
+
%py_postclean
%endif
@@ -117,16 +137,24 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc LICENSE.TXT README.TXT TODO.TXT VERSION.TXT
+%doc LICENSE README.md TODO.TXT VERSION.TXT
%attr(755,root,root) %{_libdir}/libnorm.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnorm.so.1
+%attr(755,root,root) %{_libdir}/libprotokit.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libprotokit.so.3
%files devel
%defattr(644,root,root,755)
%doc NormSocketBindingNotes.txt doc/{NormDeveloperGuide.pdf,NormUserGuide.pdf,npcUsage.pdf}
%attr(755,root,root) %{_libdir}/libnorm.so
-%{_includedir}/galois.h
-%{_includedir}/norm*.h
+%attr(755,root,root) %{_libdir}/libprotokit.so
+%{_includedir}/normApi.h
+%{_pkgconfigdir}/norm.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libnorm.a
+%{_libdir}/libprotokit.a
%if %{with java}
%files -n java-norm
@@ -143,6 +171,6 @@ rm -rf $RPM_BUILD_ROOT
%files -n python-pynorm
%defattr(644,root,root,755)
%doc README-PyNorm.txt
-%attr(755,root,root) %{py_sitedir}/protokit.so
%{py_sitescriptdir}/pynorm
+%{py_sitescriptdir}/pynorm-1.0-py*.egg-info
%endif
diff --git a/norm-c++.patch b/norm-c++.patch
deleted file mode 100644
index 0c58a7b..0000000
--- a/norm-c++.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- norm-1.5.8/src/java/jni/normInstanceJni.cpp.orig 2018-05-03 20:16:54.000000000 +0200
-+++ norm-1.5.8/src/java/jni/normInstanceJni.cpp 2019-04-12 15:49:16.266929530 +0200
-@@ -182,7 +182,7 @@
-
- if (env->GetArrayLength(array) <= event.type) {
- env->ThrowNew((jclass)env->NewLocalRef(jw_IOException), "Invalid NORM event type (NormEventType.java out of sync with NORM API event header?)");
-- return false;
-+ return NULL;
- }
-
- jobject type = env->GetObjectArrayElement(array, event.type);
diff --git a/norm-link.patch b/norm-link.patch
deleted file mode 100644
index 76890a6..0000000
--- a/norm-link.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- norm-1.5.8/wscript.orig 2018-07-07 19:10:14.000000000 +0200
-+++ norm-1.5.8/wscript 2019-04-12 18:09:25.511372745 +0200
-@@ -132,7 +132,7 @@
- if ctx.env.BUILD_JAVA:
- ctx.shlib(
- target = 'mil_navy_nrl_norm',
-- use = ['norm_shlib', 'JAVA'],
-+ use = ['norm', 'JAVA'],
- vnum = VERSION,
- source = ['src/java/jni/{0}.cpp'.format(x) for x in [
- 'normJni',
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/norm.git/commitdiff/1cc3b5a5a9df23739e36f2be480653200d8420d5
More information about the pld-cvs-commit
mailing list