/[packages]/cauldron/ruby/current/SPECS/ruby.spec
ViewVC logotype

Annotation of /cauldron/ruby/current/SPECS/ruby.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 289958 - (hide annotations) (download)
Sat Sep 8 08:30:02 2012 UTC (11 years, 7 months ago) by fwang
File size: 5573 byte(s)
new version 1.9.3-p194
1 fwang 289958 %define subver 1.9
2     %define rubyver 1.9.3
3     %define patchversion p194
4     %define rel 1
5 blino 1152
6     Summary: Object Oriented Script Language
7     Name: ruby
8     Version: %{rubyver}.%{patchversion}
9     Release: %mkrel %rel
10     License: Ruby or GPLv2
11     Group: Development/Ruby
12     BuildRequires: autoconf
13     BuildRequires: byacc
14     BuildRequires: ncurses-devel
15     BuildRequires: readline-devel
16     BuildRequires: tcl-devel tk-devel
17 fwang 276350 BuildRequires: db-devel
18 fwang 176940 BuildRequires: gdbm-devel >= 1.8.3
19 blino 1152 BuildRequires: openssl-devel
20     BuildRequires: zlib-devel
21     Obsoletes: ruby-rexml
22     Provides: ruby-rexml
23     # explicit file provides (since such requires are automatically added by find-requires)
24     Provides: /usr/bin/ruby
25     Provides: ruby(abi) = %subver
26    
27 fwang 289958 Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2
28 blino 1152 Source3: ruby.macros
29     Patch0: ruby-lib64.patch
30     Patch1: ruby-do-not-use-system-ruby-to-generate-ri-doc.patch
31     Patch2: ruby-add-old-os-to-search-path.patch
32     Patch3: ruby-do_not_propagate_no-undefined.patch
33     URL: http://www.ruby-lang.org/
34    
35     %package doc
36     Summary: Documentation for the powerful language Ruby
37     Group: Development/Ruby
38 fwang 202696 BuildArch: noarch
39 blino 1152
40     %package devel
41     Summary: Development file for the powerful language Ruby
42     Group: Development/Ruby
43     Requires: %{name} = %{version}
44    
45     %package tk
46     Summary: Tk extension for the powerful language Ruby
47     Group: Development/Ruby
48     Requires: %{name} = %{version}
49    
50     %description
51     Ruby is the interpreted scripting language for quick and
52     easy object-oriented programming. It has many features to
53     process text files and to do system management tasks (as in
54     Perl). It is simple, straight-forward, and extensible.
55    
56     %description doc
57     Ruby is the interpreted scripting language for quick and
58     easy object-oriented programming. It has many features to
59     process text files and to do system management tasks (as in
60     Perl). It is simple, straight-forward, and extensible.
61    
62     This package contains the Ruby's documentation
63    
64     %description devel
65     Ruby is the interpreted scripting language for quick and
66     easy object-oriented programming. It has many features to
67     process text files and to do system management tasks (as in
68     Perl). It is simple, straight-forward, and extensible.
69    
70     This package contains the Ruby's devel files.
71    
72     %description tk
73     Ruby is the interpreted scripting language for quick and
74     easy object-oriented programming. It has many features to
75     process text files and to do system management tasks (as in
76     Perl). It is simple, straight-forward, and extensible.
77    
78     This package contains the Tk extension for Ruby.
79    
80     %prep
81     %setup -q -n ruby-%{rubyver}-%{patchversion}
82    
83     %build
84     CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'`
85 fwang 289958 %configure2_5x --enable-shared --disable-rpath --enable-pthread
86 blino 1152 %make
87    
88     %install
89     %makeinstall_std install-doc
90    
91     install -d %buildroot%{_docdir}/%{name}-%{version}
92     cp -a COPYING* ChangeLog README* ToDo sample %buildroot%{_docdir}/%{name}-%{version}
93     bzcat %{SOURCE1} > %buildroot%{_docdir}/%{name}-%{version}/FAQ.html
94    
95     install -d %buildroot%{_datadir}/emacs/site-lisp
96     cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp
97    
98     install -d %buildroot%{_sysconfdir}/emacs/site-start.d
99     cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el
100     (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
101     (add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode))
102     (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
103     EOF
104    
105     (cd %buildroot%{_docdir}/%{name}-%{version} ; tar xfj %{SOURCE2} ; cd Pro*; mv -f html/* . ; rm -rf html xml)
106    
107     # Make the file/dirs list, filtering out tcl/tk and devel files
108     ( cd %buildroot \
109     && find usr/lib/ruby/%{subver} \
110     \( -not -type d -printf "/%%p\n" \) \
111     -or \( -type d -printf "%%%%dir /%%p\n" \) \
112 rtp 25806 ) | egrep -v '/(tcl)?tk|(%{my_target_cpu}-%{_target_os}%{abi}/.*[ha]$)' > %{name}.list
113 blino 1152
114     # Fix scripts permissions and location
115     find %buildroot sample -type f | file -i -f - | grep text | cut -d: -f1 >text.list
116     cat text.list | xargs chmod 0644
117     # Magic grepping to get only files with '#!' in the first line
118     cat text.list | xargs grep -n '^#!' | grep ':1:#!' | cut -d: -f1 >shebang.list
119     cat shebang.list | xargs sed -i -e 's|/usr/local/bin|/usr/bin|; s|\./ruby|/usr/bin/ruby|'
120     cat shebang.list | xargs chmod 0755
121    
122    
123     # Install the rpm macros
124     mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d
125     cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d
126     %check
127     make test
128    
129     %clean
130     rm -rf %buildroot
131    
132     %files -f %{name}.list
133     %defattr(-, root, root)
134     %dir %{_docdir}/%{name}-%{version}
135     %{_docdir}/%{name}-%{version}/README
136     %{_bindir}/*
137     %dir %{_prefix}/lib/%{name}/
138     %{_libdir}/libruby.so.*
139     %{_prefix}/lib/%{name}/site_ruby
140     %{_mandir}/*/*
141     %{_datadir}/emacs/site-lisp/*
142     %config(noreplace) %{_sysconfdir}/emacs/site-start.d/*
143     %{_sysconfdir}/rpm/macros.d/%{name}.macros
144    
145     %files doc
146     %defattr(-, root, root)
147     %{_datadir}/ri
148     %dir %{_docdir}/%{name}-%{version}
149     %{_docdir}/%{name}-%{version}/COPYING*
150     %{_docdir}/%{name}-%{version}/ChangeLog
151     %{_docdir}/%{name}-%{version}/README.*
152     %{_docdir}/%{name}-%{version}/FAQ.html
153     %{_docdir}/%{name}-%{version}/ToDo
154     %{_docdir}/%{name}-%{version}/sample
155     %{_docdir}/%{name}-%{version}/ProgrammingRuby*
156    
157     %files devel
158     %defattr(-, root, root)
159 rtp 25806 %{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}%{abi}/*.[ah]
160 blino 1152 %{_libdir}/libruby-static.a
161     %{_libdir}/libruby.so
162    
163     %files tk
164     %defattr(-, root, root)
165 rtp 25806 %{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}%{abi}/tcltk*
166     %{_prefix}/lib/%{name}/%{subver}/%{my_target_cpu}-%{_target_os}%{abi}/tk*
167 blino 1152 %{_prefix}/lib/%{name}/%{subver}/tcltk*
168     %{_prefix}/lib/%{name}/%{subver}/tk*
169     %{_prefix}/lib/%{name}/%{subver}/test/unit/ui/tk
170    
171    
172    

  ViewVC Help
Powered by ViewVC 1.1.30