diff --git a/hamlib-1.2.13-bindings.patch b/hamlib-1.2.13-bindings.patch deleted file mode 100644 index 0d42f52..0000000 --- a/hamlib-1.2.13-bindings.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -Naur hamlib-1.2.13/bindings/Makefile.am hamlib-1.2.13-mod/bindings/Makefile.am ---- hamlib-1.2.13/bindings/Makefile.am 2011-03-12 16:57:07.000000000 +0200 -+++ hamlib-1.2.13-mod/bindings/Makefile.am 2011-04-24 14:15:40.000000000 +0300 -@@ -32,7 +32,8 @@ - CC="$(CC)" \ - OBJECT="hamlibperl_wrap.o" \ - VERSION="$(PACKAGE_VERSION)" \ -- LIBS="-L$(top_builddir)/src/.libs -lhamlib" -+ LIBS="-L$(top_builddir)/src/.libs -lhamlib" \ -+ INSTALLDIRS=vendor - sed -e 's/^LD_RUN_PATH.*/LD_RUN_PATH =/' Hamlib-pl.mk > Hamlib-pl-norpath.mk - mv Hamlib-pl-norpath.mk Hamlib-pl.mk - -@@ -52,7 +53,7 @@ - $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distcheck - - install-perl: Hamlib-pl.mk -- $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk install_site -+ $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk pure_install - - ## ExtUtils::MakeMaker says uninstall is deprecated and won't remove the files - ## anyway, so we'll have to figure out another way to remove the installed files. -diff -Naur hamlib-1.2.13/bindings/Makefile.in hamlib-1.2.13-mod/bindings/Makefile.in ---- hamlib-1.2.13/bindings/Makefile.in 2011-03-12 16:58:19.000000000 +0200 -+++ hamlib-1.2.13-mod/bindings/Makefile.in 2011-04-24 14:26:13.000000000 +0300 -@@ -330,7 +330,7 @@ - hamlibperl_wrap.c Hamlib.pm Hamlib.bs - AM_CFLAGS = -fno-strict-aliasing - @ENABLE_TCL_TRUE@tcl_ltlib = hamlibtcl.la --@ENABLE_TCL_TRUE@tcldir = $(prefix)/lib/tcl -+@ENABLE_TCL_TRUE@tcldir = $(libdir)/tcl - @ENABLE_TCL_TRUE@PKG_VER = 1.0 - @ENABLE_TCL_TRUE@DLL = hamlibtcl-$(PKG_VER)@TCL_SHLIB_SUFFIX@ - @ENABLE_TCL_TRUE@nodist_hamlibtcl_la_SOURCES = hamlibtcl_wrap.c -@@ -787,7 +787,8 @@ - CC="$(CC)" \ - OBJECT="hamlibperl_wrap.o" \ - VERSION="$(PACKAGE_VERSION)" \ -- LIBS="-L$(top_builddir)/src/.libs -lhamlib" -+ LIBS="-L$(top_builddir)/src/.libs -lhamlib" \ -+ INSTALLDIRS=vendor - sed -e 's/^LD_RUN_PATH.*/LD_RUN_PATH =/' Hamlib-pl.mk > Hamlib-pl-norpath.mk - mv Hamlib-pl-norpath.mk Hamlib-pl.mk - -@@ -806,7 +807,7 @@ - $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distcheck - - install-perl: Hamlib-pl.mk -- $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk install_site -+ $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk pure_install - - uninstall-perl: ## Hamlib-pl.mk - diff --git a/hamlib-1.2.15.3-sitearch-fix.patch b/hamlib-1.2.15.3-sitearch-fix.patch deleted file mode 100644 index 9db985d..0000000 --- a/hamlib-1.2.15.3-sitearch-fix.patch +++ /dev/null @@ -1,97 +0,0 @@ -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@_Hamlib_la_DEPENDENCIES = \ - @ENABLE_PYTHON_TRUE@ $(top_builddir)/src/libhamlib.la -@@ -364,7 +364,7 @@ AM_CFLAGS = -fno-strict-aliasing - @ENABLE_PYTHON_TRUE@nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c - @ENABLE_PYTHON_TRUE@_Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version - @ENABLE_PYTHON_TRUE@_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la --@ENABLE_PYTHON_TRUE@_Hamlib_ladir = $(pythondir) -+@ENABLE_PYTHON_TRUE@_Hamlib_ladir = $(pyexecdir) - @ENABLE_PYTHON_TRUE@python_PYTHON = Hamlib.py - @ENABLE_PYTHON_TRUE@_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-3.0-perl_install.patch b/hamlib-3.0-perl_install.patch new file mode 100644 index 0000000..b6b93e2 --- /dev/null +++ b/hamlib-3.0-perl_install.patch @@ -0,0 +1,12 @@ +diff -Naur hamlib-3.0~rc1.orig/bindings/Makefile.am hamlib-3.0~rc1/bindings/Makefile.am +--- hamlib-3.0~rc1.orig/bindings/Makefile.am 2015-08-22 11:27:18.000000000 -0500 ++++ hamlib-3.0~rc1/bindings/Makefile.am 2015-09-02 08:47:47.252243932 -0500 +@@ -63,7 +63,7 @@ + $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distcheck + + install-perl: Hamlib-pl.mk +- $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk install_site ++ $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk pure_vendor_install + + ## ExtUtils::MakeMaker says uninstall is deprecated and won't remove the files + ## anyway, so we'll have to figure out another way to remove the installed files. diff --git a/hamlib.spec b/hamlib.spec index 8b7c8df..d339558 100644 --- a/hamlib.spec +++ b/hamlib.spec @@ -1,23 +1,35 @@ -%global __provides_exclude_from ^%{_libdir}/hamlib/.*\\.so$ +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +# Release candidate +#global pre rc1 Name: hamlib -Version: 1.2.15.3 -Release: 20%{?dist} +Version: 3.0 +Release: 1%{?pre:.%{pre}}%{?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 -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 +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{?pre:~%{pre}}.tar.gz + +Patch1: hamlib-3.0-perl_install.patch + +BuildRequires: python2-devel, swig, gd-devel, libxml2-devel, tcl-devel BuildRequires: libusb-devel, pkgconfig, boost-devel, libtool-ltdl-devel BuildRequires: doxygen #for perl BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: automake autoconf libtool + +Requires(post): info +Requires(preun): info + +# Filter provides from private libraries. +%{?perl_default_filter} %description @@ -29,120 +41,131 @@ which lets one control a radio transceiver or receiver, either from command line interface or in a text-oriented interactive interface. %package devel -Summary: Development library to control radio transceivers and receivers -Group: Development/Libraries -Requires: hamlib%{?_isa} = %{version}-%{release} +Summary: Development library to control radio transceivers and receivers +Requires: hamlib%{?_isa} = %{version}-%{release} +Requires: hamlib-tcl%{?_isa} = %{version}-%{release} %description devel Hamlib radio control library C development headers and libraries for building C applications with Hamlib. %package doc -Summary: Documentation for the hamlib radio control library -Group: Documentation -BuildArch: noarch +Summary: Documentation for the hamlib radio control library +Group: Documentation +BuildArch: noarch %description doc This package provides the developers documentation for the hamlib radio control library API. %package c++ -Summary: Hamlib radio control library C++ binding -Group: Development/Libraries -Requires: hamlib%{?_isa} = %{version}-%{release} +Summary: Hamlib radio control library C++ binding +Requires: hamlib%{?_isa} = %{version}-%{release} %description c++ Hamlib radio control library C++ language binding. %package c++-devel -Summary: Hamlib radio control library C++ binding development headers and libraries -Group: Development/Libraries -Requires: hamlib-devel%{?_isa} = %{version}-%{release} -Requires: hamlib-c++%{?_isa} = %{version}-%{release} +Summary: Hamlib radio control library C++ binding development headers and libraries +Requires: hamlib-devel%{?_isa} = %{version}-%{release} +Requires: hamlib-c++%{?_isa} = %{version}-%{release} %description c++-devel Hamlib radio control library C++ binding development headers and libraries for building C++ applications with Hamlib. -%package perl -Summary: Hamlib radio control library Perl binding -Group: Development/Libraries -Requires: hamlib%{?_isa} = %{version}-%{release} +%package -n perl-%{name} +Summary: Hamlib radio control library Perl binding +Requires: hamlib%{?_isa} = %{version}-%{release} +Obsoletes: hamlib-perl < 3.0 +Provides: hamlib-perl -%description perl +%description -n perl-%{name} Hamlib PERL Language bindings to allow radio control from PERL scripts. -%package python -Summary: Hamlib radio control library Python binding -Group: Development/Libraries -Requires: hamlib%{?_isa} = %{version}-%{release}, python -%description python -Hamlib Python Language bindings to allow radio control from Python scripts. +%package -n python-%{name} +Summary: Hamlib radio control library Python binding +Requires: hamlib%{?_isa} = %{version}-%{release}, python +Obsoletes: hamlib-python < 3.0 +Provides: hamlib-python -%package tcl -Summary: Hamlib radio control library TCL binding -Group: Development/Libraries -Requires: hamlib%{?_isa} = %{version}-%{release} +%description -n python-%{name} +Hamlib Python Language bindings to allow radio control from Python scripts. -%description tcl +%package -n tcl-%{name} +Summary: Hamlib radio control library TCL binding +Requires: hamlib%{?_isa} = %{version}-%{release} +Obsoletes: hamlib-tcl < 3.0 +Provides: hamlib-tcl + +%description -n tcl-%{name} Hamlib TCL Language bindings to allow radio control from TCL scripts. + %prep -%setup -q -%patch0 -p1 -b .bindings -%patch1 -p1 -b .sitearch-fix +%setup -q -n %{name}-%{version}%{?pre:~%{pre}} +%patch1 -p1 -b .perl_inst + %build +autoreconf -fi %configure \ - --with-ldtl-include=%{_includedir} \ - --with-ldtl-lib=%{_libdir} \ --disable-static \ - --with-rigmatrix \ - --enable-tcl-binding \ + --with-tcl-binding \ --with-perl-binding \ --with-python-binding \ -# usrp depreciated -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -# Build libs, drivers, and programs, won't build with smpflags -make +make V=1 + # Build Documentation make -C doc doc + %install -make DESTDIR=$RPM_BUILD_ROOT install +%make_install + +# Remove dir file as install-info updates the system copy +rm -f %{buildroot}%{_infodir}/dir + #install documentation -mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/html/search +mkdir -p %{buildroot}%{_docdir}/%{name}/html/search for f in `find doc/html/ -type f -maxdepth 1` - do install -D -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name}/`echo $f | cut -d '/' -f2` + do install -D -m 0644 $f %{buildroot}%{_docdir}/%{name}/`echo $f | cut -d '/' -f2` done for f in `find doc/html/search -type f -maxdepth 1` - do install -D -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name}/html/`echo $f | cut -d '/' -f3` + do install -D -m 0644 $f %{buildroot}%{_docdir}/%{name}/html/`echo $f | cut -d '/' -f3` done + # move installed docs to include them in subpackage via %%doc magic rm -rf __tmp_doc ; mkdir __tmp_doc -mv ${RPM_BUILD_ROOT}%{_docdir}/%{name}/* __tmp_doc +mv %{buildroot}%{_docdir}/%{name}/* __tmp_doc -rm -f $RPM_BUILD_ROOT%{_libdir}/hamlib-*.a $RPM_BUILD_ROOT%{_libdir}/hamlib-*.la -find $RPM_BUILD_ROOT -name \*.la -exec rm {} \; +#fix permissions +find %{buildroot} -type f -name Hamlib.so -exec chmod 0755 {} ';' -/sbin/ldconfig -N -n $RPM_BUILDROOT%{_libdir} +#remove unneeded files +find %{buildroot} -name \*.la -exec rm -f {} ';' +find %{buildroot} -type f -name pkgIndex.tcl -exec rm -f {} ';' +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -type f -name Hamlib.bs -exec rm -f {} ';' +find %{buildroot} -type f -name perltest.pl -exec rm -f {} ';' -#fix permissions -find $RPM_BUILD_ROOT -type f -name Hamlib.so -exec chmod 0755 {} ';' -#remove this, not needed -find $RPM_BUILD_ROOT -type f -name pkgIndex.tcl -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type f -name Hamlib.bs -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type f -name perltest.pl -exec rm -f {} ';' +%check +make V=1 check -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : + +%preun +if [ $1 = 0 ] ; then + /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : +fi %postun -p /sbin/ldconfig @@ -150,23 +173,22 @@ find $RPM_BUILD_ROOT -type f -name perltest.pl -exec rm -f {} ';' %postun c++ -p /sbin/ldconfig -%post tcl -p /sbin/ldconfig +%post -n tcl-hamlib -p /sbin/ldconfig -%postun tcl -p /sbin/ldconfig +%postun -n tcl-hamlib -p /sbin/ldconfig %files %doc AUTHORS ChangeLog PLAN COPYING.LIB COPYING README THANKS TODO %{_bindir}/* -%{_sbindir}/* %{_libdir}/libhamlib.so.* -%dir %{_libdir}/hamlib -%{_libdir}/hamlib/hamlib-*.so %{_mandir}/man?/* +%{_infodir}/hamlib* %files devel %doc README.developer %{_libdir}/libhamlib.so +%{_libdir}/tcl/Hamlib/hamlibtcl.so %{_datadir}/aclocal/hamlib.m4 %dir %{_includedir}/hamlib %{_includedir}/hamlib/rig.h @@ -188,23 +210,34 @@ find $RPM_BUILD_ROOT -type f -name perltest.pl -exec rm -f {} ';' %{_includedir}/hamlib/rigclass.h %{_includedir}/hamlib/rotclass.h -%files perl +%files -n perl-hamlib %{perl_vendorarch}/* -%files python -%{python_sitearch}/*.py* -%{python_sitearch}/_Hamlib.so +%files -n python-hamlib +%{python2_sitearch}/*.py* +%{python2_sitearch}/_Hamlib.so + +%files -n tcl-hamlib +%{_libdir}/tcl/ +%exclude %{_libdir}/tcl/Hamlib/hamlibtcl.so -%files tcl -%{_libdir}/hamlibtcl* %changelog +* Sat Sep 19 2015 Richard Shaw - 3.0-1 +- Update to latest upstream release. + +* Wed Sep 2 2015 Richard Shaw - 3.0-0.1.rc1 +- Update to latest upstream release candidate. +- Rename binding package names to be complient with the package naming + guidelines. +- Clean up spec cruft. + * Thu Aug 27 2015 Jonathan Wakely - 1.2.15.3-20 - Rebuilt for Boost 1.59 * Wed Jul 29 2015 Fedora Release Engineering - 1.2.15.3-19 - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - + * Wed Jul 22 2015 David Tardon - 1.2.15.3-18 - rebuild for Boost 1.58 diff --git a/sources b/sources index 053af72..6ccb36b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3cad8987e995a00e5e9d360e2be0eb43 hamlib-1.2.15.3.tar.gz +ffe192ff83c5935966367efe5bb33334 hamlib-3.0.tar.gz