rpm-spec-mode-vl.spec 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define origname rpm-spec-mode
  4. %define origver 0.12
  5. Summary: RPM spec file editing commands for Emacs/XEmacs
  6. Name: %{origname}
  7. Version: %{origver}
  8. Release: 1%{?_dist_release}
  9. Source0: http://www.tihlde.org/~stigb/rpm-spec-mode.el
  10. Source1: %{origname}-install.sh
  11. Source2: %{origname}-remove.sh
  12. Source3: vine-default-%{origname}.el
  13. Source4: %{origname}-init.el
  14. License: GPLv2+
  15. Group: Applications/Editors/Emacs
  16. URL: http://www.emacswiki.org/emacs/RpmSpecMode
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. BuildArch: noarch
  19. Requires: emacsen
  20. %prereq_ge emacsen-common
  21. Distribution: Vine Linux
  22. Vendor: Project Vine
  23. Packager: iwaim
  24. %description
  25. RPM spec file editing commands for Emacs/XEmacs
  26. %prep
  27. %setup -T -c %{origname}-%{origver}
  28. %build
  29. %install
  30. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  31. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  32. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  33. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  34. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  35. #
  36. # install el files
  37. #
  38. %__cp -p %{SOURCE0} %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  39. #
  40. # install script (bytecompile el and install elc , remove)
  41. #
  42. %_installemacsenscript %{origname} %{SOURCE1}
  43. %_removeemacsenscript %{origname} %{SOURCE2}
  44. %clean
  45. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  46. %post
  47. #
  48. # bytecompile and install
  49. #
  50. if [ "$1" = 2 ]; then
  51. %_emacsenPackageRemove %{origname}
  52. fi
  53. %_addemacsenlist %{origname}
  54. %_emacsenPackageInstall %{origname}
  55. %preun
  56. if [ "$1" = 0 ]; then
  57. %_emacsenPackageRemove %{origname}
  58. %_removeemacsenlist %{origname}
  59. fi
  60. %files
  61. %defattr(-,root,root)
  62. %{_datadir}/emacs/site-lisp/%{origname}
  63. %{emacsen_pkgdir}/install/%{origname}
  64. %{emacsen_pkgdir}/remove/%{origname}
  65. %changelog
  66. * Thu Sep 02 2010 IWAI, Masaharu <iwai@alib.jp> 0.12-1
  67. - first release for Vine Linux