]>
Commit | Line | Data |
---|---|---|
f91b6521 | 1 | %define tarname ncurses-ruby |
1b7cc4fb | 2 | Summary: Ruby interface to Ncurses |
5e811080 | 3 | Summary(pl.UTF-8): Interfejs Ncurses dla Ruby |
1b7cc4fb | 4 | Name: ruby-Ncurses |
1b7cc4fb | 5 | Version: 0.9.1 |
e61db6c2 | 6 | Release: 7 |
1b7cc4fb | 7 | License: Ruby-alike |
8 | Group: Development/Languages | |
9 | Source0: http://download.berlios.de/%{tarname}/%{tarname}-%{version}.tar.bz2 | |
10 | # Source0-md5: cb99721b492995bb3548b700b6e86fe2 | |
b9afdc5e | 11 | Patch0: %{name}-utf8.patch |
1b7cc4fb | 12 | URL: http://ncurses-ruby.berlios.de/ |
e429aa09 | 13 | BuildRequires: rpmbuild(macros) >= 1.277 |
6907a018 | 14 | BuildRequires: ruby-devel >= 1:1.8.4-5 |
2d770ed1 | 15 | %{?ruby_mod_ver_requires_eq} |
1b7cc4fb | 16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
1d713168 JB |
19 | This ruby extension makes most functions, constants, and external |
20 | variables of the C library ncurses accessible from the Ruby | |
21 | programming language. | |
1b7cc4fb | 22 | |
1d713168 JB |
23 | All C functions are wrapped by module functions of a the module |
24 | "Ncurses", with exactly the same name. Additionally, C functions | |
25 | expecting a WINDOW* as their first argument can also be called as | |
f91b6521 | 26 | methods of the "Ncurses::WINDOW" class. |
1b7cc4fb | 27 | |
dcb8124d JR |
28 | %description -l pl.UTF-8 |
29 | Rozszerzenie do ruby, które umożliwia dostęp do większość funkcji, | |
30 | stałych i zewnętrznych zmiennych biblioteki ncurses z poziomu języka | |
1d713168 | 31 | Ruby. |
ebc0dab0 | 32 | |
dcb8124d JR |
33 | Wszystkie funkcje C są dostępne poprzez funkcje modułu "Ncurses" pod |
34 | dokładnie tymi samymi nazwami. Dodatkowo funkcje, które spodziewają | |
35 | się mieć WINDOW* jako ich pierwszy argument mogą być także wywoływane | |
1d713168 | 36 | jako metody klasy "Ncurses::WINDOW". |
ebc0dab0 | 37 | |
1b7cc4fb | 38 | %prep |
39 | %setup -q -n %{tarname}-%{version} | |
b9afdc5e ZU |
40 | %patch0 -p1 |
41 | %{__sed} -i "s@curses.h@ncursesw/curses.h@" ncurses_wrap.h | |
1b7cc4fb | 42 | |
43 | %build | |
44 | ruby extconf.rb | |
45 | ||
46 | %{__make} \ | |
47 | CC="%{__cc}" \ | |
48 | CFLAGS="%{rpmcflags} -fPIC" | |
49 | ||
50 | rdoc --ri --op ri lib | |
51 | rdoc --op rdoc lib | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_archdir}} | |
56 | ||
57 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} | |
20384a89 | 58 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
1b7cc4fb | 59 | install ncurses.so $RPM_BUILD_ROOT%{ruby_archdir} |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc README rdoc | |
67 | %{ruby_rubylibdir}/*.rb | |
1d713168 | 68 | %attr(755,root,root) %{ruby_archdir}/*.so |
1b7cc4fb | 69 | %{ruby_ridir}/Ncurses |