xsane-vl.spec 5.3 KB

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