blob: 6138e20708b05d48e6d98968bd7afe8b070adf5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# Maintainer: Carl Kittelberger <icedream@icedream.pw>
pkgname=procertum-cardmanager
pkgver=2.2.12
pkgrel=3
epoch=
pkgdesc="Management of certificate profiles installed on the cryptoCertum card."
arch=(x86_64)
url="https://www.support.certum.eu/en/cert-offer-card-manager/"
license=("custom:procertum-cardmanager-software-license")
provides=()
source=(
"https://files.certum.eu/software/proCertumCardManager/Linux-Ubuntu/${pkgver}/proCertumCardManager-${pkgver}-${CARCH}-ubuntu.bin"
)
md5sums=('00febe8bc2dd86ef8bb7e70e50b102e0')
prepare() {
sh "./proCertumCardManager-${pkgver}-${CARCH}-ubuntu.bin" --noexec --keep --nox11 --nochown --target "${srcdir}/${pkgname}-${pkgver}"
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
#./zz_install
INSTALL_DIR="$pkgdir/opt/proCertumCardManager"
USER_DESKTOP_FILE=proCertumCardManager.desktop
SYSTEM_LIBRARY_INSTALL_DEFAULT_DIR="$pkgdir/usr/lib64"
SYSTEM_LIBRARY_INSTALL_DEFAULT_SECOND_DIR="$pkgdir/usr/lib"
SYSTEM_LIBRARY_INSTALL_DIR=$SYSTEM_LIBRARY_INSTALL_DEFAULT_DIR
SYSTEM_LIBRARY_INSTALL_LINK_DIR=$SYSTEM_LIBRARY_INSTALL_DEFAULT_SECOND_DIR
PKCS11_COMMON_PROFILE_LIBRARY_DIR=crypto3PKCS
PKCS11_COMMON_PROFILE_LIBRARY=$(printf "%s" sc30pkcs11-*-MS.so)
PKCS11_COMMON_PROFILE_LIBRARY_LINK=libcrypto3PKCS.so
PKCS11_SECURE_PROFILE_LIBRARY_DIR=cryptoCertum3PKCS
PKCS11_SECURE_PROFILE_LIBRARY=$(printf "%s" cryptoCertum3PKCS-*-MS.so)
PKCS11_SECURE_PROFILE_LIBRARY_LINK=libcryptoCertum3PKCS.so
SYSTEM_LIBRARY_INSTALL_DIR=$SYSTEM_LIBRARY_INSTALL_DEFAULT_SECOND_DIR
mkdir -p "$SYSTEM_LIBRARY_INSTALL_DIR"
mkdir -p "$INSTALL_DIR"
cp -R -a * "$INSTALL_DIR"
chown -R root:root "$INSTALL_DIR"
chmod 755 "$INSTALL_DIR"
mkdir $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR
chown root:root $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR
chmod 755 $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR
cp -a $PKCS11_COMMON_PROFILE_LIBRARY $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR
chown root:root $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR/$PKCS11_COMMON_PROFILE_LIBRARY
rm -f $SYSTEM_LIBRARY_INSTALL_LINK_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_LINK
ln -rs $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_DIR/$PKCS11_COMMON_PROFILE_LIBRARY $SYSTEM_LIBRARY_INSTALL_LINK_DIR/$PKCS11_COMMON_PROFILE_LIBRARY_LINK
mkdir $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR
chown root:root $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR
chmod 755 $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR
cp -a $PKCS11_SECURE_PROFILE_LIBRARY $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR
chown root:root $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR/$PKCS11_SECURE_PROFILE_LIBRARY
rm -f $SYSTEM_LIBRARY_INSTALL_LINK_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_LINK
ln -rs $SYSTEM_LIBRARY_INSTALL_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_DIR/$PKCS11_SECURE_PROFILE_LIBRARY $SYSTEM_LIBRARY_INSTALL_LINK_DIR/$PKCS11_SECURE_PROFILE_LIBRARY_LINK
# remove installer scripts
rm "$INSTALL_DIR"/zz_* "$INSTALL_DIR"/proCertumCardManager_uninstall_pl
# install link to binary
mkdir -p "$pkgdir/usr/bin"
ln -rs "$pkgdir/opt/proCertumCardManager/proCertumCardManager" "$pkgdir/usr/bin/"
# install desktop file
mkdir -p "$pkgdir/usr/share/applications"
cp -R -a "$USER_DESKTOP_FILE" "$pkgdir/usr/share/applications/"
# install license
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$INSTALL_DIR"/proCertumCardManager_*_licence.rtf
}
|