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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# $NetBSD: Makefile,v 1.7 2021/05/24 19:54:20 wiz Exp $
DISTNAME= tsm-${PKGVER}
PKGVER= 8.1.12.0
PKGNAME= ${DISTNAME:C/-/8-/}
PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86/BA/v8112/
DISTFILES= ${PKGVER}-TIV-TSMBAC-LinuxX86.tar
# pkgsrc fetch corrupts the distfile download
FETCH_USING= wget
MAINTAINER= hauke@NetBSD.org
HOMEPAGE= https://www.ibm.com/us-en/marketplace/data-protection-and-recovery
COMMENT= IBM Spectrum Protect (aka Tivoli Storage Manager) Backup Client
CONFLICTS+= tsm-[0-9]*
PKG_SYSCONFSUBDIR= tsm
DOC_DIR= share/doc/tsm
DOC_SRCDIR= ${DESTDIR}${PREFIX}/emul/linux/opt/tivoli/tsm/license/baclient/tsm
EG_DIR= share/examples/tsm
CONF_FILES= ${PREFIX}/${EG_DIR}/dsm.sys.smp ${PKG_SYSCONFDIR}/dsm.sys
CONF_FILES+= ${PREFIX}/${EG_DIR}/dsm.opt.smp ${PKG_SYSCONFDIR}/dsm.opt
PUBLIC_BINS= dsmc
BUILD_DEFS+= VARBASE
# See the license agreements in {PREFIX}/emul/linux/opt/tivoli/tsm/license/
RESTRICTED= Redistribution of repackaged binaries not permitted
NO_SRC_ON_CDROM= ${RESTRICTED}
NO_SRC_ON_FTP= ${RESTRICTED}
NO_BIN_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_FTP= ${RESTRICTED}
NOT_FOR_PLATFORM= Linux-*-* NetBSD-[0-1].*-*
EMUL_PLATFORMS= linux-x86_64
#EMUL_REQD= suse>=13.1
EMUL_MODULES.linux= base
RUN_LDCONFIG= yes
.include "../../mk/bsd.prefs.mk"
WRKSRC= ${WRKDIR}
BUILD_DIRS= # empty
USE_TOOLS+= rpm2pkg grep sed
RPMFILES= ${WRKDIR}/TIVsm-BA.x86_64.rpm \
${WRKDIR}/TIVsm-API64.x86_64.rpm \
${WRKDIR}/gskcrypt64-8.0.55.21.linux.x86_64.rpm \
${WRKDIR}/gskssl64-8.0.55.21.linux.x86_64.rpm
EMUL_PKG_FMT= rpm
RPM2PKG_PREFIX= ${DESTDIR}${PREFIX}
RPM2PKG_SUBPREFIX= ${EMULSUBDIR}
RPM2PKG_STRIP= 0
RPM2PKG_PLIST= # none generated
RPM2PKG_STAGE= do-install
PLIST_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
PLIST_SUBST+= EMULDIR=${EMULDIR}
PLIST_SUBST+= TSMCLIENTSUBDIR=${TSMCLIENTSUBDIR:Q}
TSMCLIENTSUBDIR= opt/tivoli/tsm/client
LICENSE_TEXTS= LA_en.txt non_ibm_license.txt notices.txt
# For PLIST regen, build package with PKG_OPTIONS.tsm = java
PRINT_PLIST_AWK+= { gsub(/^.+\.jar$$/, "$${PLIST.java}&"); }
PRINT_PLIST_AWK+= { gsub(/^.+\/dsmj$$/, "$${PLIST.java}&"); }
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing hardcoded paths.
SUBST_STAGE.paths= pre-install
SUBST_FILES.paths= tsm_daily.sh
SUBST_SED.paths= -e "s,%PKG_SYSCONFDIR%,${PKG_SYSCONFDIR},g"
SUBST_SED.paths+= -e "s,%PREFIX%,${PREFIX},g"
SUBST_SED.paths+= -e "s,%VARBASE%,${VARBASE},g"
MESSAGE_SUBST+= EMULDIR=${EMULDIR}
INSTALLATION_DIRS+= bin emul/linux/etc/ld.so.conf.d ${DOC_DIR} ${EG_DIR}
.include "options.mk"
post-configure:
${CP} ${FILESDIR}/tsm_daily.sh ${WRKSRC}
do-extract:
cd ${WRKDIR} && ${EXTRACTOR} ${DISTDIR}/${DISTFILES:Q}
post-install:
.if empty(PKG_OPTIONS:Mjava)
for bb in `${SED} -e '/^[$$]{PLIST\\.java}/!d' -e 's/^[$$]{PLIST\\.java}//g' ${PLIST_SRC}`; do \
${RM} -f ${DESTDIR}${PREFIX}/$${bb}; \
done
.else
find ${DESTDIR}${PREFIX} -name \*.jar -exec chmod -x {} \;
.endif
find ${DESTDIR}${PREFIX} -name \*.txt -exec chmod -x {} \;
.for lt in ${LICENSE_TEXTS}
${INSTALL_DATA} ${DOC_SRCDIR}/${lt} ${DESTDIR}${PREFIX}/${DOC_DIR}
.endfor
${INSTALL_DATA} ${DESTDIR}${EMULDIR}/${TSMCLIENTSUBDIR}/ba/bin/dsm.*.smp \
${DESTDIR}${PREFIX}/${EG_DIR}
${INSTALL_DATA} ${WRKSRC}/tsm_daily.sh ${DESTDIR}${PREFIX}/${EG_DIR}
${INSTALL_DATA} ${FILESDIR}/tsm_ld.so.conf.${MACHINE_ARCH} \
${DESTDIR}${EMULDIR}/etc/ld.so.conf.d/tsm_ld.so.conf
${LN} -fs /..${PKG_SYSCONFDIR}/dsm.sys \
${DESTDIR}${EMULDIR}/${TSMCLIENTSUBDIR}/ba/bin/
${LN} -fs /..${PKG_SYSCONFDIR}/dsm.opt \
${DESTDIR}${EMULDIR}/${TSMCLIENTSUBDIR}/ba/bin/
.for bb in ${PUBLIC_BINS}
${LN} -fs ../${EMULSUBDIR}/${TSMCLIENTSUBDIR}/ba/bin/${bb} \
${DESTDIR}${PREFIX}/bin/${bb}
.endfor
.include "../../mk/bsd.pkg.mk"
|