[hamlib] Moved arch python module to sitearch dir, resolved multilib conflict
Jaroslav Škarvada
jskarvad at fedoraproject.org
Tue Jul 1 13:34:55 UTC 2014
commit aa108b4689a1bf82d4d429b8cd74c4510bc718f1
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Tue Jul 1 15:35:00 2014 +0200
Moved arch python module to sitearch dir, resolved multilib conflict
Resolves: rhbz#1030768
hamlib-1.2.15.3-sitearch-fix.patch | 97 ++++++++++++++++++++++++++++++++++++
hamlib.spec | 17 ++++--
2 files changed, 108 insertions(+), 6 deletions(-)
---
diff --git a/hamlib-1.2.15.3-sitearch-fix.patch b/hamlib-1.2.15.3-sitearch-fix.patch
new file mode 100644
index 0000000..9db985d
--- /dev/null
+++ b/hamlib-1.2.15.3-sitearch-fix.patch
@@ -0,0 +1,97 @@
+diff --git a/bindings/Makefile.am b/bindings/Makefile.am
+index 29d2613..282c7a4 100644
+--- a/bindings/Makefile.am
++++ b/bindings/Makefile.am
+@@ -114,7 +114,7 @@ nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c
+ _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version
+ _Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la
+
+-_Hamlib_ladir = $(pythondir)
++_Hamlib_ladir = $(pyexecdir)
+
+ all-py: $(python_ltlib)
+
+diff --git a/bindings/Makefile.in b/bindings/Makefile.in
+index 88798b5..fb2c203 100644
+--- a/bindings/Makefile.in
++++ b/bindings/Makefile.in
+@@ -91,7 +91,7 @@ am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ am__installdirs = "$(DESTDIR)$(_Hamlib_ladir)" "$(DESTDIR)$(libdir)" \
+- "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(hamlibtcl_ladir)"
++ "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(hamlibtcl_ladir)"
+ LTLIBRARIES = $(_Hamlib_la_LTLIBRARIES) $(lib_LTLIBRARIES)
+ @ENABLE_PYTHON_TRUE at _Hamlib_la_DEPENDENCIES = \
+ @ENABLE_PYTHON_TRUE@ $(top_builddir)/src/libhamlib.la
+@@ -364,7 +364,7 @@ AM_CFLAGS = -fno-strict-aliasing
+ @ENABLE_PYTHON_TRUE at nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c
+ @ENABLE_PYTHON_TRUE at _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version
+ @ENABLE_PYTHON_TRUE at _Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la
+- at ENABLE_PYTHON_TRUE@_Hamlib_ladir = $(pythondir)
++ at ENABLE_PYTHON_TRUE@_Hamlib_ladir = $(pyexecdir)
+ @ENABLE_PYTHON_TRUE at python_PYTHON = Hamlib.py
+ @ENABLE_PYTHON_TRUE at _Hamlib_la_LTLIBRARIES = $(python_ltlib)
+
+@@ -519,8 +519,8 @@ clean-libtool:
+ -rm -rf .libs _libs
+ install-pythonPYTHON: $(python_PYTHON)
+ @$(NORMAL_INSTALL)
+- test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
+- @list='$(python_PYTHON)'; dlist=; list2=; test -n "$(pythondir)" || list=; \
++ test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
++ @list='$(python_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+@@ -531,30 +531,30 @@ install-pythonPYTHON: $(python_PYTHON)
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \
+- $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \
++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \
++ $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+- PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythondir)" $$dlist; \
++ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \
+ else \
+- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythondir)" $$dlist; \
++ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyexecdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+ uninstall-pythonPYTHON:
+ @$(NORMAL_UNINSTALL)
+- @list='$(python_PYTHON)'; test -n "$(pythondir)" || list=; \
++ @list='$(python_PYTHON)'; test -n "$(pyexecdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+- echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \
+- cd "$(DESTDIR)$(pythondir)" && rm -f $$files || exit $$?; \
+- echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$filesc ")"; \
+- cd "$(DESTDIR)$(pythondir)" && rm -f $$filesc || exit $$?; \
+- echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$fileso ")"; \
+- cd "$(DESTDIR)$(pythondir)" && rm -f $$fileso
++ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$files ")"; \
++ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$files || exit $$?; \
++ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$filesc ")"; \
++ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$filesc || exit $$?; \
++ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$fileso ")"; \
++ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$fileso
+ install-hamlibtcl_laDATA: $(hamlibtcl_la_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(hamlibtcl_ladir)" || $(MKDIR_P) "$(DESTDIR)$(hamlibtcl_ladir)"
+@@ -664,7 +664,7 @@ check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+ all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(DATA) all-local
+ installdirs:
+- for dir in "$(DESTDIR)$(_Hamlib_ladir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(hamlibtcl_ladir)"; do \
++ for dir in "$(DESTDIR)$(_Hamlib_ladir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(hamlibtcl_ladir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: $(BUILT_SOURCES)
diff --git a/hamlib.spec b/hamlib.spec
index a4c2537..2eae301 100644
--- a/hamlib.spec
+++ b/hamlib.spec
@@ -1,18 +1,18 @@
-%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global __provides_exclude_from ^%{_libdir}/hamlib/.*\\.so$
Name: hamlib
Version: 1.2.15.3
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: Run-time library to control radio transceivers and receivers
Group: System Environment/Libraries
License: GPLv2+ and LGPLv2+
URL: http://hamlib.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-#Install python and perl bindings into proper dirs
+# Install python and perl bindings into proper dirs
Patch0: hamlib-1.2.13-bindings.patch
-
+# Install python bindings to sitearch
+Patch1: hamlib-1.2.15.3-sitearch-fix.patch
BuildRequires: python-devel, swig, gd-devel, libxml2-devel, tcl-devel
BuildRequires: libusb-devel, pkgconfig, boost-devel, libtool-ltdl-devel
BuildRequires: doxygen
@@ -92,6 +92,7 @@ Hamlib TCL Language bindings to allow radio control from TCL scripts.
%prep
%setup -q
%patch0 -p1 -b .bindings
+%patch1 -p1 -b .sitearch-fix
%build
%configure \
@@ -191,13 +192,17 @@ find $RPM_BUILD_ROOT -type f -name perltest.pl -exec rm -f {} ';'
%{perl_vendorarch}/*
%files python
-%{python_sitelib}/*.py*
-%{python_sitelib}/_Hamlib.so
+%{python_sitearch}/*.py*
+%{python_sitearch}/_Hamlib.so
%files tcl
%{_libdir}/hamlibtcl*
%changelog
+* Tue Jul 1 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 1.2.15.3-11
+- Moved arch python module to sitearch dir, resolved multilib conflict
+ Resolves: rhbz#1030768
+
* Tue Jun 24 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 1.2.15.3-10
- Switched to recent dependency filtering system,
it should resolve most of the multilib conflicts
More information about the scm-commits
mailing list