[packages/openssl/AC-branch] migrate to new structure used on HEAD: /var/lib/openssl -> /etc/openssl

glen glen at pld-linux.org
Sun Sep 2 11:47:42 CEST 2012


commit 9bab535523d6cffe04e29ac5189855c3e1941c47
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Sep 2 12:46:08 2012 +0300

    migrate to new structure used on HEAD: /var/lib/openssl -> /etc/openssl

 openssl.spec | 64 +++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 37 insertions(+), 27 deletions(-)
---
diff --git a/openssl.spec b/openssl.spec
index 5b08e14..a3742e8 100644
--- a/openssl.spec
+++ b/openssl.spec
@@ -14,7 +14,7 @@ Summary(ru.UTF-8):	Библиотеки и утилиты для соедине
 Summary(uk.UTF-8):	Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
 Name:		openssl
 Version:	0.9.7m
-Release:	6
+Release:	7
 License:	Apache-like
 Group:		Libraries
 Source0:	ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
@@ -39,11 +39,11 @@ BuildRequires:	perl-devel >= 1:5.6.1
 BuildRequires:	rpm-perlprov >= 4.1-13
 BuildRequires:	rpmbuild(macros) >= 1.213
 BuildRequires:	sed >= 4.0
+Requires:	ca-certificates >= 20110502+nmu1-1
 Obsoletes:	SSLeay
 Obsoletes:	SSLeay-devel
 Obsoletes:	SSLeay-perl
 Obsoletes:	libopenssl0
-Requires:	ca-certificates
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -102,6 +102,7 @@ Summary:	OpenSSL command line tool and utilities
 Summary(pl.UTF-8):	Zestaw narzędzi i skryptów
 Group:		Applications/Communications
 Requires:	%{name} = %{version}-%{release}
+Requires:	which
 
 %description tools
 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
@@ -218,36 +219,38 @@ touch Makefile.*
 
 %{__perl} util/perlpath.pl %{__perl}
 
-OPTFLAGS="%{rpmcflags} %{?with_purify:-DPURIFY}"
-export OPTFLAGS
+OPTFLAGS="%{rpmcflags} %{rpmcppflags} %{?with_purify:-DPURIFY}" \
+./Configure \
+	--openssldir=%{_sysconfdir}/%{name} \
+	shared \
 %ifarch %{ix86}
 %ifarch i386
-# allow running on 80386 (default code uses bswapl available on i486+)
-./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared 386
+	linux-elf 386
+# ^- allow running on 80386 (default code uses bswapl available on i486+)
 %else
-./Configure --openssldir=%{_var}/lib/%{name} linux-elf shared
+	linux-elf
 %endif
 %endif
 %ifarch alpha
-./Configure --openssldir=%{_var}/lib/%{name} threads linux-alpha+bwx-gcc shared
+	threads linux-alpha+bwx-gcc
 %endif
 %ifarch %{x8664}
-./Configure --openssldir=%{_var}/lib/%{name} linux-x86_64 shared
+	linux-x86_64
 %endif
 %ifarch ia64
-./Configure --openssldir=%{_var}/lib/%{name} linux-ia64 shared
+	linux-ia64
 %endif
 %ifarch ppc
-./Configure --openssldir=%{_var}/lib/%{name} linux-ppc shared
+	linux-ppc
 %endif
 %ifarch sparc
-./Configure --openssldir=%{_var}/lib/%{name} threads linux-sparcv8 shared
+	threads linux-sparcv8
 %endif
 %ifarch sparcv9
-./Configure --openssldir=%{_var}/lib/%{name} threads linux-sparcv9 shared
+	threads linux-sparcv9
 %endif
 %ifarch sparc64
-./Configure --openssldir=%{_var}/lib/%{name} threads linux64-sparcv9 shared
+	threads linux64-sparcv9
 %endif
 
 %{__make} \
@@ -334,12 +337,8 @@ install lib*.so.*.* $RPM_BUILD_ROOT%{_libdir}
 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
 
-mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/openssl.cnf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-ln -s %{_sysconfdir}/%{name}/openssl.cnf \
-	$RPM_BUILD_ROOT%{_var}/lib/%{name}/%{name}.cnf
-
-mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
-rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
+mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
 
 find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
 install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -357,26 +356,37 @@ rm -rf $RPM_BUILD_ROOT
 %post   -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+%triggerpostun -- %{name} < 0.9.7m-6.1
+if [ -d /var/lib/openssl/certs ] ; then
+	mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
+fi
+if [ -d /var/lib/openssl/private ] ; then
+	mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
+fi
+if [ -d /var/lib/openssl ] ; then
+	for f in /var/lib/openssl/* ; do
+		[ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
+	done
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
 %doc doc/openssl_button.gif doc/openssl_button.html
 %attr(755,root,root) %{_libdir}/libcrypto.so.*.*.*
 %attr(755,root,root) %{_libdir}/libssl.so.*.*.*
-%dir %{_var}/lib/%{name}
-%dir %{_var}/lib/%{name}/certs
-%dir %{_var}/lib/%{name}/private
+%dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/certs
+%dir %{_sysconfdir}/%{name}/private
 %dir %{_datadir}/ssl
 
 %files tools
 %defattr(644,root,root,755)
-%dir %{_sysconfdir}/%{name}
 
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
-%config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
 
-%attr(755,root,root) %{_bindir}/%{name}
 %attr(755,root,root) %{_bindir}/c_rehash.sh
+%attr(755,root,root) %{_bindir}/openssl
 %attr(755,root,root) %{_bindir}/openssl_fips_fingerprint
 %attr(754,root,root) %{_bindir}/ssl-certificate
 
@@ -437,7 +447,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/%{name}
 %{_pkgconfigdir}/openssl.pc
 %{_mandir}/man3/openssl*.3*
-%{_mandir}/man7/*.7*
+%{_mandir}/man7/openssl_des_modes.7*
 
 %files static
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openssl.git/commitdiff/9bab535523d6cffe04e29ac5189855c3e1941c47



More information about the pld-cvs-commit mailing list