1 %define ruby_rubylibdir %(ruby -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')
2 %define ruby_archdir %(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')
3 %define ruby_ridir %(ruby -r rbconfig -e 'include Config; print File.join(CONFIG["datadir"], "ri", CONFIG["ruby_version"], "system")')
4 Summary: Ruby interface to Ncurses
6 %define tarname ncurses-ruby
10 Group: Development/Languages
11 Source0: http://download.berlios.de/%{tarname}/%{tarname}-%{version}.tar.bz2
12 # Source0-md5: cb99721b492995bb3548b700b6e86fe2
13 URL: http://ncurses-ruby.berlios.de/
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 This ruby extension makes most functions, constants, and external variables of
20 the C library ncurses accessible from the Ruby programming language.
22 All C functions are wrapped by module functions of a the module "Ncurses", with
23 exactly the same name. Additionally, C functions expecting a WINDOW* as their
24 first argument can also be called as methods of the "Ncurses::WINDOW" class.
27 %setup -q -n %{tarname}-%{version}
34 CFLAGS="%{rpmcflags} -fPIC"
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_archdir}}
43 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
44 cp -a ri/ri/* $RPM_BUILD_ROOT%{ruby_ridir}
45 install ncurses.so $RPM_BUILD_ROOT%{ruby_archdir}
48 rm -rf $RPM_BUILD_ROOT
51 %defattr(644,root,root,755)
53 %{ruby_rubylibdir}/*.rb