Discussion:
[libhid-discuss] libhid on fedora
Manuel F Martinez
2010-02-27 09:26:00 UTC
Permalink
Hello everyone,

My name is Manuel Martinez, I have worked with libhid on Fedora and
CentOS. After send a couple of request mails to the owners of this great
piece of software, I started to push it in fedora.

I'd like to let you know, that the package has been started to be
reviewed, it builds fine, but I'm still making some adjustments in order to
accomplish the Fedora Package Guidlines.

There are really smart people reviewing it, and I trust it will being
approved.

Thank you for let me share this code with developers in other
distributions, I'll keep you posted about changes in spec file, and patches
in order to get a nice build on fedora.

Best,
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100227/92ee856d/attachment.htm>
Manuel F Martinez
2010-03-08 20:50:33 UTC
Permalink
Hello everyone,

The proper libhid RPM have been build and approved on Fedora, I have
applied a couple of patches in order to accomplish with Fedora Package
Guidelines. Now I wonder if there is possible to send you the patches and
spec file so you can have a copy of them, either on the list or svn.

Please let me know which way do you prefer.

Thanks,
Post by Manuel F Martinez
Hello everyone,
My name is Manuel Martinez, I have worked with libhid on Fedora and
CentOS. After send a couple of request mails to the owners of this great
piece of software, I started to push it in fedora.
I'd like to let you know, that the package has been started to be
reviewed, it builds fine, but I'm still making some adjustments in order to
accomplish the Fedora Package Guidlines.
There are really smart people reviewing it, and I trust it will being
approved.
Thank you for let me share this code with developers in other
distributions, I'll keep you posted about changes in spec file, and patches
in order to get a nice build on fedora.
Best,
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100308/72c4f973/attachment.htm>
Charles Lepple
2010-03-09 01:13:51 UTC
Permalink
Post by Manuel F Martinez
The proper libhid RPM have been build and approved on Fedora, I
have applied a couple of patches in order to accomplish with Fedora
Package Guidelines. Now I wonder if there is possible to send you
the patches and spec file so you can have a copy of them, either on
the list or svn.
The list is fine.

Thanks!
Manuel F Martinez
2010-03-09 09:54:03 UTC
Permalink
Ok, I'm sending in short the spec patches.
Post by Manuel F Martinez
The proper libhid RPM have been build and approved on Fedora, I have
Post by Manuel F Martinez
applied a couple of patches in order to accomplish with Fedora Package
Guidelines. Now I wonder if there is possible to send you the patches and
spec file so you can have a copy of them, either on the list or svn.
The list is fine.
Thanks!
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100309/e5ec13f2/attachment.htm>
Manuel F Martinez
2010-03-09 09:55:45 UTC
Permalink
patch0: Use db2x_docbook2man instead xsltproc to generate man pages

libhid-0.2.17-fix_manpage.patch

diff -up ./doc/man/Makefile.am.fix_manpage ./doc/man/Makefile.am
--- ./doc/man/Makefile.am.fix_manpage 2010-02-17 03:53:00.000000000 -0800
+++ ./doc/man/Makefile.am 2010-02-18 01:22:17.000000000 -0800
@@ -2,9 +2,9 @@ ACLOCAL_AMFLAGS = -I m4

dist_man1_MANS = libhid-detach-device.1

-XP = xsltproc -''-nonet
+XP = db2x_docbook2man
%.1: %.dbk
- $(XP) $(DB2MAN_FILE) $<
+ $(XP) $<

maintainerclean-local:
rm -f ${wildcard *.[0-9]}
Post by Manuel F Martinez
Ok, I'm sending in short the spec patches.
Post by Manuel F Martinez
The proper libhid RPM have been build and approved on Fedora, I have
Post by Manuel F Martinez
applied a couple of patches in order to accomplish with Fedora Package
Guidelines. Now I wonder if there is possible to send you the patches and
spec file so you can have a copy of them, either on the list or svn.
The list is fine.
Thanks!
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100309/2a4017cc/attachment.htm>
Manuel F Martinez
2010-03-09 09:58:10 UTC
Permalink
patch1: Stop the configure script to mess the flags (Only on fedora)

