]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
3691db8b8f93c4e8efaa6fcc8e98f8f32916df5f
[packages/opensc.git] / opensc.spec
1 #
2 # Conditional build:
3 %bcond_without  openct  # use PCSC directly, without OpenCT support
4 #
5 Summary:        OpenSC library - for accessing SmartCard devices using PC/SC Lite
6 Summary(pl.UTF-8):      Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
7 Name:           opensc
8 Version:        0.12.0
9 Release:        1
10 Epoch:          0
11 License:        LGPL v2.1+
12 Group:          Applications
13 Source0:        http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
14 # Source0-md5:  630fa3b8717d22a1d069d120153a0c52
15 Source1:        %{name}-initramfs-hook
16 Source2:        %{name}-initramfs-local-bottom
17 Source3:        %{name}-initramfs-local-top
18 Source4:        %{name}-initramfs-README
19 URL:            http://www.opensc-project.org/
20 BuildRequires:  autoconf >= 2.60
21 BuildRequires:  automake >= 1:1.10
22 BuildRequires:  docbook-style-xsl
23 BuildRequires:  libltdl-devel
24 BuildRequires:  libtool >= 1:1.4.2-9
25 BuildRequires:  libxslt-progs
26 %{?with_openct:BuildRequires:   openct-devel}
27 BuildRequires:  openldap-devel >= 2.4.6
28 BuildRequires:  openssl-devel >= 0.9.7d
29 %{!?with_openct:BuildRequires:  pcsc-lite-devel >= 1.6.0}
30 BuildRequires:  pkgconfig >= 1:0.9.0
31 BuildRequires:  readline-devel
32 BuildRequires:  rpmbuild(macros) >= 1.364
33 BuildRequires:  zlib-devel
34 %{!?with_openct:Requires:       pcsc-lite-libs >= 1.6.0}
35 Obsoletes:      browser-plugin-opensc
36 Obsoletes:      mozilla-plugin-opensc
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # datadir is used for config files and (editable) profiles
40 %define         _datadir        /etc
41 %define         _sysconfdir     /etc/opensc
42
43 %description
44 libopensc is a library for accessing SmartCard devices using PC/SC
45 Lite middleware package. It is also the core library of the OpenSC
46 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
47 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
48 using private keys on the SmartCard is at the moment possible only
49 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
50 IDentity) card manufactured by Setec.
51
52 %description -l pl.UTF-8
53 libopensc to biblioteka do korzystania z kart procesorowych przy
54 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
55 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
56 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
57 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
58 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
59 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
60 IDentity) produkowanych przez Setec.
61
62 %package devel
63 Summary:        OpenSC development files
64 Summary(pl.UTF-8):      Pliki dla programistów używających OpenSC
65 Group:          Development/Tools
66 Requires:       %{name} = %{epoch}:%{version}-%{release}
67 Requires:       libltdl-devel
68 %{?with_openct:Requires:        openct-devel}
69 Requires:       openssl-devel
70 %{!?with_openct:Requires:       pcsc-lite-devel >= 1.6.0}
71
72 %description devel
73 OpenSC development files.
74
75 %description devel -l pl.UTF-8
76 Pliki dla programistów używających OpenSC.
77
78 %package static
79 Summary:        Static OpenSC library
80 Summary(pl.UTF-8):      Bibloteka statyczna OpenSC
81 Group:          Development/Tools
82 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
83
84 %description static
85 Static OpenSC library.
86
87 %description static -l pl.UTF-8
88 Biblioteka statyczna OpenSC.
89
90 %package initramfs
91 Summary:        OpenSC support scripts for initramfs-tools
92 Summary(pl.UTF-8):      Skrypty dla initramfs-tools ze wsparciem dla OpenSC
93 Group:          Base
94 Requires:       %{name} = %{version}-%{release}
95 Requires:       initramfs-tools
96
97 %description initramfs
98 OpenSC support scripts for initramfs-tools.
99
100 %description initramfs -l pl.UTF-8
101 Skrypty dla initramfs-tools ze wsparciem dla OpenSC.
102
103 %prep
104 %setup -q
105
106 install %{SOURCE4} README.initramfs
107
108 %build
109 %{__libtoolize}
110 %{__aclocal} -I m4
111 %{__autoconf}
112 %{__autoheader}
113 %{__automake}
114 %configure \
115         %{?with_openct:--enable-openct --disable-pcsc} \
116         %{!?with_openct:--enable-pcsc --disable-openct} \
117         --enable-doc \
118         --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
119
120 %{__make}
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}}
125
126 %{__make} install \
127         DESTDIR=$RPM_BUILD_ROOT
128
129 # default config
130 #install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
131
132 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc
133 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc
134 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc
135
136 # not needed (dlopened by soname)
137 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %post   -p /sbin/ldconfig
143 %postun -p /sbin/ldconfig
144
145 %files
146 %defattr(644,root,root,755)
147 %doc ChangeLog NEWS README doc/html.out/tools.html
148 %attr(755,root,root) %{_bindir}/cardos-tool
149 %attr(755,root,root) %{_bindir}/cryptoflex-tool
150 %attr(755,root,root) %{_bindir}/eidenv
151 %attr(755,root,root) %{_bindir}/netkey-tool
152 %attr(755,root,root) %{_bindir}/opensc-explorer
153 %attr(755,root,root) %{_bindir}/opensc-tool
154 %attr(755,root,root) %{_bindir}/piv-tool
155 %attr(755,root,root) %{_bindir}/pkcs11-tool
156 %attr(755,root,root) %{_bindir}/pkcs15-crypt
157 %attr(755,root,root) %{_bindir}/pkcs15-init
158 %attr(755,root,root) %{_bindir}/pkcs15-tool
159 %attr(755,root,root) %{_bindir}/rutoken-tool
160 %attr(755,root,root) %{_bindir}/westcos-tool
161 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.3
163 # PKCS11 modules
164 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
165 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
166 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
167 %dir %{_libdir}/pkcs11
168 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
169 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
170 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
171 %dir %{_datadir}/opensc
172 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
173 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
174 %{_mandir}/man1/cardos-tool.1*
175 %{_mandir}/man1/cryptoflex-tool.1*
176 %{_mandir}/man1/netkey-tool.1*
177 %{_mandir}/man1/opensc-explorer.1*
178 %{_mandir}/man1/opensc-tool.1*
179 %{_mandir}/man1/pkcs11-tool.1*
180 %{_mandir}/man1/pkcs15-crypt.1*
181 %{_mandir}/man1/pkcs15-init.1*
182 %{_mandir}/man1/pkcs15-tool.1*
183 %{_mandir}/man1/westcos-tool.1*
184 %{_mandir}/man5/pkcs15-profile.5*
185
186 %files devel
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/libopensc.so
189 %{_libdir}/libopensc.la
190
191 %files static
192 %defattr(644,root,root,755)
193 %{_libdir}/libopensc.a
194
195 %files initramfs
196 %defattr(644,root,root,755)
197 %doc README.initramfs
198 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/opensc
199 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/opensc
200 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-bottom/opensc
This page took 0.052356 seconds and 2 git commands to generate.