Blame SPECS/coolkey.spec

78b7b2
# BEGIN COPYRIGHT BLOCK
78b7b2
# Copyright (C) 2005 Red Hat, Inc.
78b7b2
# All rights reserved.
78b7b2
#
78b7b2
# This library is free software; you can redistribute it and/or
78b7b2
# modify it under the terms of the GNU Lesser General Public
78b7b2
# License as published by the Free Software Foundation version
78b7b2
# 2.1 of the License.
78b7b2
#
78b7b2
# This library is distributed in the hope that it will be useful,
78b7b2
# but WITHOUT ANY WARRANTY; without even the implied warranty of
78b7b2
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
78b7b2
# Lesser General Public License for more details.
78b7b2
#
78b7b2
# You should have received a copy of the GNU Lesser General Public
78b7b2
# License along with this library; if not, write to the Free Software
78b7b2
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
78b7b2
# END COPYRIGHT BLOCK
78b7b2
78b7b2
%define coolkey_module "CoolKey PKCS #11 Module"
78b7b2
%define nssdb %{_sysconfdir}/pki/nssdb
78b7b2
78b7b2
Name: coolkey
78b7b2
Version: 1.1.0
78b7b2
Release: 25%{?dist}
78b7b2
Summary: CoolKey PKCS #11 module
78b7b2
License: LGPLv2
78b7b2
URL: http://directory.fedora.redhat.com/wiki/CoolKey
78b7b2
Source: coolkey-%{version}.tar.gz
78b7b2
Patch1: coolkey-cache-dir-move.patch
78b7b2
Patch2: coolkey-gcc43.patch
78b7b2
Patch3: coolkey-latest.patch
78b7b2
Patch4: coolkey-simple-bugs.patch
78b7b2
Patch5: coolkey-thread-fix.patch
78b7b2
Patch6: coolkey-cac.patch
78b7b2
Patch7: coolkey-cac-1.patch
78b7b2
Patch8: coolkey-pcsc-lite-fix.patch
78b7b2
Patch9: coolkey-fix-token-removal-failure.patch
78b7b2
Patch10: coolkey-piv-ecc-el7.patch
78b7b2
Group: System Environment/Libraries
78b7b2
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
78b7b2
BuildRequires: autoconf
78b7b2
BuildRequires: pcsc-lite-devel
78b7b2
BuildRequires: zlib-devel
78b7b2
BuildRequires: nss-devel
78b7b2
Requires: nss-tools
78b7b2
Requires: pcsc-lite 
78b7b2
Requires: pcsc-lite-libs
78b7b2
Requires: ccid
78b7b2
Provides: CoolKey Openkey
78b7b2
Obsoletes: CoolKey Openkey
78b7b2
# 390 does not have libusb or smartCards
78b7b2
ExcludeArch: s390 s390x
78b7b2
78b7b2
%description
78b7b2
Linux Driver support for the CoolKey and CAC products. 
78b7b2
78b7b2
%package devel
78b7b2
Summary: CoolKey Applet libraries
78b7b2
Group: System Environment/Libraries
78b7b2
78b7b2
%description devel
78b7b2
Linux Driver support to access the CoolKey applet.
78b7b2
78b7b2
78b7b2
%prep
78b7b2
%setup -q
78b7b2
%patch1 -b .cache.dir.move
78b7b2
%patch2 -b .coolkey-gcc43
78b7b2
%patch3 -b .coolkey-latest
78b7b2
%patch4 -b .coolkey-simple-bugs
78b7b2
%patch5 -b .coolkey-thread-fix
78b7b2
%patch6 -b .cac
78b7b2
%patch7 -b .cac-1
78b7b2
%patch8 -b .reader-state-fix
78b7b2
%patch9 -p1 -b .fix-token-removal-failure
78b7b2
%patch10 -b .piv-ecc
78b7b2
78b7b2
%build
78b7b2
autoconf
78b7b2
%configure --with-debug --disable-dependency-tracking --enable-pk11install
78b7b2
make %{?_smp_mflags} CFLAGS="$CFLAGS -g -O2 -fno-strict-aliasing $CFLAGS " CXXFLAGS="$CXXFLAGS -g -O2 -fno-strict-aliasing $CFLAGS"
78b7b2
78b7b2
%install
78b7b2
rm -rf $RPM_BUILD_ROOT
78b7b2
make install DESTDIR=$RPM_BUILD_ROOT
78b7b2
ln -s pkcs11/libcoolkeypk11.so $RPM_BUILD_ROOT/%{_libdir}
78b7b2
mkdir -p $RPM_BUILD_ROOT/var/cache/coolkey
78b7b2
78b7b2
%clean
78b7b2
rm -rf $RPM_BUILD_ROOT
78b7b2
78b7b2
%post
78b7b2
/sbin/ldconfig
78b7b2
if [ -x %{_bindir}/pk11install ]; then
78b7b2
  isThere=`modutil -rawlist -dbdir dbm:%{nssdb} | grep %{coolkey_module} || echo NO`
