rpms/hamlib/F-8 hamlib-1.2.6.2-bindings.patch, NONE, 1.1 hamlib.spec, 1.24, 1.25

Sindre Pedersen Bjørdal (sindrepb) fedora-extras-commits at redhat.com
Sun Dec 9 12:59:50 UTC 2007


Author: sindrepb

Update of /cvs/pkgs/rpms/hamlib/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25436

Modified Files:
	hamlib.spec 
Added Files:
	hamlib-1.2.6.2-bindings.patch 
Log Message:
major rework

hamlib-1.2.6.2-bindings.patch:

--- NEW FILE hamlib-1.2.6.2-bindings.patch ---
diff -up hamlib-1.2.6.2/bindings/Makefile.in.orig hamlib-1.2.6.2/bindings/Makefile.in
--- hamlib-1.2.6.2/bindings/Makefile.in.orig	2007-12-09 08:39:50.000000000 +0100
+++ hamlib-1.2.6.2/bindings/Makefile.in	2007-12-09 08:55:28.000000000 +0100
@@ -273,7 +273,7 @@ pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 pyexecdir = @pyexecdir@
-pythondir = $(prefix)/lib/python
+pythondir = `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 subdirs = @subdirs@
@@ -667,7 +667,8 @@ Hamlib-pl.mk: $(srcdir)/Makefile.PL
 			CC="$(CC)"  \
 			OBJECT="hamlibperl_wrap.o" \
 			VERSION="$(PACKAGE_VERSION)" \
-			LIBS="-lhamlib"
+			LIBS="-lhamlib" \
+			INSTALLDIRS=vendor
 
 all-perl: Hamlib-pl.mk hamlibperl_wrap.c
 	$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk all
@@ -684,7 +685,7 @@ distcheck-perl: Hamlib-pl.mk
 	$(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 -up hamlib-1.2.6.2/bindings/Makefile.am.orig hamlib-1.2.6.2/bindings/Makefile.am
--- hamlib-1.2.6.2/bindings/Makefile.am.orig	2007-12-09 08:39:45.000000000 +0100
+++ hamlib-1.2.6.2/bindings/Makefile.am	2007-12-09 08:55:40.000000000 +0100
@@ -25,7 +25,8 @@ Hamlib-pl.mk: $(srcdir)/Makefile.PL
 			CC="$(CC)"  \
 			OBJECT="hamlibperl_wrap.o" \
 			VERSION="$(PACKAGE_VERSION)" \
-			LIBS="-lhamlib"
+			LIBS="-lhamlib" \
+			INSTALLDIRS=vendor
 
 all-perl: Hamlib-pl.mk hamlibperl_wrap.c
 	$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk all
@@ -43,7 +44,7 @@ distcheck-perl: Hamlib-pl.mk
 	$(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.
@@ -90,7 +91,7 @@ uninstall-tcl: 
 
 python_ltlib = _Hamlib.la
 
-pythondir = $(prefix)/lib/python
+pythondir = `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
 
 nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c
 _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version @PYTHON_LDFLAGS@


Index: hamlib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hamlib/F-8/hamlib.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- hamlib.spec	25 Sep 2007 10:42:29 -0000	1.24
+++ hamlib.spec	9 Dec 2007 12:59:17 -0000	1.25
@@ -1,27 +1,24 @@
 %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
-
 
 Name:           hamlib
 Version:        1.2.6.2
-Release:        1%{?dist}
+Release:        5%{?dist}
+Summary:        Run-time library to control radio transceivers and receivers
 
-License:        GPLv2+ and LGPLv2+
 Group:          System Environment/Libraries
-Summary:        Run-time library to control radio transceivers and receivers
-Source:         ftp://ftp.sourceforge.net/pub/sourceforge/h/ha/hamlib/%{name}-%{version}.tar.gz
+License:        GPLv2+ and LGPLv2+
+URL:            http://hamlib.sourceforge.net
+Source0:        ftp://ftp.sourceforge.net/pub/sourceforge/h/ha/hamlib/%{name}-%{version}.tar.gz
+#Install python and perl bindings into proper dirs
+Patch0:         hamlib-1.2.6.2-bindings.patch
 
-# For whatever reason @SWIG@ isn't being set by the configure script.
-Patch: hamlib-bindings.patch
-Patch1: hamlib-1.2.4-bindings.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-URL: http://hamlib.sourceforge.net
-BuildRequires: automake >= 1.4, libtool >= 1.4, fileutils, findutils, flex
-BuildRequires: binutils >= 2.9.4, gcc >= 2.95, glibc-devel >= 2.1
-BuildRequires: gzip, make >= 3.77, patch >= 2.5, rpm >= 3.0, sed
-BuildRequires: textutils, python, python-devel, swig, gd-devel, libxml2-devel, tcl-devel
-BuildRequires: libusb-devel, pkgconfig, net-tools
-BuildRequires: doxygen
+
+BuildRequires:  python-devel, swig, gd-devel, libxml2-devel, tcl-devel
+BuildRequires:  libusb-devel, pkgconfig
+BuildRequires:  doxygen
+#for perl
+BuildRequires:  perl(ExtUtils::MakeMaker)
 
 %description
 Hamlib provides a standardised programming interface that applications 
