-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkproto
executable file
·71 lines (64 loc) · 1.71 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
#!/bin/sh
#
# 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` TRIBkar
#
JARDIR=usr/share/kar
LIBDIR=usr/lib/ka
OWNER="root bin"
SYSOWNER="root sys"
KCOL="kar_collector"
MYARCH=$1
PKGTYPE="standalone"
echo "i pkginfo=./pkginfo.${MYARCH}"
if [ "X$2" = "Xdeps" ]; then
JFCVERS="1.5.4"
JFCPKGVER="150"
PKGTYPE="withdeps"
cat > depend <<EOF
P TRIBjfreechart-${JFCPKGVER}
EOF
echo "i depend=./depend"
fi
case $MYARCH in
i386)
echo "f none /${LIBDIR}/${KCOL}=bin/i386/${KCOL} 0755 ${OWNER}"
;;
sparc)
echo "f none /${LIBDIR}/${KCOL}=bin/sparc/${KCOL} 0755 ${OWNER}"
;;
esac
echo "f none /usr/lib/ka/kadc=kadc 0755 ${OWNER}"
echo "f none /usr/lib/ka/kaclean=kaclean 0755 ${OWNER}"
echo "f none /usr/lib/ka/README.md=README.md 0644 ${OWNER}"
echo "f none /usr/bin/kar=kar.installed 0755 ${OWNER}"
echo "d none /usr/share 0755 ${SYSOWNER}"
echo "d none /usr/share/kar 0755 ${SYSOWNER}"
echo "d none /usr/share/man 0755 ${OWNER}"
echo "d none /usr/share/man/man1 0755 ${OWNER}"
echo "d none /usr/share/man/man8 0755 ${OWNER}"
echo "f none /usr/share/man/man1/kar.1=man1/kar.1 0644 ${OWNER}"
echo "f none /usr/share/man/man8/kadc.8=man1/kadc.8 0644 ${OWNER}"
echo "d none /var/adm/ka 0755 sys sys"
if [ "X$PKGTYPE" = "Xstandalone" ]; then
for path in lib/java/*.jar
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 $(ls -1 lib/java/*.jar | grep -v /jfreechart)
do
pname=${path##*/}
echo "f none /${JARDIR}/${pname}=${path} 0644 ${OWNER}"
done
fi