diff options
Diffstat (limited to 'rpm-mandriva-setup.spec')
-rw-r--r-- | rpm-mandriva-setup.spec | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/rpm-mandriva-setup.spec b/rpm-mandriva-setup.spec index f84c0d2..5eab50e 100644 --- a/rpm-mandriva-setup.spec +++ b/rpm-mandriva-setup.spec @@ -1,7 +1,18 @@ %define name rpm-mandriva-setup -%define version 0.6 +%define version 0.7 %define release %mkrel 1 +# This can be usefull for backport as rpm-4.2 +# provide the emacs-spec mode +%define have_emacsmodespec 1 + +%if %mdkversion < 200600 +%define have_emacsmodespec 0 +%endif + +%{?_with_emacsspecmode: %define have_emacsmodespec 1} +%{?_without_emacsspecmode: %define have_emacsmodespec 1} + Summary: The Mandriva rpm configuration and scripts Name: %{name} Version: %{version} @@ -12,6 +23,9 @@ Group: System/Configuration/Packaging Url: http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/rpm-setup/ BuildRoot: %{_tmppath}/%{name}-buildroot Requires: spec-helper >= 0.6-5mdk +%if have_emacsmodespec +Conflicts: rpm < 4.4.1 +%endif %description The Mandriva rpm configuration and scripts @@ -29,6 +43,18 @@ rm -rf $RPM_BUILD_ROOT mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d +%if have_emacsmodespec +# spec mode for emacs +install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ +install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ + +install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d +cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el +(setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist)) +(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (mandrakized)." t) +EOF +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -38,7 +64,15 @@ rm -rf $RPM_BUILD_ROOT %_prefix/lib/rpm/mandriva %dir %{_sysconfdir}/rpm/macros.d +%if have_emacsmodespec +%{_datadir}/emacs/site-lisp/rpm-spec-mode.el +%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el +%endif + %changelog +* Thu May 12 2005 Olivier Thauvin <nanardon@mandriva.org> 0.7-1mdk +- 0.7 (integrate spec mode for emacs) + * Tue May 10 2005 Olivier Thauvin <nanardon@mandriva.org> 0.6-1mdk - 0.6 %_libexecdir |