@@ -34,16 +31,25 @@
 %package devel
 Summary: Development library to control radio transcievers and receivers
 Group: Development/Libraries
-Requires: hamlib = %{version}, pkgconfig
+Requires: hamlib = %{version}-%{release}, pkgconfig
 
 %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
+Requires: hamlib = %{version}-%{release}
+
+%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 = %{version}
+Requires: hamlib = %{version}-%{release}
 
 %description c++
 Hamlib radio control library C++ language binding.
@@ -51,90 +57,77 @@
 %package c++-devel
 Summary: Hamlib radio control library C++ binding development headers and libraries
 Group: Development/Libraries
-Requires: hamlib-devel = %{version}, hamlib-c++ = %{version}
+Requires: hamlib-devel = %{version}-%{release}, hamlib-c++ = %{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 = %{version}
-#
-#%description perl
-#Hamlib PERL Language bindings to allow radio control from PERL scripts.
+%package perl
+Summary: Hamlib radio control library Perl binding
+Group: Development/Libraries
+Requires: hamlib = %{version}-%{release}
+
+%description perl
+Hamlib PERL Language bindings to allow radio control from PERL scripts.
 
 %package python
 Summary: Hamlib radio control library Python binding
 Group: Development/Libraries
-Requires: python-abi = %{pyver}
+Requires: hamlib = %{version}-%{release}, python
 
 %description python
 Hamlib Python Language bindings to allow radio control from Python scripts.
 
+%package tcl
+Summary: Hamlib radio control library TCL binding
+Group: Development/Libraries
+Requires: hamlib = %{version}-%{release}
+
+%description tcl
+Hamlib TCL Language bindings to allow radio control from TCL scripts.
+
 %prep
 %setup -q
-%patch -p1
-%patch1 -p1 -b .bindings
+%patch0 -p1
 
 %build
 %configure \
         --disable-static \
         --with-rigmatrix \
-        --without-tcl-binding \
-        --with-python-binding
-##        --with-perl-binding
-
-# Build libs, drivers, and programs
-make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" all
-
-# Build PERL and Python bindings
-make -C bindings all-py
-#make -C bindings all-perl
+        --with-tcl-binding \
+        --with-python-binding \
+        --with-perl-binding
 
+# Build libs, drivers, and programs, won't build with smpflags
+make
 # Build Documentation
 make -C doc doc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%makeinstall
+make DESTDIR=$RPM_BUILD_ROOT install
+#install documentation
+mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+for f in `ls doc/html/`
+	do install -m 0644 doc/html/$f $RPM_BUILD_ROOT%{_docdir}/%{name}/html/$f 
+done
+
 rm -f $RPM_BUILD_ROOT%{_libdir}/hamlib-*.a $RPM_BUILD_ROOT%{_libdir}/hamlib-*.la
+
 find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;
+
 /sbin/ldconfig -N -n $RPM_BUILDROOT%{_libdir}
-# Install Python
-make -C bindings prefix=$RPM_BUILD_ROOT%{_prefix} \
-        exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
-        bindir=$RPM_BUILD_ROOT%{_bindir} \
-        sbindir=$RPM_BUILD_ROOT%{_sbindir} \
-        sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-        datadir=$RPM_BUILD_ROOT%{_datadir} \
-        includedir=$RPM_BUILD_ROOT%{_includedir} \
-        libdir=$RPM_BUILD_ROOT%{_libdir} \
-        libexecdir=$RPM_BUILD_ROOT%{_libexecdir} \
-        localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \
-        sharedstatedir=$RPM_BUILD_ROOT%{_sharedstatedir} \
-        mandir=$RPM_BUILD_ROOT%{_mandir} \
-        infodir=$RPM_BUILD_ROOT%{_infodir} \
-        pythondir=$RPM_BUILD_ROOT%{python_sitelib} \
-   install-pythonPYTHON
-
-# Install PERL 
-#make -C bindings prefix=$RPM_BUILD_ROOT%{_prefix} \
-#        exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
-#        bindir=$RPM_BUILD_ROOT%{_bindir} \
-#        sbindir=$RPM_BUILD_ROOT%{_sbindir} \
-#        sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-#        datadir=$RPM_BUILD_ROOT%{_datadir} \
-#        includedir=$RPM_BUILD_ROOT%{_includedir} \
-#        libdir=$RPM_BUILD_ROOT%{_libdir} \
-#        libexecdir=$RPM_BUILD_ROOT%{_libexecdir} \
-#        localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \
-#        sharedstatedir=$RPM_BUILD_ROOT%{_sharedstatedir} \
-#        mandir=$RPM_BUILD_ROOT%{_mandir} \
-#        infodir=$RPM_BUILD_ROOT%{_infodir} \
-#   install-perl
+
+#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 {} ';'
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -147,25 +140,36 @@
 
 %postun c++ -p /sbin/ldconfig
 
+%post tcl -p /sbin/ldconfig
+
+%postun tcl -p /sbin/ldconfig
+
+
 %files
 %defattr(-, root, root)
-%doc COPYING.LIB
-%{_bindir}/rigctl
-%{_bindir}/rigmem
-%{_bindir}/rigsmtr
-%{_bindir}/rigswr
-%{_bindir}/rotctl
-%{_sbindir}/rpc.rigd
-%{_sbindir}/rpc.rotd
+%doc AUTHORS ChangeLog PLAN COPYING.LIB COPYING README THANKS TODO
+%{_bindir}/*
+%{_sbindir}/*
 %{_libdir}/libhamlib.so.*
 %{_libdir}/hamlib-*.so
-%{_mandir}/man8/rpc.rigd.8.gz
-%{_mandir}/man8/rpc.rotd.8.gz
-%{_mandir}/man1/rigctl.1.gz
-%{_mandir}/man1/rigmem.1.gz
-%{_mandir}/man1/rigsmtr.1.gz
-%{_mandir}/man1/rigswr.1.gz
-%{_mandir}/man1/rotctl.1.gz
+%{_libdir}/_Hamlib.so
+%{_mandir}/man?/*
+
+%files devel
+%defattr(-, root, root)
+%doc README.developer
+%{_libdir}/libhamlib.so
+%{_datadir}/aclocal/hamlib.m4
+%dir %{_includedir}/hamlib
+%{_includedir}/hamlib/rig.h
+%{_includedir}/hamlib/riglist.h
+%{_includedir}/hamlib/rig_dll.h
+%{_includedir}/hamlib/rotator.h
+%{_includedir}/hamlib/rotlist.h
+%{_libdir}/pkgconfig/hamlib.pc
+
+%files doc
+%doc %{_docdir}/%{name}
 
 %files c++
 %defattr(-, root, root)
@@ -179,35 +183,41 @@
 %{_includedir}/hamlib/rigclass.h
 %{_includedir}/hamlib/rotclass.h
 
-#%files perl
-#%defattr(-, root, root)
-#%{_libdir}/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/Hamlib/hamlib.so
-#%{_libdir}/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/Hamlib/hamlib.bs
-#%{_libdir}/perl5/site_perl/5.8.3/i386-linux-thread-multi/Hamlib.pm
-#%{_libdir}/perl5/5.8.3/i386-linux-thread-multi/perllocal.pod
-#%{_libdir}/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/Hamlib/.packlist
-#%{_libdir}/perl5/site_perl/5.8.3/i386-linux-thread-multi/perltest.pl
+%files perl
+%defattr(-, root, root)
+%doc COPYING.LIB
+%{perl_vendorarch}/*
 
 %files python
 %defattr(-, root, root)
 %doc COPYING.LIB
 %{python_sitelib}/*.py*
 
-%files devel
+%files tcl
 %defattr(-, root, root)
-%doc README.developer doc/html
-%{_libdir}/libhamlib.so
-%{_datadir}/aclocal/hamlib.m4
-%dir %{_includedir}/hamlib
-%{_includedir}/hamlib/rig.h
-%{_includedir}/hamlib/riglist.h
-%{_includedir}/hamlib/rig_dll.h
-%{_includedir}/hamlib/rotator.h
-%{_includedir}/hamlib/rotlist.h
-%{_libdir}/pkgconfig/hamlib.pc
-
+%doc COPYING.LIB
+%{_libdir}/hamlibtcl*
 
 %changelog
+* Sun Dec 09 2007 Sindre Pedersen Bjørdal - 1.2.6.2-5
+- use sitearch not sitelib for perl package
+- Make sure it builds on all arches
+* Sat Dec 08 2007 Sindre Pedersen Bjørdal - 1.2.6.2-3
+- Clean up BuildRequires
+- Remove obsolete swig patch
+* Sat Dec 08 2007 Sindre Pedersen Bjørdal - 1.2.6.2-2
+- Spec file cleanups
+- Use make install instead of depriciated %%makeinstall
+- Replace make trickery with patched upstream makefiles
+- enable perl bindings
+- Patch bindings makefile to install perl to vendor, not site
+- Merge swig patch with bindings patch
+- enable tcl bindings
+- Create doc subpackage, solves #341481
+- Remove 2nd bindings patch, not needed as we don't rely on make trickery for bindings anymore
+- Add patch to install python bindings in proper python dirs
+- Clean up %%files list
+- Depend on version-release, not just version
 * Tue Sep 25 2007 Denis Leroy <denis at poolshark.org> - 1.2.6.2-1
 - Update to new upstream 1.2.6.2
 - Added rigsmtr binary




More information about the fedora-extras-commits mailing list