File: LSB-BUILD

package info (click to toggle)
xastir 2.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,284 kB
  • sloc: ansic: 119,926; perl: 7,810; sh: 1,309; makefile: 392; sql: 102
file content (170 lines) | stat: -rwxr-xr-x 5,596 bytes parent folder | download | duplicates (2)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/sh

# Copyright (C) 2000-2023 The Xastir Group

# TODO:
# Check for a link at /opt/Xastir/share/xastir.  If found, remove it
# until we're done creating the .tar.bz2 file.  Perhaps do an rm -rf
# there and symlink it to /usr/local/share/xastir when done.

# NOTE:
# "Free Standards Group, FSG, Linux Standard Base, LSB, Free
# Standards Certified, LSB Certified and the Free Standards
# Certified logo are trademarks, service marks and certification
# marks, as appropriate, of Free Standards Group in the United
# States and in other countries."
#
# We are in no way representing that Xastir has been certified by
# the FSG.  To do so costs real money.  We do intend some Xastir
# binaries to install and run properly on LSB-3.0 compliant x86
# Linux systems though...
#

# The trick:  First compile Lesstif as an LSB package, installed at
# /opt/lsb-tmp, using LSB-BUILD-LESSTIF script.  The commands
# below assume you've set up the directory structure at /opt/lsb
# specified at the top of that script.
#
# We should have /opt/lsb/lib.orig & /opt/lsb/lib.lesstif
# directories at this point along with a symlink from /opt/lsb/lib
# -> lib.lesstif:
#
#   cd /opt/lsb
#   cp -R lib.orig lib.xastir
#   rm lib                 (remove the symlink we created before)
#   ln -s lib.xastir lib   (link to the new directory)
#   cd lib
#   rm libXt.so            (or just "chmod 000 libXt.so")
#   rm libz.so             (or just "chmod 000 libz.so")
#   cp /home/src/lsb/libXt.a .      (lib from LSB CVS: "lsb/appbat" module)
#   ln -s /opt/lsb-tmp/lib/libXm.a (from our Lesstif compile)
#   ln -s /opt/lsb-tmp/lib/libz.a
#   ln -s /opt/lsb-tmp/lib/libjpeg.a
#   ln -s /opt/lsb-tmp/lib/libpcre.a
#   ln -s /opt/lsb-tmp/lib/libcurl.a
#   ln -s /usr/local/lib/libtiff.a
#   ln -s /usr/local/lib/libproj.a
#   ln -s /usr/local/lib/libgeotiff.a
#   ln -s /opt/lsb-tmp/lib/libpng.a
#   ln -s /opt/lsb-tmp/lib/libjasper.a
#   ln -s /opt/lsb-tmp/lib/libGraphicsMagick.a libMagick.a
#   ln -s /opt/lsb-tmp/lib/libdb.a
#   ln -s /opt/lsb-tmp/lib/libXpm.a
#
#   cd /opt/lsb
#   cp -R include include.xastir
#   mv include include.orig
#   ln -s include.xastir include  (link to the new directory)
#   cd include
#   ln -s /opt/lsb-tmp/include/Xm (from our Lesstif compile)
#   ln -s /opt/lsb-tmp/include/pcre.h
#   ln -s /opt/lsb-tmp/include/curl
#   ln -s /opt/lsb-tmp/include/png.h
#   ln -s /opt/lsb-tmp/include/jasper
#   rm zlib.h
#   ln -s /opt/lsb-tmp/include/zlib.h
#   ln -s /opt/lsb-tmp/include/zconf.h
#   ln -s /opt/lsb-tmp/include/GraphicsMagick/magick
#   ln -s /opt/lsb-tmp/include/db.h
#   mkdir X11
#   cd X11
#   ln -s /opt/lsb-tmp/include/Xm/xpm.h

# This will allow us to statically link libraries without mucking
# around with the Makefiles.  When done compiling the LSB-Xastir
# package, put the /opt/lsb/lib directory back to normal by issuing
# these commands:
#
#  cd /opt/lsb
#  rm lib include             (remove the symlinks)
#  ln -s lib.orig lib         (link back to the original directory)
#  ln -s include.orig include (link back to the original directory)
#


REV="2.0.8"
FILENAME=`date +xastir-lsb-$REV-%Y-%b-%d.tar.bz2`


# Remove old versions of the package
rm xastir-lsb-*.bz2


./bootstrap.sh

export PATH=${PATH}:/opt/lsb/bin
export LSBCC_WARN=1

# A colon-separated list of "extra" shared libraries to link with
# the application.  Each shared lib must be LSB-compliant and must
# be distributed along with the application.
#export LSBCC_SHAREDLIBS=libXm.so

CC=lsbcc CXX=lsbc++ ./configure \
    --prefix=/opt/Xastir \
    --without-ax25 \
    --with-festival \
    --without-gpsman \
    --with-graphicsmagick \
    --with-proj \
    --with-geotiff \
    --without-gdal \
    --with-internal-shapelib \
    --with-pcre \
    --with-dbfawk \
    --with-map_cache \
    --with-rtree \
    --with-lsb

make clean

find . -type f -name Makefile -print | while read i
  do
    sed -i 's@/usr/include@/opt/lsb/include@g' $i
    sed -i 's@/usr/local/include@/opt/lsb/include@g' $i
    sed -i 's@/usr/X11R6/include@/opt/lsb/include@g' $i
    sed -i 's@/usr/lib@/opt/lsb/lib@g' $i
    sed -i 's@/usr/X11R6/lib@/opt/lsb/lib@g' $i
    sed -i 's@/usr/X11/lib@/opt/lsb/lib@g' $i
    sed -i 's@/usr/X11/include@/opt/lsb/include@g' $i
    sed -i 's@/usr/local/lib@/opt/lsb/lib@g' $i
  done

(make 2>&1) | tee make.log
strip src/xastir
strip src/xastir_udp_client
strip src/testdbfawk
strip callpass/callpass

# Get rid of the LSB-Xastir install files so that we get a clean
# install each time to make the .tar.bz2 file from.
echo Removing /opt/Xastir/
sudo /bin/rm -rf /opt/Xastir

(sudo make install 2>&1) | tee install.log

# Copy GraphicsMagick "gm" binary to the Xastir area
sudo /bin/cp /opt/lsb-tmp/bin/gm /opt/Xastir/bin/.

#(lsbappchk -nA /opt/Xastir/bin/xastir 2>&1) | grep -v SHT_NOTE
#(lsbappchk -nA /opt/Xastir/bin/callpass 2>&1) | grep -v SHT_NOTE
#(lsbappchk -nA /opt/Xastir/bin/xastir_udp_client 2>&1) | grep -v SHT_NOTE
#(lsbappchk -nA /opt/Xastir/bin/gm 2>&1) | grep -v SHT_NOTE
(lsbappchk -n /opt/Xastir/bin/xastir 2>&1) | grep -v SHT_NOTE
(lsbappchk -n /opt/Xastir/bin/callpass 2>&1) | grep -v SHT_NOTE
(lsbappchk -n /opt/Xastir/bin/xastir_udp_client 2>&1) | grep -v SHT_NOTE
(lsbappchk -n /opt/Xastir/bin/gm 2>&1) | grep -v SHT_NOTE


tar cjf $FILENAME /opt/Xastir

# Remove old versions of the package from the ftp site
#ssh eskimo rm ftp/aprs/xastir/LSB/xastir-lsb*

# Upload the latest version
scp xastir-lsb-$REV-* eskimo:ftp/aprs/xastir/LSB/.

# Fix the permissions so that people can download the file
ssh eskimo chmod 644 ftp/aprs/xastir/LSB/*