78b7b2
  if [ "$isThere" == "NO" ]; then
78b7b2
      pk11install -l -p %{nssdb} 'name=%{coolkey_module} library=libcoolkeypk11.so' ||:
78b7b2
   fi
78b7b2
  isThere=`modutil -rawlist -dbdir sql:%{nssdb} | grep %{coolkey_module} || echo NO`
78b7b2
  if [ "$isThere" == "NO" ]; then
78b7b2
      pk11install -s -p %{nssdb} 'name=%{coolkey_module} library=libcoolkeypk11.so' ||:
78b7b2
   fi
78b7b2
fi
78b7b2
78b7b2
78b7b2
%postun
78b7b2
/sbin/ldconfig
78b7b2
if [ $1 -eq 0 ]; then
78b7b2
   modutil -delete %{coolkey_module} -dbdir dbm:%{nssdb} -force || :
78b7b2
   modutil -delete %{coolkey_module} -dbdir sql:%{nssdb} -force || :
78b7b2
fi
78b7b2
78b7b2
78b7b2
%files
78b7b2
%defattr(-,root,root,-)
78b7b2
%doc ChangeLog LICENSE 
78b7b2
%{_bindir}/pk11install
78b7b2
%{_libdir}/libcoolkeypk11.so
78b7b2
%{_libdir}/pkcs11
78b7b2
%{_libdir}/libckyapplet.so.1
78b7b2
%{_libdir}/libckyapplet.so.1.0.0
78b7b2
78b7b2
%files devel
78b7b2
%{_libdir}/libckyapplet.so
78b7b2
%{_libdir}/pkgconfig/libckyapplet.pc
78b7b2
%{_includedir}/*.h
78b7b2
78b7b2
78b7b2
%changelog
78b7b2
* Wed Nov 6 2013 Robert Relyea <rrelyea@redhat.com> - 1.1.0-25
78b7b2
- delete coolkey from sql db as well as the old one.
78b7b2
78b7b2
* Sun Sep 8 2013 Robert Relyea <rrelyea@redhat.com> - 1.1.0-24
78b7b2
- Add ECC and PIV support
78b7b2
78b7b2
* Wed May 22 2013 Ray Strode <rstrode@redhat.com> 1.1.0-23
78b7b2
- Fix token removal issue
78b7b2
78b7b2
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-22
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
78b7b2
78b7b2
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-21
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
78b7b2
78b7b2
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-20
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
78b7b2
78b7b2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-19
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
78b7b2
78b7b2
* Tue Oct 19 2010 Ville Skyttä <ville.skytta@iki.fi> - 1.1.0-18
78b7b2
- Own the %%{_libdir}/pkcs11 dir.
78b7b2
78b7b2
* Wed Sep 8 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-17
78b7b2
- pscs-lite removed SCARD_READERSTATE_A definition. revert to the prefered
78b7b2
  SCARD_READERSTATE
78b7b2
78b7b2
* Wed Jun 23 2010 Jack Magne <jmagne@redhat.com> - 1.1.0-16
78b7b2
- fix possible crash when loading cac certs.
78b7b2
78b7b2
* Wed Jun 16 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-15
78b7b2
- better cac support.
78b7b2
78b7b2
* Mon Feb 22 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-14
78b7b2
- remove dependency on ifd-egate
78b7b2
78b7b2
* Tue Jan 5 2010 Robert Relyea <rrelyea@redhat.com> - 1.1.0-13
78b7b2
- bump the release number to rebuild
78b7b2
78b7b2
* Wed Dec 18 2009 Robert Relyea <rrelyea@redhat.com> - 1.1.0-12
78b7b2
- Fix threading issue. Coolkey will now work with non-threaded applications 
78b7b2
- that don't link with libpthread.
78b7b2
78b7b2
* Wed Sep 16 2009 Jack magne <jmagne@redhat.com> - 1.1.0-11
78b7b2
- Misc bug fixes. Resolves: 485032, #250738, #497758.
78b7b2
78b7b2
* Fri Sep 11 2009 Jack Magne <jmagne@redhat.com> - 1.1.0-10
78b7b2
- Include latest changes for Gemalto 64K and Safenet 330J.
78b7b2
78b7b2
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-9
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
78b7b2
78b7b2
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-8
78b7b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
78b7b2
78b7b2
* Sun Sep 14 2008 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-7
78b7b2
- BR: nss-devel not mozilla-nss-devel (FTBFS BZ#440753)
78b7b2
78b7b2
* Wed Feb 13 2008 Jack magne <jmagne@redhat.com>  - 1.1.0-6
78b7b2
- Clean up building with gcc 4.3.
78b7b2
* Thu Sep 27 2007 Jack Magne <jmagne@redhat.com>  - 1.1.0-5
78b7b2
- Include patch for moving the cache directory to a safe location. 
78b7b2
- Bug #299481.
78b7b2
* Fri Aug 20 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-4
78b7b2
- Update License description to the new Fedora standard
78b7b2
78b7b2
* Thu Jun 21 2007 Kai Engert <kengert@redhat.com> - 1.1.0-3.1
78b7b2
- rebuild
78b7b2
78b7b2
* Tue Jun 5 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-3
78b7b2
- add build requires, bump version number for make tag.
78b7b2
78b7b2
* Thu May 31 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-2
78b7b2
- Back out RHEL-4 version of spec from CVS, add pcsc-lite-lib requires.
78b7b2
78b7b2
* Tue Feb 20 2007 Bob Relyea <rrelyea@redhat.com> - 1.1.0-1
78b7b2
- Pick up lates release.
78b7b2
78b7b2
* Wed Nov 1 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-15
78b7b2
- Don't grab the CUID on cac's. Resting the card causes it to
78b7b2
- logout of other applications.
78b7b2
78b7b2
* Wed Nov 1 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-14
78b7b2
- Shared memory directory needs to be writeable by all so
78b7b2
- coolkey can create caches for any user. (lack of caches
78b7b2
- show up in screen savers reactly slowly).
78b7b2
78b7b2
* Fri Oct 20 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-13
78b7b2
- fix login hw race failures
78b7b2
78b7b2
* Fri Oct 20 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-12
78b7b2
- add the dist flag
78b7b2
78b7b2
* Wed Oct 18 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-11
78b7b2
- CAC cards sometimes need to reset before they can get their
78b7b2
- initial transaction (problem is noticed on insertion an removal)
78b7b2
78b7b2
* Tue Oct 17 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-10
78b7b2
- Only run pk11install if the binary is there (multilib fun)
78b7b2
78b7b2
* Mon Oct 09 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-9
78b7b2
- use pk11install which does not require loading the module to install it.
78b7b2
78b7b2
* Mon Oct 09 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-8
78b7b2
- pcscd must be running in order to add coolkey.
78b7b2
78b7b2
* Thu Oct 4 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-7
78b7b2
- silence modutil warnings
78b7b2
78b7b2
* Thu Sep 30 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-5
78b7b2
- install and uninstall coolkey in the system secmod.db
78b7b2
78b7b2
* Thu Sep 7 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-4
78b7b2
- make the coolkey token caches persist over application calls.
78b7b2
- make a separate cache for each user.
78b7b2
78b7b2
* Sun Jul 16 2006 Florian La Roche <laroche@redhat.com> - 1.0.1-2
78b7b2
- fix excludearch line
78b7b2
78b7b2
* Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.1-1
78b7b2
- Don't require pthread library in coolkey
78b7b2
78b7b2
* Mon Jul 10 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.0-2
78b7b2
- remove s390 from the build
78b7b2
78b7b2
* Mon Jun 5 2006 Bob Relyea <rrelyea@redhat.com> - 1.0.0-1
78b7b2
- Initial revision for fedora