diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2005-05-12 06:36:03 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2005-05-12 06:36:03 +0000 |
commit | 061562218c7f480fb8da80c47534d62f72e89bd8 (patch) | |
tree | a03ded3c97acd692fb598c53c9aed64a6ace7341 /rpm-mandriva-setup.spec | |
parent | 54c4b2bd261a97d92cddaf7add38f95442c65cdb (diff) | |
download | rpm-setup-061562218c7f480fb8da80c47534d62f72e89bd8.tar rpm-setup-061562218c7f480fb8da80c47534d62f72e89bd8.tar.gz rpm-setup-061562218c7f480fb8da80c47534d62f72e89bd8.tar.bz2 rpm-setup-061562218c7f480fb8da80c47534d62f72e89bd8.tar.xz rpm-setup-061562218c7f480fb8da80c47534d62f72e89bd8.zip |
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 |