blob: 11279b7577dd9de858963a82fa66b693a79ab21c (
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
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
#!/bin/bash
#
# slackbuild for gnutls from http://www.slacky.it/download/libraries/gnutls/1.2.11/
#
# Heavily based on the Slackware 10.2 SlackBuild
# ftp://ftp.gnutls.org/pub/gnutls/
# Requirements: libgpg-error, libgcrypt and optionally opencdk, libtasn1, libcfg+, lzo
#
# small changes by rhatto
#
if [ -s "slack-required" ]; then
echo Recomended and required packages for building gnutls are:
cat slack-required | sed -e 's/^/\t/'
if [ "$INTERACT" != "no" ]; then
echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
read crap
# else
# echo Sleeping 3 seconds...
# sleep 3
fi
fi
CWD=`pwd`
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
# default settings
PACKAGE="gnutls"
ARCH=${ARCH:=i486}
VERSION=${VERSION:=1.4.5}
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
# ------- error codes for createpkg --------------
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40
if [ "$ARCH" == "x86_64" ]; then
export LDFLAGS="-L/lib64 -L/usr/lib64"
LIBDIR=/usr/lib64
else
LIBDIR=/usr/lib
fi
RTOOL="wget"
TARGET="$ARCH"
NAME="$PACKAGE"
PACKAGE_EXT="bz2"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://www.mirrors.wiretapped.net/security/network-security/$PACKAGE/$SRC"
SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
if [ "$RTOOL" == "wget" ]; then
if [ ! -f "$SRC_DIR/$SRC" ]; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
if [ ! -f "$SRC_DIR/$SRC.sig" ]; then
wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
fi
fi
gpg --import <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBDmUO7kRBADJPqpr72gKNfZT9YdtYOaDXKwQwwjEwAQGz8Bo0tMcz6w1+npv
8PEzdvDBohH2wufbfbEbOI1fDi/GVoTL3Ut5v8C+nOLB7MuBx2l6f4m3Rf3kO7Qu
1pFfaXmS9J2uM/+Joqbubco+u/HENuCKqqlidjY/7RhZi/6Q3qzMAiF8pwCglB8Q
jlysMxwTcXtIm0KSbXbmoYkD/AiVcE8Q6CsJU4CndFkDrL6jc/szoE5vaClmDrGW
tVg3AzFakQZ2iKQtxUO22I909yj/rkl+KcmCOO7GD1Fm2t6YrctBCOnOM+gcBE7I
o6jSsQrS3NqwaCkLMwNjpmoQz23QSGIhfihfEjyi6FEcfga7tTmB//hiYpXjyr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ERROR_GPG
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mcpu=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
TMP="$TMP/$PACKAGE"
PKG=$TMP/package-gnutls
rm -rf $TMP
mkdir -p $PKG
cd $TMP
tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
cd $NAME-$VERSION
chown -R root.root .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr --libdir=$LIBDIR \
--disable-static \
--program-prefix="" \
--program-suffix="" \
$TARGET-slackware-linux || exit $ERROR_CONF
make || exit $ERROR_MAKE
make install DESTDIR=$PKG || exit $ERROR_INSTALL
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS $PKG/usr/doc/$NAME-$VERSION
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
chown -R root.bin $PKG/usr/bin
gzip -9 $PKG/usr/man/*/*
rm $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
#requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $REPOS/$NAME-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP
fi
|