libhid-0.2.17-fix_compiler_flags.patch

diff -up ./configure.fix_compiler_flags ./configure
--- ./configure.fix_compiler_flags 2010-03-07 19:29:02.000000000 -0800
+++ ./configure 2010-03-07 19:31:53.000000000 -0800
@@ -13605,9 +13605,9 @@ _ACEOF
fi


-
- CFLAGS=$(echo $CFLAGS | sed -e 's,-g[^[:space:]]*,,g')
- CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[^[:space:]]*,,g')
+ # Avoid remove "-g" flag for Fedora builds
+ #CFLAGS=$(echo $CFLAGS | sed -e 's,-g[^[:space:]]*,,g')
+ #CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[^[:space:]]*,,g')

if test "$ac_cv_enable_debug" = "yes"; then
echo nada > /dev/null
Post by Manuel F Martinez
patch0: Use db2x_docbook2man instead xsltproc to generate man pages
libhid-0.2.17-fix_manpage.patch
diff -up ./doc/man/Makefile.am.fix_manpage ./doc/man/Makefile.am
--- ./doc/man/Makefile.am.fix_manpage 2010-02-17 03:53:00.000000000 -0800
+++ ./doc/man/Makefile.am 2010-02-18 01:22:17.000000000 -0800
@@ -2,9 +2,9 @@ ACLOCAL_AMFLAGS = -I m4
dist_man1_MANS = libhid-detach-device.1
-XP = xsltproc -''-nonet
+XP = db2x_docbook2man
%.1: %.dbk
- $(XP) $(DB2MAN_FILE) $<
+ $(XP) $<
rm -f ${wildcard *.[0-9]}
Post by Manuel F Martinez
Ok, I'm sending in short the spec patches.
Post by Manuel F Martinez
The proper libhid RPM have been build and approved on Fedora, I have
Post by Manuel F Martinez
applied a couple of patches in order to accomplish with Fedora Package
Guidelines. Now I wonder if there is possible to send you the patches and
spec file so you can have a copy of them, either on the list or svn.
The list is fine.
Thanks!
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100309/864046b0/attachment.htm>
Manuel F Martinez
2010-03-09 10:10:09 UTC
Permalink
And, the spec file. Note that python bindings have been separated into a
-python subpackage.

Thanks,

--------------------------------------------------------------------------------

libhid.spec

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name: libhid
Version: 0.2.17
Release: 4%{?dist}
Summary: User space USB HID access library
Group: System Environment/Libraries
License: GPLv2
URL: http://libhid.alioth.debian.org
# The source for this package was pulled from upstream's Subversion. Use
the
# following commands to generate the tarball:
# svn co svn://svn.debian.org/libhid/trunk libhid-0.2.17
# tar -czvf libhid-0.2.17.tar.gz libhid-0.2.17
Source0: %{name}-%{version}.tar.gz

# Use db2x_docbook2man instead xsltproc to generate man pages
Patch0: libhid-0.2.17-fix_manpage.patch
# Stop the configure script to mess the flags
Patch1: libhid-0.2.17-fix_compiler_flags.patch

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libusb-devel, libtool, pkgconfig, swig, python-devel,
docbook2X, docbook-style-xsl
ExcludeArch: s390 s390x

%description
libhid provides a generic and flexible way to access and interact with USB
HID devices, much like libusb does for plain USB devices. It is based on
libusb, thus it requires no HID support in the kernel and provides means to
take control over a device even if the kernel governs it.



%package devel
Summary: Development files for libhid
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libusb-devel

%description devel
This package provides the development files for libhid.
You need this if you want to develop an application with libhid



%package python
Summary: Python bindings for the libhid libraries
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description python
This package provides the hid module and wrapper for python which provides
access to USB HID devices.



%prep
%setup -q
%patch0 -p1 -b .fix_manpage
autoreconf -i
%patch1 -p1 -b .fix_compiler_flags

