[mingw-sane-backends] Initial package
mooninite
mooninite at fedoraproject.org
Thu Jul 11 23:14:10 UTC 2013
commit 763fa5610db84e169415d4ce433262e2e8b34716
Author: Michael Cronenworth <mike at cchtml.com>
Date: Thu Jul 11 18:13:59 2013 -0500
Initial package
.gitignore | 1 +
mingw-sane-backends.spec | 155 +++++++++++++++++++++++++++++++++++
sane-backends-mingw-configure.patch | 26 ++++++
sources | 1 +
4 files changed, 183 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7c6e291 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sane-backends-1.0.23.tar.gz
diff --git a/mingw-sane-backends.spec b/mingw-sane-backends.spec
new file mode 100644
index 0000000..601517f
--- /dev/null
+++ b/mingw-sane-backends.spec
@@ -0,0 +1,155 @@
+%?mingw_package_header
+
+Name: mingw-sane-backends
+Version: 1.0.23
+Release: 1%{?dist}
+Summary: MinGW package for SANE
+# lib/ is LGPLv2+, backends are GPLv2+ with exceptions
+# Tools are GPLv2+
+License: GPLv2+ and GPLv2+ with exceptions and Public Domain
+URL: http://www.sane-project.org
+Source0: ftp://ftp.sane-project.org/pub/sane/sane-backends-%{version}/sane-backends-%{version}.tar.gz
+# skip CUPS check
+Patch0: sane-backends-mingw-configure.patch
+
+BuildArch: noarch
+
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw32-gcc
+BuildRequires: mingw64-gcc
+BuildRequires: mingw32-binutils
+BuildRequires: mingw64-binutils
+BuildRequires: mingw32-libusbx
+BuildRequires: mingw64-libusbx
+BuildRequires: mingw32-pthreads
+BuildRequires: mingw64-pthreads
+
+
+%description
+Scanner Access Now Easy (SANE) is a universal scanner interface. The
+SANE application programming interface (API) provides standardized
+access to any raster image scanner hardware (flatbed scanner,
+hand-held scanner, video and still cameras, frame-grabbers, etc.).
+
+
+# Mingw32
+%package -n mingw32-sane-backends
+Summary: %{summary}
+
+%description -n mingw32-sane-backends
+Scanner Access Now Easy (SANE) is a universal scanner interface. The
+SANE application programming interface (API) provides standardized
+access to any raster image scanner hardware (flatbed scanner,
+hand-held scanner, video and still cameras, frame-grabbers, etc.).
+
+
+%package -n mingw32-sane-backends-static
+Summary: Static version of the Scanner Access Now Easy (SANE) universal scanner interface.
+Requires: mingw32-sane-backends = %{version}-%{release}
+
+
+%description -n mingw32-sane-backends-static
+Static version of the Scanner Access Now Easy (SANE) universal scanner interface.
+
+
+# Mingw64
+%package -n mingw64-sane-backends
+Summary: %{summary}
+
+
+%description -n mingw64-sane-backends
+Scanner Access Now Easy (SANE) is a universal scanner interface. The
+SANE application programming interface (API) provides standardized
+access to any raster image scanner hardware (flatbed scanner,
+hand-held scanner, video and still cameras, frame-grabbers, etc.).
+
+
+%package -n mingw64-sane-backends-static
+Summary: Static version of the Scanner Access Now Easy (SANE) universal scanner interface.
+Requires: mingw64-sane-backends = %{version}-%{release}
+
+
+%description -n mingw64-sane-backends-static
+Static version of the Scanner Access Now Easy (SANE) universal scanner interface.
+
+
+%?mingw_debug_package
+
+
+%prep
+%setup -q -n sane-backends-%{version}
+%patch0 -p1
+
+chmod -x COPYING
+
+
+%build
+export BACKENDS=fujitsu \
+export PRELOADABLE_BACKENDS=fujitsu \
+export LIBS="-lws2_32" \
+export DIST_SANELIBS_LDFLAGS="-lsane -lfujitsu" \
+%mingw_configure \
+ --enable-libusb_1_0
+%mingw_make %{?_smp_mflags}
+touch build_win32/backend/.libs/libsane-fujitsu-1.dll
+touch build_win32/backend/.libs/libsane-dll-1.dll
+touch build_win64/backend/.libs/libsane-fujitsu-1.dll
+touch build_win64/backend/.libs/libsane-dll-1.dll
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
+
+# Remove documentation which duplicates that found in the native package.
+rm -r $RPM_BUILD_ROOT/%{mingw32_prefix}/doc
+rm -r $RPM_BUILD_ROOT/%{mingw32_prefix}/share
+rm -r $RPM_BUILD_ROOT/%{mingw64_prefix}/doc
+rm -r $RPM_BUILD_ROOT/%{mingw64_prefix}/share
+
+# Delete temp files
+rm -r $RPM_BUILD_ROOT/%{mingw32_libdir}/sane
+rm -r $RPM_BUILD_ROOT/%{mingw64_libdir}/sane
+rm -r $RPM_BUILD_ROOT/%{mingw32_libdir}/bin
+rm -r $RPM_BUILD_ROOT/%{mingw64_libdir}/bin
+
+
+# Win32
+%files -n mingw32-sane-backends
+%doc COPYING
+%{mingw32_bindir}/libsane-1.dll
+%{mingw32_bindir}/gamma4scanimage.exe
+%{mingw32_bindir}/sane-config
+%{mingw32_bindir}/sane-find-scanner.exe
+%{mingw32_bindir}/scanimage.exe
+%{mingw32_includedir}/sane/
+%{mingw32_libdir}/pkgconfig/sane-backends.pc
+%{mingw32_sysconfdir}/sane.d/
+
+%files -n mingw32-sane-backends-static
+%{mingw32_libdir}/libsane.dll.a
+%{mingw32_libdir}/libsane.la
+
+
+# Win64
+%files -n mingw64-sane-backends
+%doc COPYING
+%{mingw64_bindir}/libsane-1.dll
+%{mingw64_bindir}/gamma4scanimage.exe
+%{mingw64_bindir}/sane-config
+%{mingw64_bindir}/sane-find-scanner.exe
+%{mingw64_bindir}/scanimage.exe
+%{mingw64_includedir}/sane/
+%{mingw64_libdir}/pkgconfig/sane-backends.pc
+%{mingw64_sysconfdir}/sane.d/
+
+%files -n mingw64-sane-backends-static
+%{mingw64_libdir}/libsane.dll.a
+%{mingw64_libdir}/libsane.la
+
+
+%changelog
+* Thu Jul 11 2013 Michael Cronenworth <mike at cchtml.com> - 1.0.23-1
+- Initial RPM package.
+
diff --git a/sane-backends-mingw-configure.patch b/sane-backends-mingw-configure.patch
new file mode 100644
index 0000000..1785265
--- /dev/null
+++ b/sane-backends-mingw-configure.patch
@@ -0,0 +1,26 @@
+--- sane-backends-1.0.23/configure.orig 2012-08-19 15:45:11.000000000 -0500
++++ sane-backends-1.0.23/configure 2013-06-17 10:38:43.017894656 -0500
+@@ -9548,17 +9548,17 @@
+
+ nl added by PN 3/2/12 to detect cups
+ $as_echo "checking for cups"
+-if test -e /usr/include/cups/cups.h ; then
++#if test -e /usr/include/cups/cups.h ; then
+
+-$as_echo "#define HAVE_CUPS 1" >>confdefs.h
++#$as_echo "#define HAVE_CUPS 1" >>confdefs.h
+
+- with_cups="yes"
+- LIBS="-lcups $LIBS"
+-else
++# with_cups="yes"
++# LIBS="-lcups $LIBS"
++#else
+ $as_echo "cups.h not found, you may want to install a cups development package"
+ $as_echo "in order to autodetect network scanners in kodakaio."
+ with_cups="no"
+-fi
++#fi
+
+
+ # Check whether --enable-libusb_1_0 was given.
diff --git a/sources b/sources
index e69de29..2ee1dc7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e226a89c54173efea80e91e9a5eb6573 sane-backends-1.0.23.tar.gz
More information about the scm-commits
mailing list