1 # 2 # spec file for package SUNWxsane 3 # 4 # includes module(s): xsane 5 # 6 # Copyright 2009 Sun Microsystems, Inc. 7 # This file and all modifications and additions to the pristine 8 # package are under the same license as the package itself. 9 # 10 %define owner halton 11 # 12 %include Solaris.inc 13 14 %define OSR 5667:1.x 15 16 Name: SUNWxsane 17 Summary: Graphical scanning frontend for the SANE scanner interface. 18 License: GPL v2 19 Version: 0.997 20 URL: http://www.xsane.org/ 21 Source: http://www.xsane.org/download/xsane-%{version}.tar.gz 22 # date:2007-02-25 owner:halton type:feature 23 Patch1: xsane-01-gettext.diff 24 # date:2007-07-01 owner:halton type:feature 25 Patch2: xsane-02-doc.diff 26 # date:2008-12-30 owner:halton type:bug bugster:6765509 27 Patch3: xsane-03-keyboard.diff 28 # date:2007-08-04 owner:halton type:feature 29 Patch4: xsane-04-manpage.diff 30 # date:2007-08-15 owner:halton type:feature 31 Patch5: xsane-05-tiff-jpegcompress.diff 32 SUNW_BaseDir: %{_basedir} 33 SUNW_Copyright: %{name}.copyright 34 BuildRoot: %{_tmppath}/%{name}-%{version}-build 35 36 %include default-depend.inc 37 Requires: SUNWgtk2 38 Requires: SUNWfontconfig 39 Requires: SUNWfreetype2 40 Requires: SUNWlcms 41 Requires: SUNWlexpt 42 Requires: SUNWlibexif 43 Requires: SUNWlibms 44 Requires: SUNWlibusb 45 Requires: SUNWltdl 46 Requires: SUNWmlib 47 Requires: SUNWxorg-clientlibs 48 Requires: SUNWxwplt 49 Requires: SUNWxwrtl 50 Requires: SUNWzlib 51 Requires: SUNWTiff 52 Requires: SUNWjpg 53 Requires: SUNWpng 54 Requires: SUNWgnome-camera 55 Requires: SUNWgnome-img-editor 56 Requires: SUNWsane-backendu 57 BuildRequires: SUNWgtk2-devel 58 BuildRequires: SUNWTiff-devel 59 BuildRequires: SUNWjpg-devel 60 BuildRequires: SUNWpng-devel 61 BuildRequires: SUNWgnome-camera-devel 62 BuildRequires: SUNWgnome-img-editor-devel 63 BuildRequires: SUNWsane-backendu 64 65 %if %build_l10n 66 %package l10n 67 Summary: %{summary} - l10n files 68 SUNW_BaseDir: %{_basedir} 69 %include default-depend.inc 70 Requires: %{name} 71 %endif 72 73 %prep 74 %setup -q -n xsane-%version 75 %patch1 -p1 76 %patch2 -p1 77 %patch3 -p1 78 %patch4 -p1 79 %patch5 -p1 80 81 %build 82 # /usr/sfw needed for libusb 83 export LDFLAGS="%_ldflags -L/usr/sfw/lib -R/usr/sfw/lib" 84 85 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` 86 if test "x$CPUS" = "x" -o $CPUS = 0; then 87 CPUS=1 88 fi 89 90 aclocal -I m4 91 libtoolize --force 92 glib-gettextize --force 93 autoconf -f 94 ./configure --prefix=%{_prefix} --mandir=%{_mandir} \ 95 --libdir=%{_libdir} \ 96 --libexecdir=%{_libexecdir} \ 97 --sysconfdir=%{_sysconfdir} 98 make -j$CPUS RANLIB=/usr/ccs/bin/ranlib 99 100 %install 101 rm -rf $RPM_BUILD_ROOT 102 make install DESTDIR=$RPM_BUILD_ROOT MKINSTALLDIRS=`pwd`/mkinstalldirs 103 rmdir $RPM_BUILD_ROOT%{_sbindir} 104 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' 105 find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';' 106 107 #Create a link to xsane binary for gimp plugin 108 mkdir -p $RPM_BUILD_ROOT%{_libdir}/gimp/2.0/plug-ins 109 chmod -R 755 $RPM_BUILD_ROOT%{_libdir}/gimp 110 cd $RPM_BUILD_ROOT%{_libdir}/gimp/2.0/plug-ins 111 ln -s ../../../../bin/xsane 112 113 %if %build_l10n 114 # Rename zh dir to zh_TW dir as the contents of zh.po is in fact for zh_TW 115 # and zh is a symlink to zh_CN. 116 cd $RPM_BUILD_ROOT%{_datadir}/locale 117 mv zh zh_TW 118 %else 119 # REMOVE l10n FILES 120 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale 121 %endif 122 123 %clean 124 rm -rf $RPM_BUILD_ROOT 125 126 %files 127 %defattr (-, root, bin) 128 %{_bindir}/* 129 %dir %attr(0755, root, sys) %{_datadir} 130 %doc xsane.AUTHOR 131 %doc(bzip2) xsane.COPYING xsane.NEWS xsane.CHANGES intl/ChangeLog 132 %dir %attr (0755, root, other) %{_datadir}/doc 133 %dir %attr (-, root, other) %{_datadir}/applications 134 %{_datadir}/applications/* 135 %dir %attr (-, root, other) %{_datadir}/pixmaps 136 %{_datadir}/pixmaps/* 137 %{_datadir}/sane 138 %{_libdir}/gimp/2.0/plug-ins/* 139 %{_mandir}/*/* 140 141 %if %build_l10n 142 %files l10n 143 %defattr (-, root, bin) 144 %dir %attr (0755, root, sys) %{_datadir} 145 %attr (-, root, other) %{_datadir}/locale 146 %endif 147 148 %changelog 149 * Thu Sep 10 2009 - halton.huo@sun.com 150 - Bump to Bump to 0.997 151 * Tue Dec 30 2008 - halton.huo@sun.com 152 - Add patch keyboard.diff to fix CR #6765509 153 * Tue Sep 23 2008 - simon.zheng@sun.com 154 - Bump to 0.996. Remove upstream patch 03-desktopfile.diff. 155 * Fri Aug 15 2008 - simon.zheng@sun.com 156 - Add 05-tiff-jpegcompress.diff to fix bugster bug #6728809. 157 * Mon Aug 11 2008 - harry.fu@sun.com 158 - Change zh dir to zh_TW dir for #6735224 159 * Mon Aug 04 2008 - simon.zheng@sun.com 160 - Add patch 04-manpage.diff 161 * Tue Jul 01 2008 - simon.zheng@sun.com 162 - Add patch 02-doc.diff, 03-desktopfile.diff. 163 * Mon Jun 23 2008 - damien.carbery@sun.com 164 - Update Build/Requires after 'ldd xsane'. Make gimp symlink a relative one 165 because absolute symlinks are not permitted in Solaris. 166 * Sun Jun 22 2008 - simon.zheng@sun.com 167 - Clean up and move spec file from 168 spec-files-extra to spec-files-other/core. 169 * Sun Mar 02 2008 - simon.zheng@sun.com 170 - Correct package version numbers. 171 * Wed Oct 17 2007 - laca@sun.com 172 - add /usr/gnu to CFLAGS/LDFLAGS 173 * Mon Apr 02 2007 - daymobrew@users.sourceforge.net 174 - Rename zh dir to zh_CN in %install as zh a symlink to zh_CN and causing 175 installation problems as a dir. 176 * Tue Mar 20 2007 - simon.zheng@sun.com 177 - Split into 2 files, SFExsane.spec and 178 linux-specs/xsane.spec. 179 * Wed Mar 7 2007 - simon.zheng@sun.com 180 - Bump to version 0.994 181 - Modify %file to enable gimp-plugin 182 * Sun Nov 5 2006 - laca@sun.com 183 - Create 184 185