-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkproto
executable file
·97 lines (88 loc) · 2.58 KB
/
mkproto
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
#!/bin/ksh
#
# SPDX-License-Identifier: CDDL-1.0
#
# generate a prototype file for input to pkgmk
#
# feed to pkgmk like so:
# pkgmk -d /tmp -f tt -r `pwd` TRIBilluminate
#
JARDIR=usr/share/illuminate
LIBDIR=usr/lib
OWNER="root bin"
SYSOWNER="root sys"
JLIB="libkstat_jni.so"
JPLIB="libproc_jni.so"
MYARCH=$1
PKGTYPE="standalone"
if [ "X$2" = "Xdeps" ]; then
JFCVERS="1.5.4"
JFCPKGVER="150"
PKGTYPE="withdeps"
cat > depend <<EOF
P TRIBjfreechart-${JFCPKGVER}
P TRIBjkstat
P TRIBjproc
EOF
echo "i depend=./depend"
fi
#
# if a standalone package, we are architecture-dependent because the package
# includes the jni libraries. If withdeps, we use the already packaged jni
# libraries provided by the jkstat and jproc packages
#
if [ "X$PKGTYPE" = "Xstandalone" ]; then
echo "i pkginfo=./pkginfo.${MYARCH}"
else
echo "i pkginfo=./pkginfo"
fi
echo "i postinstall=./postinstall"
echo "i postremove=./postinstall"
if [ "X$PKGTYPE" = "Xstandalone" ]; then
case $MYARCH in
i386)
echo "f none /${LIBDIR}/amd64/${JLIB}=lib/amd64/${JLIB} 0755 ${OWNER}"
echo "f none /${LIBDIR}/amd64/${JPLIB}=lib/amd64/${JPLIB} 0755 ${OWNER}"
;;
sparc)
echo "f none /${LIBDIR}/sparcv9/${JLIB}=lib/sparcv9/${JLIB} 0755 ${OWNER}"
echo "f none /${LIBDIR}/sparcv9/${JPLIB}=lib/sparcv9/${JPLIB} 0755 ${OWNER}"
;;
esac
fi
echo "f none /usr/bin/illuminate=illuminate.installed 0755 ${OWNER}"
echo "d none /usr/share 0755 ${SYSOWNER}"
echo "d none /usr/share/illuminate 0755 ${OWNER}"
echo "d none /usr/share/man 0755 ${OWNER}"
echo "f none /usr/share/man/man1/illuminate.1=man1/illuminate.1 0644 ${OWNER}"
echo "f none /usr/share/illuminate/README.md=./README.md 0644 ${OWNER}"
echo "f none /usr/share/applications/illuminate.desktop=./illuminate.desktop 0644 ${OWNER}"
echo "f none /usr/share/pixmaps/illuminate.png=./pixmaps/illuminate.png 0644 ${OWNER}"
#
# if depending on installed packages, then:
# jfreechart come from TRIBjfreechart-###
#
if [ "X$PKGTYPE" = "Xstandalone" ]; then
for path in lib/java/*
do
pname=${path##*/}
echo "f none /${JARDIR}/${pname}=${path} 0644 ${OWNER}"
done
else
for path in lib/java/jfreechart*
do
pname=${path##*/}
echo "s none /${JARDIR}/${pname}=../jfreechart-${JFCVERS}/${pname}"
done
for path in lib/java/jingle.jar lib/java/jksta* lib/java/jstripchart.jar lib/java/jumble.jar lib/java/json-20240303.jar
do
pname=${path##*/}
echo "s none /${JARDIR}/${pname}=../jkstat/${pname}"
done
for path in lib/java/jproc*jar
do
pname=${path##*/}
echo "s none /${JARDIR}/${pname}=../jproc/${pname}"
done
echo "f none /${JARDIR}/illuminate.jar=lib/java/illuminate.jar 0644 ${OWNER}"
fi