- up to 20081127
[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:        20081127
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:  4a4b07e755e1506cab753eec9a2e7157
12 Source1:        https://www.verisign.com/support/thawte-roots.zip
13 # Source1-md5:  a3709cc0279ef3fca4f86ea775066b18
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:  ruby
44 BuildRequires:  unzip
45 Obsoletes:      certificates
46 BuildArch:      noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %define         certsdir        /etc/certs
50
51 %description
52 Common CA Certificates PEM files.
53
54 %description -l pl.UTF-8
55 Pliki PEM popularnych certyfikatów CA.
56
57 %package update
58 Summary:        Script for updating CA Certificates database
59 Summary(pl.UTF-8):      Skrypt do odświeżania bazy certyfikatów CA
60 Group:          Libraries
61 Requires:       %{name} = %{version}-%{release}
62 Requires:       mktemp
63 Requires:       openssl-tools >= 0.9.8i-3
64
65 %description update
66 Script and data for updating CA Certificates database.
67
68 %description update -l pl.UTF-8
69 Skrypt i dane do odświeżania bazy certyfikatów CA.
70
71 %prep
72 %setup -q -n %{name}
73 %patch0 -p1
74 %patch1 -p1
75 %patch2 -p1
76 %patch3 -p1
77
78 %{__unzip} -qq %{SOURCE1} '*_b64.txt' -d thawte
79 for a in thawte/{,*/}*.txt; do
80         mv "$a" "${a%_b64.txt}.crt"
81 done
82
83 install -d certum
84 install %{SOURCE2} certum
85 install %{SOURCE3} certum
86 install %{SOURCE4} certum
87 install %{SOURCE5} certum
88 install %{SOURCE6} certum
89 install %{SOURCE7} certum
90 install %{SOURCE8} certum
91 install %{SOURCE9} certum
92 install %{SOURCE10} certum
93 install %{SOURCE11} certum
94 install %{SOURCE12} certum
95 install %{SOURCE13} certum
96 for a in certum/*.pem; do
97         mv "$a" "${a%.pem}.crt"
98 done
99
100 %build
101 %{__make}
102
103 # We have those and more in specific dirs
104 rm mozilla/{Thawte,thawte,Certum}*.crt
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
109
110 %{__make} install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 (
114 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
115 find . -name '*.crt' | sort | cut -b3-
116 ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
117
118 (
119 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
120 find . -name '*.crt' -print0 | xargs -0 cat
121 ) > $RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %post update
127 %{_sbindir}/update-ca-certificates || :
128
129 %files
130 %defattr(644,root,root,755)
131 %config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt
132
133 %files update
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_sbindir}/update-ca-certificates
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
137 %{_datadir}/ca-certificates
This page took 0.057977 seconds and 3 git commands to generate.