xsane-vl.spec 5.7 KB

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