source: npl/system/ca_certificates/ca-certificates.SlackBuild.orig @ f9ce31e

perl-5.22
Last change on this file since f9ce31e was f9ce31e, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

updated to openssl 1.1.x, added ca-certificates. cleanup

  • Property mode set to 100755
File size: 3.4 KB
Line 
1#!/bin/bash
2
3# Slackware build script for ca-certificates
4
5# Copyright 2009,2011  Robby Workman  Northport, AL, USA
6# Copyright 2012, 2013, 2015, 2016, 2018  Patrick J. Volkerding, Sebeka, MN, USA
7# All rights reserved.
8#
9# Redistribution and use of this script, with or without modification, is
10# permitted provided that the following conditions are met:
11#
12# 1. Redistributions of this script must retain the above copyright
13#    notice, this list of conditions and the following disclaimer.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
16# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
18# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26cd $(dirname $0) ; CWD=$(pwd)
27
28PKGNAM=ca-certificates
29VERSION=${VERSION:-20180409}
30ARCH=noarch
31BUILD=${BUILD:-1}
32
33# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
34# the name of the created package would be, and then exit. This information
35# could be useful to other scripts.
36if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
37  echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
38  exit 0
39fi
40
41TARVERSION=${VERSION}
42
43TMP=${TMP:-/tmp}
44PKG=$TMP/package-$PKGNAM
45
46rm -rf $PKG
47mkdir -p $TMP $PKG/usr/share/ca-certificates $PKG/usr/sbin
48cd $TMP
49
50# Need both $PKGNAM and $PKGNAM-$VERSION since upstream can't decide how
51# to package their tarball:
52rm -rf $PKGNAM $PKGNAM-$VERSION
53
54# Extract the tarball:
55tar xvf $CWD/${PKGNAM}_$TARVERSION.tar.?z || exit 1
56
57# Again, both $PKGNAM and $PKGNAM-$VERSION are needed here:
58cd $PKGNAM-$VERSION 2> /dev/null || cd $PKGNAM || exit 1
59
60chown -R root:root .
61find . \
62 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
63 -exec chmod 755 {} \; -o \
64 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
65 -exec chmod 644 {} \;
66
67# Obsolete?
68#zcat $CWD/patches/fixup_DESTDIR.diff.gz | patch -p1 || exit 1
69
70# Remove incompatible command operators used to call 'run-parts':
71zcat $CWD/patches/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
72
73make || exit 1
74make install DESTDIR=$PKG || exit 1
75
76mkdir -p $PKG/etc/ca-certificates/update.d
77printf "# Automatically generated by $PKGNAM-$VERSION \n#\n" \
78  > $PKG/etc/ca-certificates.conf.new
79( cd $PKG/usr/share/ca-certificates
80  find . -name '*.crt' | sort | cut -b3-
81) >> $PKG/etc/ca-certificates.conf.new
82
83mkdir -p $PKG/usr/man/man8
84gzip -9c sbin/update-ca-certificates.8 > \
85  $PKG/usr/man/man8/update-ca-certificates.8.gz
86
87mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
88#mv debian/NEWS debian/NEWS.Debian
89cp -a  debian/README.Debian $PKG/usr/doc/$PKGNAM-$VERSION
90
91mkdir -p $PKG/var/log/setup
92cat $CWD/setup.11.cacerts > $PKG/var/log/setup/setup.11.cacerts
93chmod 755 $PKG/var/log/setup/setup.11.cacerts
94
95mkdir -p $PKG/install
96cat $CWD/slack-desc > $PKG/install/slack-desc
97zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
98
99cd $PKG
100/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
Note: See TracBrowser for help on using the repository browser.