Debian Codegraph @

packaging/solaris/build_pkg.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # Shell script for building Solaris package of rsync
3 # Author: Jens Apel <[email protected]>
4 # License: GPL
5 #
6 # BASEDIR is /usr/local and should be the same as the
7 # --prefix parameter of configure
8 #
9 # this script should be copied under
10 # packaging/solaris/5.8/build_pkg.sh
11
12 # Definitions start here
13 # you can edit this, if you like
14
15 # The Package name under which rsync will b installed
16 PKGNAME=SMBrsync
17
18 # Extract common info requires for the 'info' part of the package.
19 # This should be made generic and generated by the configure script
20 # but for now it is hard coded
21 BASEDIR=/usr/localscip-shell filesystem . . `/usr/local`.
22 VERSION="2.5.5"
23 ARCH=`unamescip-shell system . . uname. -p`
24 NAME=rsync
25
26 # Definitions end here
27 # Please do not edit below this line or you know what you do.
28
29 ## Start by faking root install
30 echoscip-shell system . . echo. "Creating install directory (fake $BASEDIR)..."
31 START=`pwdscip-shell system . . pwd.`
32 FAKE_ROOT=$START/${PKGNAME}
33 mkdirscip-shell system . . mkdir. $FAKE_ROOT
34
35 # copy the binary and the man page to their places
36 mkdirscip-shell system . . mkdir. $FAKE_ROOT/bin
37 mkdirscip-shell system . . mkdir. -p $FAKE_ROOT/doc/rsync
38 mkdirscip-shell system . . mkdir. -p $FAKE_ROOT/man/man1
39 mkdirscip-shell system . . mkdir. -p $FAKE_ROOT/man/man5
40
41 cpscip-shell system . . cp. ../../../rsync $FAKE_ROOT/bin/rsync
42 cpscip-shell system . . cp. ../../../rsync.1 $FAKE_ROOT/man/man1/rsync.1
43 cpscip-shell system . . cp. ../../../rsyncd.conf.5 $FAKE_ROOT/man/man5/rsyncd.conf.5
44 cpscip-shell system . . cp. ../../../README.md $FAKE_ROOT/doc/rsync/README.md
45 cpscip-shell system . . cp. ../../../COPYING $FAKE_ROOT/doc/rsync/COPYING
46 cpscip-shell system . . cp. ../../../tech_report.pdf $FAKE_ROOT/doc/rsync/tech_report.pdf
47 cpscip-shell system . . cp. ../../../COPYING $FAKE_ROOT/COPYING
48
49 ## Build info file
50 echoscip-shell system . . echo. "Building pkginfo file..."
51 catscip-shell system . . cat. > $FAKE_ROOT/pkginfo << EOF_INFO
52 PKG=$PKGNAME
53 NAME=$NAME
54 DESC="Program for efficient remote updates of files."
55 VENDOR="Samba Team URL: http://samba.anu.edu.au/rsync/"
56 BASEDIR=$BASEDIR
57 ARCH=$ARCH
58 VERSION=$VERSION
59 CATEGORY=application
60 CLASSES=none
61 EOF_INFO
62
63 ## Build prototype file
64 catscip-shell system . . cat. > $FAKE_ROOT/prototype << EOFPROTO
65 i copyright=COPYING
66 i pkginfo=pkginfo
67 d none bin 0755 bin bin
68 f none bin/rsync 0755 bin bin
69 d none doc 0755 bin bin
70 d none doc/$NAME 0755 bin bin
71 f none doc/$NAME/README.md 0644 bin bin
72 f none doc/$NAME/COPYING 0644 bin bin
73 f none doc/$NAME/tech_report.pdf 0644 bin bin
74 d none man 0755 bin bin
75 d none man/man1 0755 bin bin
76 f none man/man1/rsync.1 0644 bin bin
77 d none man/man5 0755 bin bin
78 f none man/man5/rsyncd.conf.5 0644 bin bin
79 EOFPROTO
80
81 ## And now build the package.
82 OUTPUTFILE=$PKGNAME-$VERSION-sol8-$ARCH-local.pkg
83 echoscip-shell system . . echo. "Building package.."
84 echoscip-shell system . . echo. FAKE_ROOT = $FAKE_ROOT
85 cd $FAKE_ROOT
86 pkgmk -d . -r . -f ./prototype -o
87 pkgtrans -os . $OUTPUTFILE $PKGNAME
88
89 mvscip-shell system . . mv. $OUTPUTFILE ..
90 cd ..
91
92 # Comment this out if you want to see, which file structure has been created
93 rmscip-shell system . . rm. -rf $FAKE_ROOT
94