xsane-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. %define gimpdirs %(/bin/ls -d %{_libdir}/gimp/*/plug-ins 2> /dev/null)
  2. Name: xsane
  3. Summary: XSane is a graphical frontend for scanners. It uses the library SANE.
  4. Summary: SANE スキャナインタフェースの Xウィンドウ用フロントエンドです
  5. Version: 0.999
  6. Release: 2%{?_dist_release}
  7. Source: http://www.xsane.org/download/%{name}-%{version}.tar.gz
  8. %{?nosrc:NoSource: 0}
  9. License: GPL
  10. URL: http://www.xsane.org/
  11. Group: Applications/Multimedia
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. Requires: sane >= 1.0.0, gtk2, glib2, atk, pango, zlib
  14. BuildRequires: sane-devel, gtk2-devel, atk-devel, pango-devel
  15. BuildRequires: gimp >= 1.3.23
  16. BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel,zlib-devel
  17. BuildRequires: lcms-devel
  18. BuildRequires: sed, glibc-common
  19. BuildRequires: gimp-devel
  20. Patch0: xsane-0.999-libpng.patch
  21. %description
  22. Xsane is a grahical frontend for sane. Install this if you want a grahpical
  23. frontend for sane for use in the X Windowing System.
  24. %description -l ja
  25. XSane は、多くのスキャナ、デジタルカメラ、その他の画像取り込み装置に対応
  26. した SANE スキャナインタフェースの Xウィンドウ用フロントエンドです。
  27. XSane は GTK+ で書かれ、画像取り込みや取込み画像の操作を行うことができま
  28. す。
  29. %prep
  30. %setup -q
  31. %patch0 -p1 -b .libpng
  32. # correct some links in html documents
  33. cd doc
  34. DOCFILE=sane-backends-doc.html
  35. cat ${DOCFILE} | sed 's,/usr/local/share,%{_datadir},' > ${DOCFILE}.new
  36. [ -f ${DOCFILE}.new ] && mv -f ${DOCFILE}.new ${DOCFILE}
  37. DOCFILE=sane-xsane-gimp-doc.html
  38. cat ${DOCFILE} | sed 's,/usr/local/bin,%{_bindir},' > ${DOCFILE}.new
  39. [ -f ${DOCFILE}.new ] && mv -f ${DOCFILE}.new ${DOCFILE}
  40. ICONFILE=sane-logo2.jpg
  41. [ -f %{_datadir}/sane/${ICONFILE} ] && cp %{_datadir}/sane/${ICONFILE} ./
  42. %build
  43. %configure
  44. %{__make} %{?_smp_mflags}
  45. %install
  46. %__rm -rf $RPM_BUILD_ROOT
  47. %{__make} install DESTDIR=${RPM_BUILD_ROOT}
  48. cp src/*.xpm $RPM_BUILD_ROOT%{_datadir}/sane/%{name}
  49. if (echo "%{gimpdirs}" | grep -q plug-ins) ;then
  50. for D in %{gimpdirs} ; do
  51. mkdir -p $RPM_BUILD_ROOT${D}
  52. %__ln_s -f %{_bindir}/xsane $RPM_BUILD_ROOT${D}/xsane
  53. done
  54. fi
  55. # prepare applnk
  56. %define applnkdir /etc/X11/applnk/Graphics
  57. %define icondir %{_datadir}/sane/%{name}
  58. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
  59. cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop <<EOF
  60. [Desktop Entry]
  61. Encoding=UTF-8
  62. Name=XSane
  63. Name[ja]=XSane スキャナ操作
  64. Comment=Scanner program
  65. Comment[ja]=スキャナを操作するツールです
  66. Terminal=false
  67. Type=Application
  68. Icon=%{icondir}/xsane-48x48.xpm
  69. Exec=xsane
  70. MultipleArgs=false
  71. Categories=Application;Graphics;
  72. EOF
  73. %find_lang %{name}
  74. %clean
  75. rm -rf $RPM_BUILD_ROOT
  76. %files -f %{name}.lang
  77. %defattr(-,root,root)
  78. %doc xsane.*
  79. %{_bindir}/*
  80. %{_mandir}/*/*
  81. %{_datadir}/sane/*
  82. %{_libdir}/gimp/*/plug-ins/*
  83. %{_datadir}/pixmaps/xsane.xpm
  84. %config(missingok) %{_datadir}/applications/*
  85. %changelog
  86. * Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-2
  87. - rebuild with libgphoto2-2.5.7
  88. - add BuildRequires: lcms-devel
  89. * Wed Jan 14 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.999-1
  90. - update to 0.999
  91. - add Patch0 (xsane-0.999-libpng.patch)
  92. * Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.997-2
  93. - build with libgphoto2 2.5.0-1
  94. * Sun Jul 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.997-1
  95. - new upstream release
  96. - add BuildRequires: gimp-devel
  97. - remove configure option (--enable-gimp)
  98. - fix %files
  99. * Sat Jul 26 2008 Shu KONNO <owa@bg.wakwak.com> 0.995-1vl5
  100. - applied new versioning policy
  101. - updated script to create %{name}.desktop
  102. * Mon Dec 24 2007 Shu KONNO <owa@bg.wakwak.com> 0.995-0vl1
  103. - new upstream
  104. - updated xsane.desktop
  105. * Sat Jan 08 2005 Satoshi MACHINO <machino@vinelinux.org> 0.96-0vl1
  106. - new upstream version (xsane-0.96)
  107. - fixed spec file
  108. -- cleaned up
  109. -- added Requires: sane >= 1.0.0, gtk2, glib2, atk, pango, zlib
  110. -- added BuildRequires: sane-devel, gtk2-devel, atk-devel, pango-devel
  111. -- added BuildRequires: gimp >= 1.3.23
  112. -- added BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel,zlib-devel
  113. * Fri Oct 25 2002 Tomoya TAKA <taka@vinelinux.org> 0.89-0vl1
  114. - new upstream release
  115. * Mon May 13 2002 Satoshi MACHINO <machino@vinelinux.org> xsane-0.86-0vl1
  116. - updated xsane-0.86
  117. * Thu Apr 4 2002 Masaki Shinomiya <shino@pos.to>
  118. - 0.84-0vl1 for Vine Linux-2.x
  119. - 0.84-0.1
  120. - symlink for gimp listed in %file section
  121. - some html-documents
  122. - set %_sysconfdir to /etc for RedHat6.x/Vine2.x
  123. - RPM Group move to Applications/Multimedia
  124. * Tue Mar 12 2002 Masaki Shinomiya <shino@pos.to>
  125. - 0.84-0
  126. - bugfix in %post script
  127. * Sun Dec 23 2001 Masaki Shinomiya <shino@pos.to>
  128. - 0.82-0.1
  129. - use mocros as possible, nosrc
  130. * Thu Jul 5 2001 Masaki Shinomiya <shino@pos.to>
  131. - 0.79-0test
  132. - remove the patch of the tooltips
  133. * Thu Jul 5 2001 Masaki Shinomiya <shino@pos.to>
  134. - 0.78-1vl2
  135. - fixed script for gimp plug-in setup
  136. * Sat Jun 23 2001 Masaki Shinomiya <shino@pos.to>
  137. - rename for VinePlus. program registoration for gnome
  138. * Tue Jun 19 2001 Masaki Shinomiya <shino@pos.to>
  139. - patch to provide proper fonts for the tooltips
  140. * Thu Jun 14 2001 Masaki Shinomiya <shino@pos.to>
  141. - 0.78-1
  142. - escape confliction of the document file 'sane-pnm-doc.html' with one from SANE
  143. * Sun Jun 3 2001 Masaki Shinomiya <shino@pos.to>
  144. - 0.77-1
  145. * Mon May 21 2001 Masaki Shinomiya <shino@pos.to>
  146. - 0.76-1
  147. - refined script for gimp plug-in setup
  148. * Wed Nov 15 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  149. - 0.64-0vl1
  150. - updated to 0.64 (hope it'll be compatible with gimp-1.1.27...)
  151. * Mon Oct 16 2000 Jun Nishii <jun@vinelinux.org>
  152. - 0.61-0vl3
  153. - build with gimp-1.1.27
  154. * Mon Sep 25 2000 Jun Nishii <jun@vinelinux.org>
  155. - 0.61-0vl2
  156. - build with gimp-1.1.25
  157. * Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org>
  158. - 0.61-0vl1
  159. * Sat Jan 22 2000 Jun Nishii <jun@vinelinux.org>
  160. - 0.51-0vl1
  161. * Mon Aug 30 1999 Tim Powers <timp@redhat.com>
  162. - changed group
  163. * Mon Jul 26 1999 Tim Powers <timp@redhat.com>
  164. - update to 0.30
  165. - added %defattr
  166. - built for 6.1
  167. * Thu Apr 22 1999 Preston Brown <pbrown@redhat.com>
  168. - initial RPM for PowerTools 6.0