- rel 6
[packages/ca-certificates.git] / ca-certificates.spec
CommitLineData
8b300985
JR
1# TODO
2# - cleanup dead links from /etc/openssl/certs after -update uninstall
8bb152c1 3Summary: Common CA Certificates PEM files
500a6231 4Summary(pl.UTF-8): Pliki PEM popularnych certyfikatów CA
8bb152c1 5Name: ca-certificates
156426d3 6Version: 20090814
835b9580 7Release: 6
ed111db5 8License: distributable
8bb152c1 9Group: Libraries
8bb152c1 10Source0: ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz
156426d3 11# Source0-md5: 307052c985bec7f9a00eb84293eef779
6c894e75 12Source1: https://www.verisign.com/support/thawte-roots.zip
156426d3 13# Source1-md5: 3e50e5facce6b6bfbf68271d066005fa
ed111db5
JR
14Source2: http://www.certum.pl/keys/CA.pem
15# Source2-md5: 35610177afc9c64e70f1ce62c1885496
16Source3: http://www.certum.pl/keys/level1.pem
17# Source3-md5: ba2d2e234ef9cfd2e6e5f810c964862e
18Source4: http://www.certum.pl/keys/level2.pem
19# Source4-md5: d06578a04e8cb23071f3870430ea0cf0
20Source5: http://www.certum.pl/keys/level3.pem
21# Source5-md5: 47b67c63a52236576fc0d1150327c962
22Source6: http://www.certum.pl/keys/level4.pem
23# Source6-md5: f1f8a65d177745311a1e99f029ae5d71
24Source7: http://www.certum.pl/keys/vs.pem
25# Source7-md5: 8da19ffc48c5dcc2868b1aa55f1d5983
26Source8: http://www.certum.pl/keys/na.pem
27# Source8-md5: ba571cb35e7672ff7ae95132ac1bfec4
28Source9: http://www.certum.pl/keys/tsa.pem
29# Source9-md5: 1a7b3faf8ed00f4d80297de74862e102
30Source10: http://www.certum.pl/keys/class1.pem
31# Source10-md5: 058436b132ea2df6972821f546104a16
32Source11: http://www.certum.pl/keys/class2.pem
33# Source11-md5: 5caf7fe99b1fc6e63c40b3d081711d1b
34Source12: http://www.certum.pl/keys/class3.pem
35# Source12-md5: 07bc97e21da092ba53535c7379e1b58b
36Source13: http://www.certum.pl/keys/class4.pem
37# Source13-md5: 99ef61d509539af89f1c025b67245965
835b9580
JR
38Source14: http://crt.tcs.terena.org/TERENASSLCA.crt
39# Source14-md5: f62cd1546a8ef14e31ba1ce8eecd234a
40Source15: http://crt.tcs.terena.org/TERENAeScienceSSLCA.crt
41# Source15-md5: 5feea35ab01a373f115219706f1f57bd
42Source16: http://crt.tcs.terena.org/TERENAPersonalCA.crt
43# Source16-md5: 53eaa497c8fb0b79f14fe9f69693689a
44Source17: http://crt.tcs.terena.org/TERENAeSciencePersonalCA.crt
45# Source17-md5: e25cc655d3ebe920ca9c187e3dde9191
46Source18: http://crt.tcs.terena.org/TERENACodeSigningCA.crt
47# Source18-md5: 74c9f511ab03a4e6b7462e310abfa89b
4619b3d9 48Patch0: %{name}-undebianize.patch
ed111db5 49Patch1: %{name}-more-certs.patch
c7360e68 50Patch2: %{name}-etc-certs.patch
302ace1c 51Patch3: %{name}-c_rehash.sh.patch
55905e01 52Patch4: %{name}-endline.patch
835b9580 53Patch5: %{name}-mozilla.patch
500a6231 54URL: http://www.cacert.org/
835b9580 55BuildRequires: openssl-tools
156426d3 56BuildRequires: python
65bcbc85 57BuildRequires: python-modules
55905e01 58BuildRequires: sed >= 4.0
ed111db5 59BuildRequires: unzip
ed111db5 60Obsoletes: certificates
5352fc69 61BuildArch: noarch
8bb152c1
ER
62BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
850133d0
ER
64%define certsdir /etc/certs
65
8bb152c1 66%description
500a6231
JB
67Common CA Certificates PEM files.
68
69%description -l pl.UTF-8
70Pliki PEM popularnych certyfikatów CA.
8bb152c1 71
302ace1c
JR
72%package update
73Summary: Script for updating CA Certificates database
74Summary(pl.UTF-8): Skrypt do odświeżania bazy certyfikatów CA
75Group: Libraries
6c894e75 76Requires: %{name} = %{version}-%{release}
74154eae 77Requires: mktemp
302ace1c
JR
78Requires: openssl-tools >= 0.9.8i-3
79
80%description update
81Script and data for updating CA Certificates database.
82
6c894e75 83%description update -l pl.UTF-8
302ace1c
JR
84Skrypt i dane do odświeżania bazy certyfikatów CA.
85
8bb152c1 86%prep
156426d3 87%setup -q
ed111db5
JR
88%patch0 -p1
89%patch1 -p1
c7360e68 90%patch2 -p1
302ace1c 91%patch3 -p1
55905e01 92%patch4 -p1
835b9580 93%patch5 -p1
ed111db5 94
156426d3
JR
95%{__unzip} -qq %{SOURCE1} -d thawte
96# resolve file name clash
97mv 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA.pem' \
98 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA_CC.pem'
99
100find thawte/ -name *.pem | while read f ; do
101 ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g')
55905e01 102 cp "$f" "thawte/$(basename "$ff" .pem).crt"
ed111db5
JR
103done
104
105install -d certum
106install %{SOURCE2} certum
107install %{SOURCE3} certum
108install %{SOURCE4} certum
109install %{SOURCE5} certum
110install %{SOURCE6} certum
111install %{SOURCE7} certum
112install %{SOURCE8} certum
113install %{SOURCE9} certum
114install %{SOURCE10} certum
115install %{SOURCE11} certum
116install %{SOURCE12} certum
117install %{SOURCE13} certum
ebf0e82f
ER
118for a in certum/*.pem; do
119 mv "$a" "${a%.pem}.crt"
ed111db5
JR
120done
121
835b9580
JR
122install -d terena
123openssl x509 -inform DER -in %{SOURCE14} -outform PEM -out terena/$(basename %{SOURCE14})
124openssl x509 -inform DER -in %{SOURCE15} -outform PEM -out terena/$(basename %{SOURCE15})
125openssl x509 -inform DER -in %{SOURCE16} -outform PEM -out terena/$(basename %{SOURCE16})
126openssl x509 -inform DER -in %{SOURCE17} -outform PEM -out terena/$(basename %{SOURCE17})
127openssl x509 -inform DER -in %{SOURCE18} -outform PEM -out terena/$(basename %{SOURCE18})
128
ed111db5
JR
129%build
130%{__make}
131
132# We have those and more in specific dirs
835b9580 133rm mozilla/{Thawte,thawte,Certum,IGC_A,Deutsche_Telekom_Root_CA_2}*.crt
8bb152c1
ER
134
135%install
136rm -rf $RPM_BUILD_ROOT
850133d0 137install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
8bb152c1
ER
138
139%{__make} install \
140 DESTDIR=$RPM_BUILD_ROOT
141
55905e01
JR
142find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' -exec sed -i -e 's/\r$//' {} \;
143
8bb152c1
ER
144(
145cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
146find . -name '*.crt' | sort | cut -b3-
147) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
148
408dc510
JR
149find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' | while read cert ; do
150 cat "$cert" >> $RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
151 echo >>$RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
152done
8bb152c1
ER
153
154%clean
155rm -rf $RPM_BUILD_ROOT
156
302ace1c 157%post update
ed9496cb 158%{_sbindir}/update-ca-certificates --fresh || :
8bb152c1
ER
159
160%files
161%defattr(644,root,root,755)
850133d0 162%config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt
302ace1c
JR
163
164%files update
165%defattr(644,root,root,755)
8bb152c1 166%attr(755,root,root) %{_sbindir}/update-ca-certificates
302ace1c 167%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
8bb152c1 168%{_datadir}/ca-certificates
This page took 0.174586 seconds and 4 git commands to generate.