]>
Commit | Line | Data |
---|---|---|
6d48841e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without gtk # GTK+ 3 based GUI | |
4 | %bcond_without java # JNI bindings | |
5 | # | |
c93370dd JB |
6 | Summary: Software Token for Linux/UNIX |
7 | Summary(pl.UTF-8): Token programowy dla systemów Linux/UNIX | |
8 | Name: stoken | |
3ff208fb | 9 | Version: 0.92 |
6d48841e | 10 | Release: 1 |
c93370dd JB |
11 | License: LGPL v2.1+ |
12 | Group: Libraries | |
13 | Source0: http://downloads.sourceforge.net/stoken/%{name}-%{version}.tar.gz | |
3ff208fb | 14 | # Source0-md5: 2b6d30cf0dfd7311794a54376c958cbc |
6d48841e | 15 | Patch0: %{name}-sh.patch |
c93370dd | 16 | URL: http://stoken.sourceforge.net/ |
6d48841e JB |
17 | %{?with_java:BuildRequires: ant} |
18 | BuildRequires: autoconf >= 2.61 | |
19 | BuildRequires: automake >= 1:1.11 | |
20 | %{?with_gtk:BuildRequires: gtk+3-devel >= 3.0} | |
21 | %{?with_java:BuildRequires: jdk} | |
3ff208fb | 22 | BuildRequires: libtomcrypt-devel >= 1.18 |
6d48841e JB |
23 | BuildRequires: libtool >= 2:2 |
24 | BuildRequires: libxml2-devel >= 2 | |
c93370dd JB |
25 | BuildRequires: pkgconfig >= 1:0.27 |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | stoken is a tokencode generator compatible with RSA SecurID 128-bit | |
30 | (AES) tokens. It is a hobbyist project, not affiliated with or | |
31 | endorsed by RSA Security. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | stoken to generator kodów tokenów zgodnych z tokenami 128-bitowymi RSA | |
35 | SecurID (AES). Jest to projekt hobbistyczny, nie powiązany, ani nie | |
36 | gwarantowany przez RSA Security. | |
37 | ||
38 | %package gui | |
39 | Summary: Software Token GUI | |
40 | Summary(pl.UTF-8): Graficzny interfejs użytkownika do tokenów programowych | |
41 | Group: X11/Applications | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | ||
44 | %description gui | |
45 | Software Token GUI. | |
46 | ||
47 | %description gui -l pl.UTF-8 | |
48 | Graficzny interfejs użytkownika do tokenów programowych. | |
49 | ||
50 | %package devel | |
51 | Summary: Header files for stoken library | |
52 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki stoken | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
3ff208fb | 55 | Requires: libtomcrypt-devel >= 1.18 |
c93370dd JB |
56 | |
57 | %description devel | |
58 | Header files for stoken library. | |
59 | ||
60 | %description devel -l pl.UTF-8 | |
61 | Pliki nagłówkowe biblioteki stoken. | |
62 | ||
63 | %package static | |
64 | Summary: Static stoken library | |
65 | Summary(pl.UTF-8): Statyczna biblioteka stoken | |
66 | Group: Development/Libraries | |
67 | Requires: %{name}-devel = %{version}-%{release} | |
68 | ||
69 | %description static | |
70 | Static stoken library. | |
71 | ||
72 | %description static -l pl.UTF-8 | |
73 | Statyczna biblioteka stoken. | |
74 | ||
6d48841e JB |
75 | %package -n java-stoken |
76 | Summary: JNI interface for stoken library | |
77 | Summary(pl.UTF-8): Interfejs JNI do biblioteki stoken | |
78 | License: BSD | |
79 | Group: Libraries/Java | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | ||
82 | %description -n java-stoken | |
83 | JNI interface for stoken library. | |
84 | ||
85 | %description -n java-stoken -l pl.UTF-8 | |
86 | Interfejs JNI do biblioteki stoken. | |
87 | ||
c93370dd JB |
88 | %prep |
89 | %setup -q | |
6d48841e | 90 | %patch0 -p1 |
c93370dd JB |
91 | |
92 | %build | |
6d48841e JB |
93 | %{__libtoolize} |
94 | %{__aclocal} -I m4 | |
95 | %{__autoconf} | |
96 | %{__autoheader} | |
97 | %{__automake} | |
98 | %configure \ | |
99 | --disable-silent-rules \ | |
100 | %{!?with_gtk:--without-gtk} \ | |
101 | %{?with_java:--with-java} | |
c93370dd JB |
102 | |
103 | %{__make} | |
104 | ||
6d48841e JB |
105 | %if %{with java} |
106 | cd java | |
107 | install -d dist | |
108 | %ant | |
109 | %endif | |
110 | ||
c93370dd JB |
111 | %install |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %{__make} install \ | |
115 | DESTDIR=$RPM_BUILD_ROOT | |
116 | ||
117 | # obsoleted by pkg-config | |
118 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libstoken.la | |
119 | ||
6d48841e JB |
120 | %if %{with java} |
121 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libstoken-wrapper.{la,a} | |
122 | install -D java/dist/stoken-wrapper.jar $RPM_BUILD_ROOT%{_javadir}/stoken-wrapper.jar | |
123 | %endif | |
124 | ||
c93370dd JB |
125 | %clean |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %post -p /sbin/ldconfig | |
129 | %postun -p /sbin/ldconfig | |
130 | ||
6d48841e JB |
131 | %post -n java-stoken -p /sbin/ldconfig |
132 | %postun -n java-stoken -p /sbin/ldconfig | |
133 | ||
c93370dd JB |
134 | %files |
135 | %defattr(644,root,root,755) | |
6d48841e | 136 | %doc CHANGES README.md TODO |
c93370dd JB |
137 | %attr(755,root,root) %{_bindir}/stoken |
138 | %attr(755,root,root) %{_libdir}/libstoken.so.*.*.* | |
139 | %attr(755,root,root) %ghost %{_libdir}/libstoken.so.1 | |
140 | %{_mandir}/man1/stoken.1* | |
141 | ||
6d48841e | 142 | %if %{with gtk} |
c93370dd JB |
143 | %files gui |
144 | %defattr(644,root,root,755) | |
145 | %attr(755,root,root) %{_bindir}/stoken-gui | |
6d48841e | 146 | %{_datadir}/stoken |
c93370dd | 147 | %{_desktopdir}/stoken-gui.desktop |
6d48841e | 148 | %{_desktopdir}/stoken-gui-small.desktop |
c93370dd JB |
149 | %{_pixmapsdir}/stoken-gui.png |
150 | %{_mandir}/man1/stoken-gui.1* | |
6d48841e | 151 | %endif |
c93370dd JB |
152 | |
153 | %files devel | |
154 | %defattr(644,root,root,755) | |
155 | %attr(755,root,root) %{_libdir}/libstoken.so | |
156 | %{_includedir}/stoken.h | |
157 | %{_pkgconfigdir}/stoken.pc | |
158 | ||
159 | %files static | |
160 | %defattr(644,root,root,755) | |
161 | %{_libdir}/libstoken.a | |
6d48841e JB |
162 | |
163 | %if %{with java} | |
164 | %files -n java-stoken | |
165 | %defattr(644,root,root,755) | |
166 | %doc java/src/com/example/LibTest.java | |
167 | %attr(755,root,root) %{_libdir}/libstoken-wrapper.so.*.*.* | |
168 | %attr(755,root,root) %ghost %{_libdir}/libstoken-wrapper.so.0 | |
169 | %attr(755,root,root) %{_libdir}/libstoken-wrapper.so | |
170 | %{_javadir}/stoken-wrapper.jar | |
171 | %endif |