xsane-vl.spec 5.8 KB

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