0474ac7f5344db908e81a109417f3da84e5867a4
[packages/ca-certificates.git] / ca-certificates.spec
1 # TODO
2 # - cleanup dead links from /etc/openssl/certs after -update uninstall
3 Summary:        Common CA Certificates PEM files
4 Summary(pl.UTF-8):      Pliki PEM popularnych certyfikatów CA
5 Name:           ca-certificates
6 Version:        20090814
7 Release:        1
8 License:        distributable
9 Group:          Libraries
10 Source0:        ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz
11 # Source0-md5:  307052c985bec7f9a00eb84293eef779
12 Source1:        https://www.verisign.com/support/thawte-roots.zip
13 # Source1-md5:  3e50e5facce6b6bfbf68271d066005fa
14 Source2:        http://www.certum.pl/keys/CA.pem
15 # Source2-md5:  35610177afc9c64e70f1ce62c1885496
16 Source3:        http://www.certum.pl/keys/level1.pem
17 # Source3-md5:  ba2d2e234ef9cfd2e6e5f810c964862e
18 Source4:        http://www.certum.pl/keys/level2.pem
19 # Source4-md5:  d06578a04e8cb23071f3870430ea0cf0
20 Source5:        http://www.certum.pl/keys/level3.pem
21 # Source5-md5:  47b67c63a52236576fc0d1150327c962
22 Source6:        http://www.certum.pl/keys/level4.pem
23 # Source6-md5:  f1f8a65d177745311a1e99f029ae5d71
24 Source7:        http://www.certum.pl/keys/vs.pem
25 # Source7-md5:  8da19ffc48c5dcc2868b1aa55f1d5983
26 Source8:        http://www.certum.pl/keys/na.pem
27 # Source8-md5:  ba571cb35e7672ff7ae95132ac1bfec4
28 Source9:        http://www.certum.pl/keys/tsa.pem
29 # Source9-md5:  1a7b3faf8ed00f4d80297de74862e102
30 Source10:       http://www.certum.pl/keys/class1.pem
31 # Source10-md5: 058436b132ea2df6972821f546104a16
32 Source11:       http://www.certum.pl/keys/class2.pem
33 # Source11-md5: 5caf7fe99b1fc6e63c40b3d081711d1b
34 Source12:       http://www.certum.pl/keys/class3.pem
35 # Source12-md5: 07bc97e21da092ba53535c7379e1b58b
36 Source13:       http://www.certum.pl/keys/class4.pem
37 # Source13-md5: 99ef61d509539af89f1c025b67245965
38 Patch0:         %{name}-undebianize.patch
39 Patch1:         %{name}-more-certs.patch
40 Patch2:         %{name}-etc-certs.patch
41 Patch3:         %{name}-c_rehash.sh.patch
42 URL:            http://www.cacert.org/
43 BuildRequires:  coreutils
44 BuildRequires:  python
45 BuildRequires:  python-modules
46 BuildRequires:  unzip
47 Obsoletes:      certificates
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         certsdir        /etc/certs
52
53 %description
54 Common CA Certificates PEM files.
55
56 %description -l pl.UTF-8
57 Pliki PEM popularnych certyfikatów CA.
58
59 %package update
60 Summary:        Script for updating CA Certificates database
61 Summary(pl.UTF-8):      Skrypt do odświeżania bazy certyfikatów CA
62 Group:          Libraries
63 Requires:       %{name} = %{version}-%{release}
64 Requires:       mktemp
65 Requires:       openssl-tools >= 0.9.8i-3
66
67 %description update
68 Script and data for updating CA Certificates database.
69
70 %description update -l pl.UTF-8
71 Skrypt i dane do odświeżania bazy certyfikatów CA.
72
73 %prep
74 %setup -q
75 %patch0 -p1
76 %patch1 -p1
77 %patch2 -p1
78 %patch3 -p1
79
80 %{__unzip} -qq %{SOURCE1} -d thawte
81 # resolve file name clash
82 mv 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA.pem' \
83         'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA_CC.pem'
84
85 find thawte/ -name *.pem | while read f ; do
86         ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g')
87         fff="thawte/$(basename "$ff" .pem).crt"
88         tr -d '\r' < "$f" > "$fff"
89 done
90
91 install -d certum
92 install %{SOURCE2} certum
93 install %{SOURCE3} certum
94 install %{SOURCE4} certum
95 install %{SOURCE5} certum
96 install %{SOURCE6} certum
97 install %{SOURCE7} certum
98 install %{SOURCE8} certum
99 install %{SOURCE9} certum
100 install %{SOURCE10} certum
101 install %{SOURCE11} certum
102 install %{SOURCE12} certum
103 install %{SOURCE13} certum
104 for a in certum/*.pem; do
105         mv "$a" "${a%.pem}.crt"
106 done
107
108 %build
109 %{__make}
110
111 # We have those and more in specific dirs
112 rm mozilla/{Thawte,thawte,Certum}*.crt
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 (
122 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
123 find . -name '*.crt' | sort | cut -b3-
124 ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
125
126 (
127 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
128 find . -name '*.crt' -print0 | xargs -0 cat
129 ) > $RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post update
135 %{_sbindir}/update-ca-certificates --fresh || :
136
137 %files
138 %defattr(644,root,root,755)
139 %config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt
140
141 %files update
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_sbindir}/update-ca-certificates
144 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
145 %{_datadir}/ca-certificates
This page took 0.059255 seconds and 2 git commands to generate.