]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
4382bfb143714d4bf646e6f19a5c55331fd8b509
[packages/opensc.git] / opensc.spec
1 Summary:        OpenSC library - for accessing SmartCard devices using PC/SC Lite
2 Summary(pl):    Biblioteka OpenSC - do korzystania z kart procesorowych przy u¿yciu PC/SC Lite
3 Name:           opensc
4 Version:        0.9.6
5 Release:        3
6 Epoch:          0
7 License:        LGPL
8 Group:          Applications
9 Source0:        http://www.opensc.org/files/%{name}-%{version}.tar.gz
10 # Source0-md5:  38fdd64566cc6fc83338d659e816b4fb
11 Patch0:         %{name}-libdir.patch
12 Patch1:         %{name}-segv.patch
13 Patch2:         %{name}-explorer-debug.patch
14 Patch3:         %{name}-gcc4.patch
15 URL:            http://www.opensc.org/
16 BuildRequires:  autoconf >= 2.52
17 BuildRequires:  automake
18 BuildRequires:  libassuan-devel >= 1:0.6.0
19 BuildRequires:  libtool >= 1:1.4.2-9
20 BuildRequires:  openldap-devel
21 BuildRequires:  openssl-devel >= 0.9.7d
22 BuildRequires:  openct-devel
23 BuildRequires:  pam-devel
24 BuildRequires:  pcsc-lite-devel
25 BuildRequires:  pkgconfig >= 1:0.9.0
26 BuildRequires:  readline-devel
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 # datadir is used for config files and (editable) profiles
30 %define         _datadir        /etc
31 %define         _sysconfdir     /etc/opensc
32 %define         mozplugindir    /usr/%{_lib}/mozilla/plugins
33
34 %description
35 libopensc is a library for accessing SmartCard devices using PC/SC
36 Lite middleware package. It is also the core library of the OpenSC
37 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
38 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
39 using private keys on the SmartCard is at the moment possible only
40 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
41 IDentity) card manufactured by Setec.
42
43 %description -l pl
44 libopensc to biblioteka do korzystania z kart procesorowych przy
45 u¿yciu pakietu warstwy po¶redniej PC/SC Lite. Jest to tak¿e podstawowa
46 biblioteka projektu OpenSC. Podstawowa funkcjonalno¶æ (np. SELECT
47 FILE, READ BINARY) powinna dzia³aæ tak¿e z dowoln± kart± procesorow±
48 zgodn± z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy u¿yciu
49 prywatnych kluczy na karcie na razie jest mo¿liwe tylko przy u¿yciu
50 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
51 IDentity) produkowanych przez Setec.
52
53 %package devel
54 Summary:        OpenSC development files
55 Summary(pl):    Pliki dla programistów u¿ywaj±cych OpenSC
56 Group:          Development/Tools
57 Requires:       %{name} = %{epoch}:%{version}-%{release}
58 Requires:       openct-devel
59 Requires:       openssl-devel
60 Requires:       pcsc-lite-devel
61
62 %description devel
63 OpenSC development files.
64
65 %description devel -l pl
66 Pliki dla programistów u¿ywaj±cych OpenSC.
67
68 %package static
69 Summary:        Static OpenSC libraries
70 Summary(pl):    Bibloteki statyczne OpenSC
71 Group:          Development/Tools
72 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
73
74 %description static
75 Static OpenSC libraries.
76
77 %description static -l pl
78 Statyczne biblioteki OpenSC.
79
80 %package -n pam-pam_opensc
81 Summary:        OpenSC module for PAM
82 Summary(pl):    Modu³ PAM OpenSC
83 License:        GPL
84 Group:          Base
85 Requires:       %{name} = %{epoch}:%{version}-%{release}
86 Obsoletes:      pam_opensc
87
88 %description -n pam-pam_opensc
89 OpenSC module for PAM.
90
91 %description -n pam-pam_opensc -l pl
92 Modu³ PAM OpenSC.
93
94 %package -n mozilla-plugin-opensc
95 Summary:        OpenSC Signer plugin for Mozilla
96 Summary(pl):    Wtyczka OpenSC Signer dla Mozilli
97 Group:          X11/Applications
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99 Requires:       pinentry-gtk
100
101 %description -n mozilla-plugin-opensc
102 OpenSC Signer plugin for Mozilla.
103
104 %description -n mozilla-plugin-opensc -l pl
105 Wtyczka OpenSC Signer dla Mozilli.
106
107 %prep
108 %setup -q
109 %patch0 -p1
110 %patch1 -p1
111 %patch2 -p1
112 %patch3 -p1
113
114 %build
115 %{__libtoolize}
116 %{__aclocal}
117 %{__autoconf}
118 %{__autoheader}
119 %{__automake}
120 %configure \
121         --with-pin-entry=/usr/bin/pinentry-gtk \
122         --with-plugin-dir="%{mozplugindir}"
123
124 %{__make}
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT%{mozplugindir}
129
130 %{__make} install \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 install -d $RPM_BUILD_ROOT/%{_lib}
134 mv -f $RPM_BUILD_ROOT%{_libdir}/security $RPM_BUILD_ROOT/%{_lib}
135
136 # just install instead of symlinking
137 rm -f $RPM_BUILD_ROOT%{mozplugindir}/opensc-signer.so
138 mv -f $RPM_BUILD_ROOT%{_libdir}/opensc/opensc-signer.so $RPM_BUILD_ROOT%{mozplugindir}
139
140 # default config
141 install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
142 install etc/scldap.conf $RPM_BUILD_ROOT%{_sysconfdir}
143
144 # useless (dlopened by *.so)
145 rm -f $RPM_BUILD_ROOT%{_libdir}/{libscam,opensc-*}.{a,la} \
146         $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la} \
147         $RPM_BUILD_ROOT%{_libdir}/pkcs11/*.{a,la} \
148         $RPM_BUILD_ROOT/%{_lib}/security/pam_opensc.{a,la}
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %post   -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
155
156 %files
157 %defattr(644,root,root,755)
158 %doc ANNOUNCE ChangeLog NEWS docs/{pkcs-15v1_1.asn,opensc.{html,css}}
159 %attr(755,root,root) %{_bindir}/cardos-info
160 %attr(755,root,root) %{_bindir}/cryptoflex-tool
161 %attr(755,root,root) %{_bindir}/opensc-explorer
162 %attr(755,root,root) %{_bindir}/opensc-tool
163 %attr(755,root,root) %{_bindir}/pkcs11-tool
164 %attr(755,root,root) %{_bindir}/pkcs15-*
165 %attr(755,root,root) %{_libdir}/lib*.so.*.*
166 %attr(755,root,root) %{_libdir}/libscam.so
167 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
168 %dir %{_libdir}/pkcs11
169 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
170 %dir %{_libdir}/opensc
171 %attr(755,root,root) %{_libdir}/opensc/engine_opensc.so
172 %attr(755,root,root) %{_libdir}/opensc/engine_pkcs11.so
173 %dir %{_datadir}/opensc
174 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
175 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
176 %{_mandir}/man1/cardos-info.1*
177 %{_mandir}/man1/cryptoflex-tool.1*
178 %{_mandir}/man1/opensc-explorer.1*
179 %{_mandir}/man1/opensc-tool.1*
180 %{_mandir}/man1/pkcs11-tool.1*
181 %{_mandir}/man1/pkcs15-*.1*
182 %{_mandir}/man[57]/*
183
184 %files devel
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_bindir}/opensc-config
187 %attr(755,root,root) %{_libdir}/libopensc.so
188 %attr(755,root,root) %{_libdir}/libpkcs11.so
189 %attr(755,root,root) %{_libdir}/libpkcs15init.so
190 %attr(755,root,root) %{_libdir}/libscconf.so
191 %attr(755,root,root) %{_libdir}/libscldap.so
192 %{_libdir}/lib*.la
193 %{_includedir}/opensc
194 %{_pkgconfigdir}/*.pc
195 %{_mandir}/man1/opensc-config.1*
196 %{_mandir}/man3/*
197
198 %files static
199 %defattr(644,root,root,755)
200 %{_libdir}/lib*.a
201
202 %files -n pam-pam_opensc
203 %defattr(644,root,root,755)
204 %attr(755,root,root) /%{_lib}/security/pam_opensc.so
205
206 %files -n mozilla-plugin-opensc
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{mozplugindir}/opensc-signer.so
This page took 0.056127 seconds and 2 git commands to generate.