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