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