Date: Saturday, February 25, 2017 @ 22:33:14
  Author: jgc
Revision: 289549

upgpkg: openssl-1.0 1.0.2.k-2

Move files to where they belong. Only exception here is the pkgconfig files: 
either we rename them or we put them in an alternative location, both will 
require adjustments to software

Modified:
  openssl-1.0/trunk/PKGBUILD

----------+
 PKGBUILD |   29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-02-25 22:07:27 UTC (rev 289548)
+++ PKGBUILD    2017-02-25 22:33:14 UTC (rev 289549)
@@ -6,7 +6,7 @@
 # use a pacman compatible version scheme
 pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
 #pkgver=$_ver
-pkgrel=1
+pkgrel=2
 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer 
Security'
 arch=('i686' 'x86_64')
 url='https://www.openssl.org'
@@ -35,7 +35,7 @@
 }
 
 build() {
-       cd $srcdir/openssl-$_ver
+       cd "$srcdir/openssl-$_ver"
 
        if [ "${CARCH}" == 'x86_64' ]; then
                openssltarget='linux-x86_64'
@@ -46,7 +46,7 @@
        fi
 
        # mark stack as non-executable: http://bugs.archlinux.org/task/12434
-       ./Configure --prefix=/usr/lib/$pkgname --openssldir=/etc/ssl 
--libdir=lib \
+       ./Configure --prefix=/usr --openssldir=/etc/ssl 
--libdir=lib/openssl-1.0 \
                shared no-ssl3-method ${optflags} \
                "${openssltarget}" \
                "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
@@ -56,15 +56,28 @@
 }
 
 check() {
-       cd $srcdir/openssl-$_ver
-
+       cd "$srcdir/openssl-$_ver"
        make test
 }
 
 package() {
-       cd $srcdir/openssl-$_ver
+       cd "$srcdir/openssl-$_ver"
 
-       make INSTALL_PREFIX=$pkgdir install_sw
-       rm -rf $pkgdir/{usr/lib/${pkgname}/{bin,ssl},etc}
+       make INSTALL_PREFIX="$pkgdir" install_sw
+
+       # Move some files around
+       install -m755 -d "$pkgdir/usr/include/openssl-1.0"
+       mv "$pkgdir/usr/include/openssl" "$pkgdir/usr/include/openssl-1.0/"
+       mv "$pkgdir/usr/lib/openssl-1.0/libcrypto.so.1.0.0" "$pkgdir/usr/lib/"
+       mv "$pkgdir/usr/lib/openssl-1.0/libssl.so.1.0.0" "$pkgdir/usr/lib/"
+       ln -sf ../libssl.so.1.0.0 "$pkgdir/usr/lib/openssl-1.0/libssl.so"
+        ln -sf ../libcrypto.so.1.0.0 "$pkgdir/usr/lib/openssl-1.0/libcrypto.so"
+       mv "$pkgdir/usr/bin/openssl" "$pkgdir/usr/bin/openssl-1.0"
+
+       # Update includedir in .pc files
+       sed -e 's|/include$|/include/openssl-1.0|' -i 
"$pkgdir"/usr/lib/openssl-1.0/pkgconfig/*.pc
+
+       rm -rf "$pkgdir"/{etc,usr/bin/c_rehash}
+
        install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
 }

Reply via email to