initz-vl.spec 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. %define emacsen_pkgdir /usr/lib/emacsen-common/packages
  2. Summary: Handles the switching of various initialization files of emacsen
  3. Name: initz
  4. Version: 0.0.9
  5. Release: 1%{?_dist_release}
  6. License: GPL
  7. Group: Applications/Editors
  8. Source: http://www.koka-in.org/~bg66/%{name}-%{version}.tar.gz
  9. Source1: %{name}-install.sh
  10. Source2: %{name}-remove.sh
  11. URL: http://www.koka-in.org/~bg66/index.cgi?cmd=view;name=Initz
  12. Prefix: /usr
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. BuildArch: noarch
  15. PreReq: emacsen, emacsen-common >= 0.1
  16. %description
  17. Initz handles the switching of various startup initialization files of
  18. emacsen provided for various environment. According to the environment
  19. (maybe emacs version, OS type or OS versions) Initz reads appropriate init
  20. files provided by the user in several directories, one for one environment.
  21. %prep
  22. %setup -q
  23. %build
  24. %install
  25. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  26. [ "${RPM_BUILD_ROOT}" != "/" ] && mkdir -p ${RPM_BUILD_ROOT}
  27. mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}
  28. #mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/emacsen-common/packages/install
  29. #mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/emacsen-common/packages/remove
  30. mkdir -p ${RPM_BUILD_ROOT}/%{emacsen_pkgdir}/install
  31. mkdir -p ${RPM_BUILD_ROOT}/%{emacsen_pkgdir}/remove
  32. (cd lisp && \
  33. install -m 644 *.el ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name})
  34. %_installemacsenscript %{name} %{SOURCE1}
  35. %_removeemacsenscript %{name} %{SOURCE2}
  36. %post
  37. if [ "$1" = 2 ]; then
  38. %_emacsenPackageRemove initz
  39. fi
  40. %_addemacsenlist initz
  41. %_emacsenPackageInstall initz
  42. %preun
  43. if [ "$1" = 0 ]; then
  44. %_emacsenPackageRemove initz
  45. %_removeemacsenlist initz
  46. fi
  47. %clean
  48. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  49. %files
  50. %defattr(-, root, root)
  51. %{_datadir}/emacs/site-lisp/%{name}/
  52. #%{_libdir}/emacsen-common/packages/install/%{name}
  53. #%{_libdir}/emacsen-common/packages/remove/%{name}
  54. %{emacsen_pkgdir}/install/%{name}
  55. %{emacsen_pkgdir}/remove/%{name}
  56. %doc AUTHORS
  57. %doc COPYING
  58. %doc ChangeLog
  59. %doc NEWS
  60. %doc README
  61. %doc TODO
  62. %doc sample
  63. %changelog
  64. * Sun Sep 28 2008 Shu KONNO <owa@bg.wakwak.com> 0.0.9-1vl5
  65. - applied new versioning policy, spec in utf-8
  66. - added macro %%emacsen_pkgdir
  67. * Mon Feb 04 2002 akira yamada <akira@vinelinux.org> 0.0.9-0vl1
  68. - new upstream version.
  69. - putted emacsen-common into PreReq.
  70. * Thu Dec 06 2001 akira yamada <akira@vinelinux.org> 0.0.2-0vl1
  71. - Initial packaging.