]>
Commit | Line | Data |
---|---|---|
a6e702e8 | 1 | # TODO: move hotplug and udev stuff to subpackages? |
de6d008b | 2 | Summary: OpenCT library - library for accessing smart card terminals |
0e35976a | 3 | Summary(pl.UTF-8): OpenCT - biblioteka dostępu do terminali kart procesorowych |
de6d008b | 4 | Name: openct |
ee3a5999 | 5 | Version: 0.6.14 |
03b7c63f | 6 | Release: 3 |
ee3a5999 | 7 | License: LGPL v2.1+ |
de6d008b | 8 | Group: Applications |
666ad101 | 9 | Source0: http://www.opensc-project.org/files/openct/%{name}-%{version}.tar.gz |
ee3a5999 | 10 | # Source0-md5: 04a5c0c7dedcb1ca0d550b1970fbf3b7 |
7b653b6d | 11 | Source1: %{name}.init |
666ad101 | 12 | URL: http://www.opensc-project.org/openct/ |
6e2a3bd6 | 13 | BuildRequires: autoconf >= 2.52 |
de6d008b | 14 | BuildRequires: automake |
8d7a69f6 | 15 | BuildRequires: libltdl-devel |
d288c1c9 | 16 | BuildRequires: libtool |
de6d008b AF |
17 | BuildRequires: libusb-devel |
18 | BuildRequires: pcsc-lite-devel | |
4556ff6a | 19 | BuildRequires: pkgconfig >= 1:0.9.0 |
7b653b6d | 20 | Requires(post,preun): /sbin/chkconfig |
cda08749 | 21 | Requires: %{name}-libs = %{version}-%{release} |
de6d008b AF |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
1dcb98ea JB |
25 | OpenCT is a library for accessing smart card terminals. It provides a |
26 | rich set of functions for driver writers, protocol drivers for T=0 and | |
27 | T=1, serial and USB functionality, including USB hotplugging. | |
28 | ||
3c69b6aa JR |
29 | %description -l pl.UTF-8 |
30 | OpenCT to biblioteka służąca do dostępu do terminali kart | |
31 | procesorowych (smart card). Dostarcza bogaty zbiór funkcji dla | |
32 | piszących sterowniki, sterowniki protokołów dla T=0 i T=1, | |
33 | funkcjonalność dla portów szeregowych i USB, włącznie z podłączaniem | |
34 | urządzeń USB w locie (hotplug). | |
de6d008b | 35 | |
1d9b4a6a JB |
36 | %package -n pcsc-driver-openct |
37 | Summary: OpenCT driver for PC/SC | |
0e35976a | 38 | Summary(pl.UTF-8): Sterownik OpenCT dla PC/SC |
1d9b4a6a JB |
39 | Group: Libraries |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: pcsc-lite | |
42 | ||
43 | %description -n pcsc-driver-openct | |
44 | OpenCT driver for PC/SC. | |
45 | ||
3c69b6aa | 46 | %description -n pcsc-driver-openct -l pl.UTF-8 |
1d9b4a6a JB |
47 | Sterownik OpenCT dla PC/SC. |
48 | ||
cda08749 | 49 | %package libs |
50 | Summary: OpenCT library | |
0e35976a | 51 | Summary(pl.UTF-8): Biblioteka OpenCT |
df918352 | 52 | License: BSD (libopenct), LGPL (the rest) |
cda08749 | 53 | Group: Libraries |
841493e1 | 54 | Conflicts: openct < 0.6.2-3 |
cda08749 | 55 | |
56 | %description libs | |
57 | OpenCT library. | |
58 | ||
3c69b6aa | 59 | %description libs -l pl.UTF-8 |
cda08749 | 60 | Biblioteka OpenCT. |
61 | ||
de6d008b AF |
62 | %package devel |
63 | Summary: OpenCT development files | |
0e35976a | 64 | Summary(pl.UTF-8): Pliki dla programistów używających OpenCT |
df918352 | 65 | License: BSD |
1dcb98ea | 66 | Group: Development/Libraries |
cda08749 | 67 | Requires: %{name}-libs = %{version}-%{release} |
de6d008b AF |
68 | |
69 | %description devel | |
70 | OpenSC development files. | |
71 | ||
3c69b6aa JR |
72 | %description devel -l pl.UTF-8 |
73 | Pliki dla programistów używających OpenCT. | |
de6d008b AF |
74 | |
75 | %package static | |
76 | Summary: Static OpenCT libraries | |
0e35976a | 77 | Summary(pl.UTF-8): Bibloteki statyczne OpenCT |
df918352 | 78 | License: BSD |
1dcb98ea | 79 | Group: Development/Libraries |
a9278f67 | 80 | Requires: %{name}-devel = %{version}-%{release} |
de6d008b AF |
81 | |
82 | %description static | |
83 | Static OpenCT libraries. | |
84 | ||
3c69b6aa | 85 | %description static -l pl.UTF-8 |
de6d008b AF |
86 | Statyczne biblioteki OpenCT. |
87 | ||
88 | %prep | |
89 | %setup -q | |
90 | ||
91 | %build | |
c4c47e98 | 92 | touch config.rpath |
d288c1c9 | 93 | %{__libtoolize} |
df918352 | 94 | %{__aclocal} -I aclocal |
d288c1c9 | 95 | %{__autoconf} |
96 | %{__autoheader} | |
97 | %{__automake} | |
17189c1e | 98 | CFLAGS="%{rpmcflags} -D_GNU_SOURCE=1" |
1d9b4a6a | 99 | %configure \ |
99aedd22 | 100 | --disable-rpath \ |
1d9b4a6a | 101 | --with-bundle-dir=%{_libdir}/pcsc/drivers |
de6d008b AF |
102 | %{__make} |
103 | ||
104 | %install | |
105 | rm -rf $RPM_BUILD_ROOT | |
a6e702e8 | 106 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/hotplug/usb,/lib/udev,/var/run/openct} |
7b653b6d | 107 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
de6d008b AF |
108 | |
109 | %{__make} install \ | |
110 | DESTDIR=$RPM_BUILD_ROOT | |
111 | ||
1dcb98ea | 112 | install etc/openct.conf $RPM_BUILD_ROOT%{_sysconfdir} |
7b653b6d | 113 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openct |
1dcb98ea | 114 | |
6bd39254 | 115 | rm -f $RPM_BUILD_ROOT%{_libdir}/openct-*.{a,la} |
de6d008b AF |
116 | |
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
bf2e5bff | 120 | %post |
7b653b6d | 121 | /sbin/chkconfig --add openct |
122 | if [ -f /var/lock/subsys/openct ]; then | |
123 | /etc/rc.d/init.d/openct restart >&2 | |
124 | else | |
125 | echo "Run \"/etc/rc.d/init.d/openct start\" to start openct." | |
bf2e5bff | 126 | fi |
127 | ||
7b653b6d | 128 | %preun |
129 | if [ "$1" = "0" ]; then | |
130 | if [ -f /var/lock/subsys/openct ]; then | |
131 | /etc/rc.d/init.d/openct stop >&2 | |
132 | fi | |
133 | /sbin/chkconfig --del openct | |
134 | fi | |
cda08749 | 135 | |
136 | %post libs -p /sbin/ldconfig | |
137 | %postun libs -p /sbin/ldconfig | |
de6d008b AF |
138 | |
139 | %files | |
140 | %defattr(644,root,root,755) | |
df918352 | 141 | %doc NEWS TODO doc/ChangeLog doc/*.{html,css} |
de6d008b | 142 | %attr(755,root,root) %{_bindir}/openct-tool |
de6d008b | 143 | %attr(755,root,root) %{_sbindir}/ifdhandler |
1d9b4a6a | 144 | %attr(755,root,root) %{_sbindir}/ifdproxy |
de6d008b | 145 | %attr(755,root,root) %{_sbindir}/openct-control |
1d9b4a6a | 146 | %dir /var/run/openct |
841493e1 | 147 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openct.conf |
0a7a07de | 148 | %{_sysconfdir}/hotplug/usb/openct.usermap |
a6e702e8 | 149 | %attr(755,root,root) /lib/udev/openct_* |
7b653b6d | 150 | %attr(754,root,root) /etc/rc.d/init.d/openct |
2504adee | 151 | %{_mandir}/man1/openct-tool.1* |
de6d008b | 152 | |
1d9b4a6a JB |
153 | %files -n pcsc-driver-openct |
154 | %defattr(644,root,root,755) | |
155 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle | |
156 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents | |
157 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux | |
841493e1 | 158 | %attr(755,root,root) %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so |
1d9b4a6a JB |
159 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist |
160 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/PkgInfo | |
161 | ||
bf2477bb | 162 | %files libs |
163 | %defattr(644,root,root,755) | |
2504adee | 164 | %attr(755,root,root) %{_libdir}/libopenct.so.*.*.* |
bf2477bb | 165 | %attr(755,root,root) %{_libdir}/libopenctapi.so |
166 | %attr(755,root,root) %{_libdir}/openct-ifd.so | |
167 | ||
de6d008b AF |
168 | %files devel |
169 | %defattr(644,root,root,755) | |
2504adee | 170 | %doc doc/api/* |
1cf4ab81 | 171 | %attr(755,root,root) %{_libdir}/libopenct.so |
2504adee JB |
172 | %{_libdir}/libopenct.la |
173 | %{_libdir}/libopenctapi.la | |
de6d008b | 174 | %{_includedir}/openct |
2504adee | 175 | %{_pkgconfigdir}/libopenct.pc |
de6d008b AF |
176 | |
177 | %files static | |
178 | %defattr(644,root,root,755) | |
2504adee JB |
179 | %{_libdir}/libopenct.a |
180 | %{_libdir}/libopenctapi.a |