2007-09-18 Doug Scott <[email protected]>
authordrdoug007
Tue, 18 Sep 2007 09:17:06 +0000
changeset 486 5705ff477924
parent 485 fec1c18f3f33
child 487 2e93efd4b970
2007-09-18 Doug Scott <[email protected]> * SFElibmtp.spec: *NEW* Microsoft's Media Transfer Protocol * SFElcms.spec: bump to 1.17 * base-specs/libmtp.spec: base spec * patches/libmtp-02-u_int.diff: add u_int types * patches/libmtp-01-wall.diff: remove -Wall
ChangeLog
SFElcms.spec
SFElibmtp.spec
base-specs/libmtp.spec
patches/libmtp-01-wall.diff
patches/libmtp-02-u_int.diff
--- a/ChangeLog	Tue Sep 18 07:02:48 2007 +0000
+++ b/ChangeLog	Tue Sep 18 09:17:06 2007 +0000
@@ -1,3 +1,11 @@
+2007-09-18  Doug Scott  <[email protected]>
+
+	* SFElibmtp.spec: *NEW* Microsoft's Media Transfer Protocol
+	* SFElcms.spec: bump to 1.17
+	* base-specs/libmtp.spec: base spec
+	* patches/libmtp-02-u_int.diff: add u_int types
+	* patches/libmtp-01-wall.diff: remove -Wall
+
 2007-09-18  Halton Huo <[email protected]>
 
 	Add Requires/BuildRequires after run check-deps.pl
--- a/SFElcms.spec	Tue Sep 18 07:02:48 2007 +0000
+++ b/SFElcms.spec	Tue Sep 18 09:17:06 2007 +0000
@@ -9,7 +9,7 @@
 
 Name:                    SFElcms
 Summary:                 Little ColorManagement System
-Version:                 1.16
+Version:                 1.17
 Source:                  http://www.littlecms.com/lcms-%{version}.tar.gz
 Patch1:                  lcms-01-python-libs.diff
 URL:                     http://www.littlecms.com
@@ -93,6 +93,8 @@
 %{_includedir}/*
 
 %changelog
+* Sun Sep 16 2007 - [email protected]
+- Bump to 1.17
 * Tue Feb  6 2007 - [email protected]
 - Bump to 1.16. Add aclocal call because automake version mismatch.
 * Fri Jun 23 2006 - [email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFElibmtp.spec	Tue Sep 18 09:17:06 2007 +0000
@@ -0,0 +1,75 @@
+#
+# spec file for package SFElibmtp
+#
+# includes module(s): libmtp
+#
+%include Solaris.inc
+# The is no 64bit libusb :(
+
+%use libmtp = libmtp.spec
+
+%define SFEdoxygen      %(/usr/bin/pkginfo -q SFEdoxygen && echo 1 || echo 0)
+
+Name:		SFElibmtp
+Summary:	%{libmtp.summary}
+Version:	%{libmtp.version}
+SUNW_BaseDir:	%{_basedir}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+%package devel
+Summary:         %{summary} - development files
+SUNW_BaseDir:    %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%if %SFEdoxygen
+%package doc
+Summary:                 %{summary} - Documentation
+SUNW_BaseDir:            %{_prefix}
+%include default-depend.inc
+Requires: %name
+%endif
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+
+mkdir %name-%version/%{base_arch}
+%libmtp.prep -d %name-%version/%{base_arch}
+
+%build
+%libmtp.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%libmtp.install -d %name-%version/%{base_arch}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/mtp-*
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+
+%files devel
+%defattr (-, root, bin)
+%{_includedir}
+%dir %attr (0755, root, bin) %{_libdir}
+%dir %attr (0755, root, other) %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*
+
+%if %SFEdoxygen
+%files doc
+%defattr (-, root, bin)
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_datadir}/doc
+%{_datadir}/doc/*
+%endif
+
+%changelog
+* Tue Sep 18 2007 - [email protected]
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/libmtp.spec	Tue Sep 18 09:17:06 2007 +0000
@@ -0,0 +1,68 @@
+#
+# spec file for package libmtp
+#
+# includes module(s): libmtp
+#
+
+%define src_ver 0.2.1
+%define src_name libmtp
+%define src_url http://jaist.dl.sourceforge.net/sourceforge/%{src_name}
+
+Name:		libmtp
+Summary:	Implementation of Microsoft's Media Transfer Protocol (MTP)
+Version:	%{src_ver}
+Source:		%{src_url}/%{src_name}-%{version}.tar.gz
+Patch1:		libmtp-01-wall.diff
+Patch2:		libmtp-02-u_int.diff
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+%patch2 -p1
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+if $( echo "%{_libdir}" | /usr/xpg4/bin/grep -q %{_arch64} ) ; then
+    SFWLIB="-L/usr/sfw/lib/%{_arch64} -R/usr/sfw/lib/%{_arch64}"
+else
+    SFWLIB="-L/usr/sfw/lib -R/usr/sfw/lib"
+fi
+
+export CPPFLAGS="-I/usr/sfw/include"
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags $SFWLIB"
+
+libtoolize -f -c
+aclocal -I m4
+autoheader
+autoconf -f
+automake -a -f
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --libexecdir=%{_libexecdir}	\
+            --sysconfdir=%{_sysconfdir}	\
+            --enable-shared		\
+	    --disable-static
+
+#perl -pi -e 's,-shared,-Wl,-G' libtool
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
+rm -f $RPM_BUILD_ROOT%{_libdir}/libmtp/lib*.*a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Tue Sep 18 2007 - [email protected]
+- Initial base spec file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libmtp-01-wall.diff	Tue Sep 18 09:17:06 2007 +0000
@@ -0,0 +1,11 @@
+--- libmtp-0.2.1/configure.ac.orig	2007-09-18 15:49:52.609778878 +0700
++++ libmtp-0.2.1/configure.ac	2007-09-18 15:50:11.389951304 +0700
+@@ -85,7 +85,7 @@
+ CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
+ # Stick in "-Werror" if you want to be more aggressive.
+ # (No need to use AC_SUBST on this default substituted environment variable.)
+-CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
++# CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
+ 
+ # Output files
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libmtp-02-u_int.diff	Tue Sep 18 09:17:06 2007 +0000
@@ -0,0 +1,44 @@
+--- libmtp-0.2.1/configure.ac.orig	2007-09-18 15:57:27.571218159 +0700
++++ libmtp-0.2.1/configure.ac	2007-09-18 15:57:32.866226254 +0700
+@@ -87,6 +87,26 @@
+ # (No need to use AC_SUBST on this default substituted environment variable.)
+ # CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
+ 
++AC_MSG_CHECKING([if inttypes has u_int32_t etc])
++AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++        [[
++#if HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#if HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++#if HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++        ]],[[
++    u_int32_t  s;
++    sleep((unsigned int)s);
++        ]]
++    )],
++    [AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define to 1 if have u_int32_t types etc])
++    AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
+ # Output files
+ 
+ # Create a stdint.h-like file containing size-specific integer definitions
+--- libmtp-0.2.1/examples/common.h.orig	2007-09-18 16:00:32.671373913 +0700
++++ libmtp-0.2.1/examples/common.h	2007-09-18 16:01:02.820289580 +0700
+@@ -32,3 +32,12 @@
+ // Only if using MSVC...
+ #include "..\windows\getopt.h"
+ #endif
++#ifdef HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++#ifndef HAVE_U_INT_TYPES
++typedef uint8_t u_int8_t;
++typedef uint16_t u_int16_t;
++typedef uint32_t u_int32_t;
++typedef uint64_t u_int64_t;
++#endif