mirror of
https://abf.rosa.ru/djam/openssl.git
synced 2025-02-23 16:22:50 +00:00
Use the same macro name in spec and macro file
This commit is contained in:
parent
e224c53606
commit
6dc16262dc
1 changed files with 24 additions and 24 deletions
48
openssl.spec
48
openssl.spec
|
@ -22,12 +22,12 @@
|
||||||
# during the build.
|
# during the build.
|
||||||
# The purpose is a system-wide definition of this directory
|
# The purpose is a system-wide definition of this directory
|
||||||
# to guarantee consistency across the whole repository.
|
# to guarantee consistency across the whole repository.
|
||||||
%define openssldir %{_sysconfdir}/pki/tls
|
%define _openssldir %{_sysconfdir}/pki/tls
|
||||||
|
|
||||||
Summary: Secure Sockets Layer communications libs & utils
|
Summary: Secure Sockets Layer communications libs & utils
|
||||||
Name: openssl
|
Name: openssl
|
||||||
Version: 1.0.2q
|
Version: 1.0.2q
|
||||||
Release: 4
|
Release: 5
|
||||||
License: BSD-like
|
License: BSD-like
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Url: https://www.openssl.org
|
Url: https://www.openssl.org
|
||||||
|
@ -82,15 +82,15 @@ RSA and SSL.
|
||||||
%dir %{_sysconfdir}/pki
|
%dir %{_sysconfdir}/pki
|
||||||
%dir %{_sysconfdir}/pki/CA
|
%dir %{_sysconfdir}/pki/CA
|
||||||
%dir %{_sysconfdir}/pki/CA/private
|
%dir %{_sysconfdir}/pki/CA/private
|
||||||
%dir %{openssldir}
|
%dir %{_openssldir}
|
||||||
%dir %{openssldir}/certs
|
%dir %{_openssldir}/certs
|
||||||
%dir %{openssldir}/misc
|
%dir %{_openssldir}/misc
|
||||||
%dir %{openssldir}/private
|
%dir %{_openssldir}/private
|
||||||
%dir %{openssldir}/rootcerts
|
%dir %{_openssldir}/rootcerts
|
||||||
%attr(0644,root,root) %config(noreplace) %{openssldir}/openssl.cnf
|
%attr(0644,root,root) %config(noreplace) %{_openssldir}/openssl.cnf
|
||||||
%attr(0755,root,root) %{openssldir}/certs/make-dummy-cert
|
%attr(0755,root,root) %{_openssldir}/certs/make-dummy-cert
|
||||||
%attr(0644,root,root) %{openssldir}/certs/Makefile
|
%attr(0644,root,root) %{_openssldir}/certs/Makefile
|
||||||
%attr(0755,root,root) %{openssldir}/misc/*
|
%attr(0755,root,root) %{_openssldir}/misc/*
|
||||||
%attr(0755,root,root) %{_bindir}/*
|
%attr(0755,root,root) %{_bindir}/*
|
||||||
%attr(0644,root,root) %{_mandir}/man[157]/*
|
%attr(0644,root,root) %{_mandir}/man[157]/*
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ sslarch=linux-generic32
|
||||||
# usable on all platforms. The Configure script already knows to use -fPIC and
|
# usable on all platforms. The Configure script already knows to use -fPIC and
|
||||||
# RPM_OPT_FLAGS, so we can skip specifiying them here.
|
# RPM_OPT_FLAGS, so we can skip specifiying them here.
|
||||||
./Configure \
|
./Configure \
|
||||||
--openssldir=%{openssldir} ${sslflags} \
|
--openssldir=%{_openssldir} ${sslflags} \
|
||||||
--enginesdir=%{_libdir}/openssl-%{major}/engines \
|
--enginesdir=%{_libdir}/openssl-%{major}/engines \
|
||||||
--prefix=%{_prefix} --libdir=%{_lib}/ %{?_with_krb5:--with-krb5-flavor=MIT -I%{_prefix}/kerberos/include -L%{_prefix}/kerberos/%{_lib}} \
|
--prefix=%{_prefix} --libdir=%{_lib}/ %{?_with_krb5:--with-krb5-flavor=MIT -I%{_prefix}/kerberos/include -L%{_prefix}/kerberos/%{_lib}} \
|
||||||
zlib no-idea no-rc5 enable-camellia enable-seed enable-tlsext enable-rfc3779 enable-cms sctp shared ${sslarch}
|
zlib no-idea no-rc5 enable-camellia enable-seed enable-tlsext enable-rfc3779 enable-cms sctp shared ${sslarch}
|
||||||
|
@ -313,16 +313,16 @@ install -d %{buildroot}%{_libdir}/openssl-%{major}
|
||||||
mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl-%{major}/engines
|
mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl-%{major}/engines
|
||||||
|
|
||||||
# make the rootcerts dir
|
# make the rootcerts dir
|
||||||
install -d %{buildroot}%{openssldir}/rootcerts
|
install -d %{buildroot}%{_openssldir}/rootcerts
|
||||||
|
|
||||||
# Install a makefile for generating keys and self-signed certs, and a script
|
# Install a makefile for generating keys and self-signed certs, and a script
|
||||||
# for generating them on the fly.
|
# for generating them on the fly.
|
||||||
install -d %{buildroot}%{openssldir}/certs
|
install -d %{buildroot}%{_openssldir}/certs
|
||||||
install -m0644 Makefile.certificate %{buildroot}%{openssldir}/certs/Makefile
|
install -m0644 Makefile.certificate %{buildroot}%{_openssldir}/certs/Makefile
|
||||||
install -m0755 make-dummy-cert %{buildroot}%{openssldir}/certs/make-dummy-cert
|
install -m0755 make-dummy-cert %{buildroot}%{_openssldir}/certs/make-dummy-cert
|
||||||
|
|
||||||
# Pick a CA script.
|
# Pick a CA script.
|
||||||
mv %{buildroot}%{openssldir}/misc/CA.sh %{buildroot}%{openssldir}/misc/CA
|
mv %{buildroot}%{_openssldir}/misc/CA.sh %{buildroot}%{_openssldir}/misc/CA
|
||||||
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/pki/CA
|
install -d %{buildroot}%{_sysconfdir}/pki/CA
|
||||||
install -d %{buildroot}%{_sysconfdir}/pki/CA/private
|
install -d %{buildroot}%{_sysconfdir}/pki/CA/private
|
||||||
|
@ -387,25 +387,25 @@ pushd %{buildroot}%{_libdir}/pkgconfig
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# adjust ssldir
|
# adjust ssldir
|
||||||
perl -pi -e "s|^CATOP=.*|CATOP=%{openssldir}|g" %{buildroot}%{openssldir}/misc/CA
|
perl -pi -e "s|^CATOP=.*|CATOP=%{_openssldir}|g" %{buildroot}%{_openssldir}/misc/CA
|
||||||
perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{openssldir}\";|g" %{buildroot}%{openssldir}/misc/CA.pl
|
perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_openssldir}\";|g" %{buildroot}%{_openssldir}/misc/CA.pl
|
||||||
perl -pi -e "s|\./demoCA|%{openssldir}|g" %{buildroot}%{openssldir}/openssl.cnf
|
perl -pi -e "s|\./demoCA|%{_openssldir}|g" %{buildroot}%{_openssldir}/openssl.cnf
|
||||||
|
|
||||||
# install openssl-config
|
# install openssl-config
|
||||||
install -m0755 %{SOURCE5} %{buildroot}/%{_bindir}/
|
install -m0755 %{SOURCE5} %{buildroot}/%{_bindir}/
|
||||||
# define values in openssl-config
|
# define values in openssl-config
|
||||||
sed -i %{buildroot}/%{_bindir}/openssl-config \
|
sed -i %{buildroot}/%{_bindir}/openssl-config \
|
||||||
-e "s#@VERSION@#%{version}#g" \
|
-e "s#@VERSION@#%{version}#g" \
|
||||||
-e "s#@OPENSSLDIR@#%{openssldir}#g" \
|
-e "s#@OPENSSLDIR@#%{_openssldir}#g" \
|
||||||
-e "s#@CPPFLAGS@#${CPPFLAGS}#g" \
|
-e "s#@CPPFLAGS@#${CPPFLAGS}#g" \
|
||||||
-e "s#@CFLAGS@#${RPM_OPT_FLAGS}#g" \
|
-e "s#@CFLAGS@#${RPM_OPT_FLAGS}#g" \
|
||||||
-e "s#@LDFLAGS@#%{ldflags}#g"
|
-e "s#@LDFLAGS@#%{ldflags}#g"
|
||||||
# test openssl-config
|
# test openssl-config
|
||||||
[ "$(%{buildroot}/%{_bindir}/openssl-config --openssldir)" = '%{openssldir}' ]
|
[ "$(%{buildroot}/%{_bindir}/openssl-config --openssldir)" = '%{_openssldir}' ]
|
||||||
|
|
||||||
# make and install openssl.macros
|
# make and install openssl.macros
|
||||||
install -d -m0755 %{buildroot}/%{_sys_macros_dir}
|
install -d -m0755 %{buildroot}/%{_sys_macros_dir}
|
||||||
cat %{SOURCE6} | sed -e "s#@OPENSSLDIR@#%{openssldir}#g" > %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
cat %{SOURCE6} | sed -e "s#@OPENSSLDIR@#%{_openssldir}#g" > %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
||||||
chmod 0644 %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
chmod 0644 %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
||||||
# verify openssl.macros
|
# verify openssl.macros
|
||||||
grep -q '%{openssldir}' %{buildroot}%{_sys_macros_dir}/openssl.macros
|
grep -q '%{_openssldir}' %{buildroot}%{_sys_macros_dir}/openssl.macros
|
||||||
|
|
Loading…
Add table
Reference in a new issue