]>
Commit | Line | Data |
---|---|---|
a28186ab ŁK |
1 | %define tkver 8.4 |
2 | # | |
3 | Summary: TkTable is a table/matrix widget extension to tk/tcl | |
4 | Name: Tktable | |
5 | Version: 2.9 | |
6 | Release: 1 | |
7 | License: BSD | |
8 | Group: Development/Languages/Tcl | |
9 | Source0: http://dl.sourceforge.net/tktable/%{name}%{version}.tar.gz | |
10 | # Source0-md5: a91cac4270a0c46945723d8f5106e80b | |
11 | Patch0: %{name}-pkg_lib_file.patch | |
12 | URL: http://tktable.sourceforge.net/ | |
13 | BuildRequires: autoconf | |
14 | BuildRequires: tk-devel >= %{tkver} | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define _ulibdir /usr/lib | |
18 | ||
19 | %description | |
20 | TkTable is a table/matrix widget extension to tk/tcl. | |
21 | The basic features of the widget are: | |
22 | * multi-line cells | |
23 | * support for embedded windows (one per cell) | |
24 | * row & column spanning | |
25 | * variable width columns / height rows (interactively resizable) | |
26 | * row and column titles | |
27 | * multiple data sources ((Tcl array || Tcl command) &| internal caching) | |
28 | * supports standard Tk reliefs, fonts, colors, etc. | |
29 | * x/y scrollbar support | |
30 | * 'tag' styles per row, column or cell to change visual appearance | |
31 | * in-cell editing - returns value back to data source | |
32 | * support for disabled (read-only) tables or cells (via tags) | |
33 | * multiple selection modes, with "active" cell | |
34 | * multiple drawing modes to get optimal performance for larger tables | |
35 | * optional 'flashes' when things update | |
36 | * cell validation support | |
37 | * Works everywhere Tk does (including Windows and Mac!) | |
38 | * Unicode support (Tk8.1+) | |
39 | ||
40 | %package devel | |
41 | Summary: TkTable - development files | |
42 | Group: Development/Languages/Tcl | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: tk-devel >= %{tkver} | |
45 | ||
46 | %description devel | |
47 | TkTable development files. | |
48 | ||
49 | %package demo | |
50 | Summary: TkTable - demo programs | |
51 | Group: Development/Languages/Tcl | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description demo | |
55 | TkTable demo programs. | |
56 | ||
57 | %prep | |
58 | %setup -q -n %{name}%{version} | |
59 | %patch0 -p1 | |
60 | ||
61 | %build | |
62 | %{__autoconf} | |
63 | %configure | |
64 | ||
65 | %{__make} | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_mandir},%{_ulibdir}} | |
70 | ||
71 | %{__make} install \ | |
72 | DESTDIR=$RPM_BUILD_ROOT | |
73 | ||
74 | rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}%{version}/html | |
75 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}%{version}/*.txt | |
76 | ||
77 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}%{version}/lib%{name}%{version}.so $RPM_BUILD_ROOT%{_libdir} | |
78 | ||
79 | %if "%{_libdir}" != "%{_ulibdir}" | |
80 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}%{version} $RPM_BUILD_ROOT%{_ulibdir} | |
81 | ln -sf %{_libdir}/lib%{name}%{version}.so $RPM_BUILD_ROOT%{_ulibdir}/lib%{name}%{version}.so | |
82 | %endif | |
83 | ||
84 | ln -sf %{_libdir}/lib%{name}%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so | |
85 | ||
86 | install -d $RPM_BUILD_ROOT%{_mandir}/mann | |
87 | install doc/*.n $RPM_BUILD_ROOT%{_mandir}/mann | |
88 | ||
89 | install generic/tkTable.h $RPM_BUILD_ROOT%{_includedir} | |
90 | ||
91 | cp -a demos $RPM_BUILD_ROOT%{_ulibdir}/%{name}%{version} | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post -p /sbin/ldconfig | |
97 | %postun -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc README.txt README.blt TODO.txt UPGRADING.txt license.txt | |
102 | %attr(755,root,root) %{_libdir}/lib%{name}%{version}.so | |
103 | %dir %{_ulibdir}/%{name}%{version} | |
104 | %{_ulibdir}/%{name}%{version}/*.tcl | |
105 | %if "%{_libdir}" != "%{_ulibdir}" | |
106 | %{_ulibdir}/lib*%{version}.so | |
107 | %endif | |
108 | %{_mandir}/mann/* | |
109 | ||
110 | %files devel | |
111 | %defattr(644,root,root,755) | |
112 | %{_libdir}/lib%{name}.so | |
113 | %{_includedir}/* | |
114 | ||
115 | %files demo | |
116 | %defattr(644,root,root,755) | |
117 | %{_ulibdir}/%{name}%{version}/demos |