File: solaris_pkg_instructions

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bhg487%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,724 kB
  • ctags: 2,250
  • sloc: cpp: 18,524; python: 6,134; sh: 1,550; ansic: 1,537; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 86
file content (128 lines) | stat: -rw-r--r-- 3,776 bytes parent folder | download | duplicates (10)
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
123
124
125
126
127
128
Date: Thu, 18 Apr 2002 16:26:53 +0200
Organization: http://freemail.web.de/
From: Jens Apel <jens.apel@web.de>
Subject: Solaris Package Build Script for xxdiff
Precedence: fm-user

Hello Martin,
thanks for writing xxdiff - a real cool tool.
Since I wanted to use it under Solaris, I had to build 
Solaris Packages for my company. 
I wrote the following script to do that.
It would be nice, if you would put it into the next distribution.
I think it is useful for other people too.

Best regards,
Jens

---8< snipp-----------------------------------------

#!/bin/sh
# Shell script for building a Solaris package of xxdiff
# Written by <jens.apel@web.de>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# Prerequisites:
# 1. I have build Qt 2.3 statically and linked it
#    statically with xxdiff. This is not good, but it works...
#    Compiling Qt 2.3 under Solaris took me half a day...
# 2. Make sure libstdc++.so.2.10.0 is in your LD_LIBRARY_PATH
# 
# Building the Package:
# 1. copy this script to 
#    xxdiff-2.5/adm/build_pkg.sh
# 2. chmod u+x build_pkg.sh
# 3. Run it
#    cd adm
#    ./build_pkg.sh
#    This will create the package xxdiff-2.5-sol8-sparc-local.pkg
# 4. Install it
#    pkgadd -d xxdiff-2.5-sol8-sparc-local.pkg 
#    This will install the files
#    /usr/local/bin/xxdiff
#    /usr/local/man/man1/xxdiff.1
# 5. Use it
#    /usr/local/bin/xxdiff file1 file2
# 6. Have Fun !!


PKGNAME=xxdiff

## Extract common info requires for the 'info' part of the package.
VERSION=`grep "^XX_VERSION" ../src/xxdiff.pro | sed -e 's/.*=\([0-9.]\)/\1/g'`
ARCH=`uname -p`

## Start by faking root install 
echo "Faking root install..."
START=`pwd`
FAKE_ROOT=$START/xxdiff
mkdir $FAKE_ROOT


## Setup our run level stuff while we are at it.
mkdir -p $FAKE_ROOT/bin
mkdir -p $FAKE_ROOT/man/man1

# copy the binary and the man page to their places
cp ../src/xxdiff $FAKE_ROOT/bin
cp ../src/xxdiff.1 $FAKE_ROOT/man/man1

## Build info file
echo "Building pkginfo file..."
cat > $FAKE_ROOT/pkginfo << _EOF
PKG=$PKGNAME
NAME=xxdiff for Solaris
DESC="Graphical tool for comparing and merging files using Qt and diff"
VENDOR="Martin Blais <blais@furius.ca"
BASEDIR=/usr/local
ARCH=$ARCH
VERSION=$VERSION
CATEGORY=application
CLASSES=none
_EOF

## Build copyright file
echo "Building copyright file..."
cat > $FAKE_ROOT/copyright << _EOF
Copyright (C) 1999-2002 Martin Blais <blais@furius.ca>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

_EOF

## Build prototype file
cat > $FAKE_ROOT/prototype << _EOF
i copyright=copyright
i pkginfo=pkginfo
d none bin 0755 bin bin
d none man 0755 bin bin
d none man/man1 0755 bin bin
f none bin/xxdiff 0755 bin bin
f none man/man1/xxdiff.1 0644 bin bin
_EOF

## And now build the package.
OUTPUTFILE=$PKGNAME-$VERSION-sol8-$ARCH-local.pkg
echo "Building package.."
echo FAKE_ROOT = $FAKE_ROOT
cd $FAKE_ROOT 
pkgmk -d . -r . -f ./prototype -o
echo | pkgtrans -os . $OUTPUTFILE
mv $OUTPUTFILE ..
cd ..
rm -rf $FAKE_ROOT