And, the spec file.  Note that python bindings have been separated into a -python subpackage.<div><br></div><div>   Thanks,</div><div><br></div><div>--------------------------------------------------------------------------------</div>
<div><br></div><div>libhid.spec</div><div><br></div><div><div>%if ! (0%{?fedora} &gt; 12 || 0%{?rhel} &gt; 5)</div><div>%{!?python_sitelib: %global python_sitelib %(%{__python} -c &quot;from distutils.sysconfig import get_python_lib; print(get_python_lib())&quot;)}</div>
<div>%{!?python_sitearch: %global python_sitearch %(%{__python} -c &quot;from distutils.sysconfig import get_python_lib; print(get_python_lib(1))&quot;)}</div><div>%endif</div><div><br></div><div>Name:<span class="Apple-tab-span" style="white-space:pre">                </span>libhid</div>
<div>Version:<span class="Apple-tab-span" style="white-space:pre">        </span>0.2.17</div><div>Release:<span class="Apple-tab-span" style="white-space:pre">        </span>4%{?dist}</div><div>Summary:<span class="Apple-tab-span" style="white-space:pre">        </span>User space USB HID access library</div>
<div>Group:<span class="Apple-tab-span" style="white-space:pre">                </span>System Environment/Libraries</div><div>License:<span class="Apple-tab-span" style="white-space:pre">        </span>GPLv2</div><div>URL:<span class="Apple-tab-span" style="white-space:pre">                </span><a href="http://libhid.alioth.debian.org">http://libhid.alioth.debian.org</a></div>
<div># The source for this package was pulled from upstream&#39;s Subversion.  Use the</div><div># following commands to generate the tarball:</div><div>#  svn co svn://<a href="http://svn.debian.org/libhid/trunk">svn.debian.org/libhid/trunk</a> libhid-0.2.17</div>
<div>#  tar -czvf libhid-0.2.17.tar.gz libhid-0.2.17</div><div>Source0:<span class="Apple-tab-span" style="white-space:pre">        </span>%{name}-%{version}.tar.gz</div><div><br></div><div># Use db2x_docbook2man instead xsltproc to generate man pages</div>
<div>Patch0:<span class="Apple-tab-span" style="white-space:pre">                </span>libhid-0.2.17-fix_manpage.patch</div><div># Stop the configure script to mess the flags</div><div>Patch1:<span class="Apple-tab-span" style="white-space:pre">                </span>libhid-0.2.17-fix_compiler_flags.patch</div>
<div><br></div><div>BuildRoot:<span class="Apple-tab-span" style="white-space:pre">        </span>%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)</div><div>BuildRequires:<span class="Apple-tab-span" style="white-space:pre">        </span>libusb-devel, libtool, pkgconfig, swig, python-devel, docbook2X, docbook-style-xsl</div>
<div>ExcludeArch:<span class="Apple-tab-span" style="white-space:pre">        </span>s390 s390x</div><div><br></div><div>%description</div><div>libhid provides a generic and flexible way to access and interact with USB</div><div>
HID devices, much like libusb does for plain USB devices. It is based on</div><div>libusb, thus it requires no HID support in the kernel and provides means to</div><div>take control over a device even if the kernel governs it.</div>
<div><br></div><div><br></div><div><br></div><div>%package devel</div><div>Summary: Development files for libhid</div><div>Group: Development/Libraries</div><div>Requires: %{name} = %{version}-%{release}</div><div>Requires: libusb-devel</div>
<div><br></div><div>%description devel</div><div>This package provides the development files for libhid.</div><div>You need this if you want to develop an application with libhid</div><div><br></div><div><br></div><div><br>
</div><div>%package python</div><div>Summary: Python bindings for the libhid libraries</div><div>Group: System Environment/Libraries</div><div>Requires: %{name} = %{version}-%{release}</div><div><br></div><div>%description python</div>
<div>This package provides the hid module and wrapper for python which provides </div><div>access to USB HID devices.</div><div><br></div><div><br></div><div><br></div><div>%prep</div><div>%setup -q</div><div>%patch0 -p1 -b .fix_manpage</div>
<div>autoreconf -i</div><div>%patch1 -p1 -b .fix_compiler_flags</div><div><br></div><div>%build</div><div># Fix swig and disable doxygen for now</div><div>%configure --enable-static=no --without-doxygen</div><div>sed -i &#39;s|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=&quot;&quot;|g&#39; libtool</div>
<div>sed -i &#39;s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g&#39; libtool</div><div>make %{?_smp_mflags}</div><div><br></div><div>%install</div><div>rm -rf $RPM_BUILD_ROOT</div><div>make DESTDIR=$RPM_BUILD_ROOT install</div>
<div>rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la</div><div>rm -rf $RPM_BUILD_ROOT%{python_sitearch}/*/*.la</div><div><br></div><div>%clean</div><div>rm -rf $RPM_BUILD_ROOT</div><div><br></div><div>%post -p /sbin/ldconfig</div><div>
%postun -p /sbin/ldconfig</div><div><br></div><div>%files</div><div>%defattr(-,root,root,-)</div><div># Excluded INSTALL and COPYING as they are symlinks to nothing</div><div>%doc README.licence</div><div>%{_libdir}/*.so.*</div>
<div>%{_bindir}/libhid-detach-device</div><div>%{_mandir}/man1/*</div><div><br></div><div>%files devel</div><div>%defattr(-,root,root,-)</div><div>%doc AUTHORS README ChangeLog</div><div>%{_libdir}/pkgconfig/libhid.pc</div>
<div>%{_includedir}/*</div><div>%{_libdir}/*.so</div><div><br></div><div>%files python</div><div>%defattr(-,root,root,-)</div><div>%doc swig/README</div><div>%{python_sitelib}/*</div><div># Ensure libraries are installed for multilib architectures</div>
<div>%ifarch x86_64 ppc64 sparc64</div><div>%{python_sitearch}/*</div><div>%endif</div><div><br></div><div>%changelog</div><div>* Sat Mar 06 2010 Manuel F Martinez &lt;<a href="mailto:manpaz@bashlinux.com">manpaz@bashlinux.com</a>&gt; 0.2.17-4</div>
<div>- Applied patch0 before autoreconf</div><div>- Added patch to fix compiler flags</div><div>- Fixed &quot;duplicate file entries&quot; warning on ppc</div><div>- Matched comment about files on python sub-package</div>
<div>* Sat Feb 27 2010 Manuel F Martinez &lt;<a href="mailto:manpaz@bashlinux.com">manpaz@bashlinux.com</a>&gt; 0.2.17-3</div><div>- Added autoreconf and cleaned build section</div><div>- Removed maintainer mode on configure</div>
<div>- Removed static library from python sub-package</div><div>- Cleaned up sed modifications</div><div>- Fixed Build Root name</div><div>- Removed CFLAGS and added _smp_mflags to make</div><div>- Fixed python subpackage conditional</div>
<div>- Fixed typos in description</div><div>- Added release number to requires in python sub-package</div><div>* Sat Feb 20 2010 Manuel F Martinez &lt;<a href="mailto:manpaz@bashlinux.com">manpaz@bashlinux.com</a>&gt; 0.2.17-2</div>
<div>- Fixed GPL version</div><div>- Removed unnecessary &quot;makeinstall&quot; and &quot;defattr&quot;</div><div>- Added libusb-devel to libhid-devel</div><div>* Wed Feb 17 2010 Manuel F Martinez &lt;<a href="mailto:manpaz@bashlinux.com">manpaz@bashlinux.com</a>&gt; 0.2.17-1</div>
<div>- Build on Fedora 12</div><div>- Added patch to fix manpage creation</div><div>* Thu May 03 2007 Charles Lepple &lt;clepple+libhid@ghz.cc&gt; 0.2.16-1</div><div>- Built on Fedora Core 6</div><div>* Sat Jan 15 2005 Jason Watson &lt;<a href="mailto:jason.watson@agrios.net">jason.watson@agrios.net</a>&gt; 0.2.10-1</div>
<div>- Initial RPM build</div><div><br></div><br><div class="gmail_quote">On Tue, Mar 9, 2010 at 1:58 AM, Manuel F Martinez <span dir="ltr">&lt;<a href="mailto:manpaz@bashlinux.com">manpaz@bashlinux.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">patch1:  Stop the configure script to mess the flags (Only on fedora)<div><br><div>libhid-0.2.17-fix_compiler_flags.patch </div>
<div><br></div><div>diff -up ./configure.fix_compiler_flags ./configure</div><div>--- ./configure.fix_compiler_flags<span style="white-space:pre">        </span>2010-03-07 19:29:02.000000000 -0800</div>
<div>+++ ./configure<span style="white-space:pre">        </span>2010-03-07 19:31:53.000000000 -0800</div><div>@@ -13605,9 +13605,9 @@ _ACEOF</div><div> fi</div><div> </div><div> </div><div>-</div><div>-    CFLAGS=$(echo $CFLAGS | sed -e &#39;s,-g[^[:space:]]*,,g&#39;)</div>

<div>-    CXXFLAGS=$(echo $CXXFLAGS | sed -e &#39;s,-g[^[:space:]]*,,g&#39;)</div><div>+    # Avoid remove &quot;-g&quot; flag for Fedora builds </div><div>+    #CFLAGS=$(echo $CFLAGS | sed -e &#39;s,-g[^[:space:]]*,,g&#39;)</div>

<div>+    #CXXFLAGS=$(echo $CXXFLAGS | sed -e &#39;s,-g[^[:space:]]*,,g&#39;)</div><div> </div><div>     if test &quot;$ac_cv_enable_debug&quot; = &quot;yes&quot;; then</div><div>       echo nada &gt; /dev/null</div><div>
<div></div><div class="h5"><div>
<br></div><div class="gmail_quote">On Tue, Mar 9, 2010 at 1:55 AM, Manuel F Martinez <span dir="ltr">&lt;<a href="mailto:manpaz@bashlinux.com" target="_blank">manpaz@bashlinux.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

patch0:  Use db2x_docbook2man instead xsltproc to generate man pages<br><br><div><div>libhid-0.2.17-fix_manpage.patch </div><div><br></div><div>diff -up ./doc/man/Makefile.am.fix_manpage ./doc/man/Makefile.am</div><div>--- ./doc/man/Makefile.am.fix_manpage<span style="white-space:pre">        </span>2010-02-17 03:53:00.000000000 -0800</div>


<div>+++ ./doc/man/Makefile.am<span style="white-space:pre">        </span>2010-02-18 01:22:17.000000000 -0800</div><div>@@ -2,9 +2,9 @@ ACLOCAL_AMFLAGS = -I m4</div><div> </div><div> dist_man1_MANS = libhid-detach-device.1</div>


<div> </div><div>-XP = xsltproc -&#39;&#39;-nonet</div><div>+XP = db2x_docbook2man </div><div> %.1: %.dbk</div><div>-<span style="white-space:pre">        </span>$(XP) $(DB2MAN_FILE) $&lt;</div><div>+<span style="white-space:pre">        </span>$(XP) $&lt;</div>


<div> </div><div> maintainerclean-local:</div><div> <span style="white-space:pre">        </span>rm -f ${wildcard *.[0-9]}</div><div><div></div><div><div><br></div><div class="gmail_quote">On Tue, Mar 9, 2010 at 1:54 AM, Manuel F Martinez <span dir="ltr">&lt;<a href="mailto:manpaz@bashlinux.com" target="_blank">manpaz@bashlinux.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, I&#39;m sending in short the spec patches.<div><div></div><div><br><br><div class="gmail_quote">On Mon, Mar 8, 2010 at 5:13 PM, Charles Lepple <span dir="ltr">&lt;clepple@ghz.cc&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Mar 8, 2010, at 3:50 PM, Manuel F Martinez wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   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.<br>




</blockquote>
<br></div>
The list is fine.<br>
<br>
Thanks!<br>
</blockquote></div><br><br clear="all"><br></div></div><div><div></div><div>-- <br>Manuel F Martinez<br>Linux Systems Engineer<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Manuel F Martinez<br>Linux Systems Engineer<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Manuel F Martinez<br>Linux Systems Engineer<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Manuel F Martinez<br>Linux Systems Engineer<br>
</div>