blob: 42c0135867e938336465260452f701376c763759 (
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
|
#!/bin/bash
#
# constroi o pacote do simplepkg
#
PACKAGE="simplepkg"
PACK_DIR="package-$PACKAGE"
BUILD="3rha"
VERSION="0.4.8"
ARCH="noarch"
LIBEXEC="/usr/libexec/$PACKAGE"
BINDIR="/usr/sbin"
DOC_DIR="/usr/doc"
BINARY_LIST="mkjail templatepkg jail-update jail-upgrade lspkg metapkg rebuildpkg simplaret createpkg"
LIB_LIST="common.sh"
DOC_LIST="COPYING TODO CHANGELOG README README.pt_BR README.simplaret README.simplaret.pt_BR"
rm -rf $PACK_DIR
mkdir -p $PACK_DIR/install
cp slack-desc $PACK_DIR/install
cp doinst.sh $PACK_DIR/install
mkdir -p $PACK_DIR/$BINDIR
for binary in $BINARY_LIST; do
chmod +x $binary
cp $binary $PACK_DIR/$BINDIR
done
mkdir -p $PACK_DIR/$LIBEXEC
for lib in $LIB_LIST; do
cp $lib $PACK_DIR/$LIBEXEC/
done
rm -rf $PACK_DIR/$DOC_DIR
mkdir -p $PACK_DIR/$DOC_DIR/$PACKAGE-$VERSION
for file in $DOC_LIST; do
cp $file $PACK_DIR/$DOC_DIR/$PACKAGE-$VERSION/
done
# especifico do simplepkg
mkdir -p $PACK_DIR/etc/$PACKAGE/
rsync -av --exclude=.svn templates/* $PACK_DIR/etc/$PACKAGE/
chmod +x $PACK_DIR/etc/$PACKAGE/vserver.s/*.sh
chmod +x $PACK_DIR/etc/$PACKAGE/vserver-legacy.s/*.sh
cp simplepkg.conf.new $PACK_DIR/etc/$PACKAGE
cp repos.conf.new $PACK_DIR/etc/$PACKAGE
cd $PACK_DIR/usr/sbin && ln -s jail-upgrade vserver-upgrade
cd -
# install script
echo '( if [ ! -f "/etc/simplepkg/simplepkg.conf" ]; then mv /etc/simplepkg.conf.new /etc/simplepkg/simplepkg.conf; fi )' > install/doinst.sh
echo '( if [ ! -f "/etc/simplepkg/repos.conf" ]; then mv /etc/simplepkg/repos.conf.new /etc/simplepkg/repos.conf; fi )' >> install/doinst.sh
cd $PACK_DIR
chown -R root.root *
makepkg -c y -l y ../simplepkg-$VERSION-$ARCH-$BUILD.tgz
cd ..
|