%build
# Fix swig and disable doxygen for now
%configure --enable-static=no --without-doxygen
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
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{python_sitearch}/*/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
# Excluded INSTALL and COPYING as they are symlinks to nothing
%doc README.licence
%{_libdir}/*.so.*
%{_bindir}/libhid-detach-device
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%doc AUTHORS README ChangeLog
%{_libdir}/pkgconfig/libhid.pc
%{_includedir}/*
%{_libdir}/*.so

%files python
%defattr(-,root,root,-)
%doc swig/README
%{python_sitelib}/*
# Ensure libraries are installed for multilib architectures
%ifarch x86_64 ppc64 sparc64
%{python_sitearch}/*
%endif

%changelog
* Sat Mar 06 2010 Manuel F Martinez <manpaz at bashlinux.com> 0.2.17-4
- Applied patch0 before autoreconf
- Added patch to fix compiler flags
- Fixed "duplicate file entries" warning on ppc
- Matched comment about files on python sub-package
* Sat Feb 27 2010 Manuel F Martinez <manpaz at bashlinux.com> 0.2.17-3
- Added autoreconf and cleaned build section
- Removed maintainer mode on configure
- Removed static library from python sub-package
- Cleaned up sed modifications
- Fixed Build Root name
- Removed CFLAGS and added _smp_mflags to make
- Fixed python subpackage conditional
- Fixed typos in description
- Added release number to requires in python sub-package
* Sat Feb 20 2010 Manuel F Martinez <manpaz at bashlinux.com> 0.2.17-2
- Fixed GPL version
- Removed unnecessary "makeinstall" and "defattr"
- Added libusb-devel to libhid-devel
* Wed Feb 17 2010 Manuel F Martinez <manpaz at bashlinux.com> 0.2.17-1
- Build on Fedora 12
- Added patch to fix manpage creation
* Thu May 03 2007 Charles Lepple <clepple+libhid at ghz.cc> 0.2.16-1
- Built on Fedora Core 6
* Sat Jan 15 2005 Jason Watson <jason.watson at agrios.net> 0.2.10-1
- Initial RPM build
Post by Manuel F Martinez
patch1: Stop the configure script to mess the flags (Only on fedora)
libhid-0.2.17-fix_compiler_flags.patch
diff -up ./configure.fix_compiler_flags ./configure
--- ./configure.fix_compiler_flags 2010-03-07 19:29:02.000000000 -0800
+++ ./configure 2010-03-07 19:31:53.000000000 -0800
@@ -13605,9 +13605,9 @@ _ACEOF
fi
-
- CFLAGS=$(echo $CFLAGS | sed -e 's,-g[^[:space:]]*,,g')
- CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[^[:space:]]*,,g')
+ # Avoid remove "-g" flag for Fedora builds
+ #CFLAGS=$(echo $CFLAGS | sed -e 's,-g[^[:space:]]*,,g')
+ #CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[^[:space:]]*,,g')
if test "$ac_cv_enable_debug" = "yes"; then
echo nada > /dev/null
Post by Manuel F Martinez
patch0: Use db2x_docbook2man instead xsltproc to generate man pages
libhid-0.2.17-fix_manpage.patch
diff -up ./doc/man/Makefile.am.fix_manpage ./doc/man/Makefile.am
--- ./doc/man/Makefile.am.fix_manpage 2010-02-17 03:53:00.000000000 -0800
+++ ./doc/man/Makefile.am 2010-02-18 01:22:17.000000000 -0800
@@ -2,9 +2,9 @@ ACLOCAL_AMFLAGS = -I m4
dist_man1_MANS = libhid-detach-device.1
-XP = xsltproc -''-nonet
+XP = db2x_docbook2man
%.1: %.dbk
- $(XP) $(DB2MAN_FILE) $<
+ $(XP) $<
rm -f ${wildcard *.[0-9]}
Post by Manuel F Martinez
Ok, I'm sending in short the spec patches.
Post by Manuel F Martinez
The proper libhid RPM have been build and approved on Fedora, I have
Post by Manuel F Martinez
applied a couple of patches in order to accomplish with Fedora Package
Guidelines. Now I wonder if there is possible to send you the patches and
spec file so you can have a copy of them, either on the list or svn.
The list is fine.
Thanks!
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
--
Manuel F Martinez
Linux Systems Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100309/8fe7bfe8/attachment-0001.htm>
Loading...