Author: twittner                     Date: Mon Jan  2 17:32:19 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added -emacs-mode subpackage

---- Files affected:
SPECS:
   ruby.spec (1.126 -> 1.127) 

---- Diffs:

================================================================
Index: SPECS/ruby.spec
diff -u SPECS/ruby.spec:1.126 SPECS/ruby.spec:1.127
--- SPECS/ruby.spec:1.126       Sun Jan  1 10:54:11 2006
+++ SPECS/ruby.spec     Mon Jan  2 18:32:14 2006
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+#
+%bcond_without emacs   # skip building package with ruby-mode for emacs
+#
 %define                ruby_ver        1.8
 %define                ruby_ridir      %{_datadir}/ri/%{ruby_ver}/system
 Summary:       Ruby - interpreted scripting language
@@ -8,7 +11,7 @@
 Summary(zh_CN):        ruby - ŇťÖÖżěËٸßЧľÄĂćĎňśÔĎó˝ĹąžąŕłĚÓďŃÔ
 Name:          ruby
 Version:       1.8.4
-Release:       5       
+Release:       5
 Epoch:         1
 License:       The Ruby License
 Group:         Development/Languages
@@ -34,6 +37,7 @@
 Source10:      rdoc.1
 Source11:      ri.1
 Source12:      testrb.1
+Source13:      %{name}-mode-init.el
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-LIB_PREFIX.patch
 Patch2:                %{name}-mkmf-shared.patch
@@ -41,6 +45,7 @@
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: db-devel
+%{?with_emacs:BuildRequires:   emacs}
 BuildRequires: gdbm-devel >= 1.8.3
 BuildRequires: ncurses-devel
 BuildRequires: readline-devel >= 4.2
@@ -185,6 +190,19 @@
 %description examples -l pl
 Przykłady programów Ruby.
 
+%package emacs-mode
+Summary:       Ruby mode and debugger for Emacs
+Summary(pl):   Tryb Ruby i debugger dla Emacsa
+Group: Development/Tools
+Requires:      emacs-common
+Requires:      ruby-modules = %{epoch}:%{version}-%{release}
+
+%description emacs-mode
+Ruby mode and debugger for Emacs.
+
+%description emacs-mode -l pl
+Tryb Ruby i debugger dla Emacsa.
+
 %prep
 %setup -q -a1 -a2 -a3 -a5 -a6 -a7
 %patch0 -p1
@@ -248,7 +266,8 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d 
$RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man1,%{_examplesdir}/%{name}-%{version},%{ruby_ridir},%{_libdir}/rpm,%{_datadir}/%{name}}
+install -d 
$RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man1,%{_examplesdir}/%{name}-%{version},%{ruby_ridir},%{_libdir}/rpm}
+install -d 
$RPM_BUILD_ROOT{%{_datadir}/%{name},%{_emacs_lispdir}/{%{name}-mode,site-start.d}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -268,6 +287,18 @@
 
 install %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/rpm
 
+# ruby emacs mode - borrowed from FC-4
+%if %{with emacs}
+install misc/*.el $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode
+rm -f $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el
+install %{SOURCE13} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d 
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+emacs --no-site-file -q -batch -l path.el -f batch-byte-compile 
$RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/*.el
+rm -f path.el*
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -374,7 +405,7 @@
 
 %files doc
 %defattr(644,root,root,755)
-%doc faq guide misc rdoc
+%doc faq guide rdoc
 
 %files doc-ri
 %defattr(644,root,root,755)
@@ -384,12 +415,24 @@
 %defattr(644,root,root,755)
 %{_examplesdir}/%{name}-%{version}
 
+%if %{with emacs}
+%files emacs-mode
+%defattr(644,root,root,755)
+%doc misc
+%dir %{_emacs_lispdir}/%{name}-mode
+%{_emacs_lispdir}/%{name}-mode/*
+%{_emacs_lispdir}/site-start.d/*
+%endif
+
 %define        date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <[EMAIL PROTECTED]>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.127  2006/01/02 17:32:14  twittner
+- added -emacs-mode subpackage
+
 Revision 1.126  2006/01/01 09:54:11  twittner
 - don't force linking with -lruby-static: restore commented out
   -mkmf-shared.patch (updated for ruby 1.8.4)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ruby.spec?r1=1.126&r2=1.127&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to