aboutsummaryrefslogtreecommitdiff
path: root/mhonarc/MHonArc.build
blob: db130ca555e94e4f04e31917a6547e024be5b6cd (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
#!/bin/bash
#
# build script for MHonArc by rhatto | gpl
# build it with slacktrack, example:
#
#   slacktrack -jefkzp "MHonArc-2.6.15-noarch-1rha.tgz" "./MHonArc.build"
# 

CWD="`pwd`"

# default settings
PACKAGE="MHonArc"
ARCH="noarch"
_TMP="/tmp"
_VERSION="2.6.15"
_BUILD="1rha"

if [ -f "/etc/slackbuildrc" ]; then
  source /etc/slackbuildrc
fi

if [ -f "~/.slackbuildrc" ]; then
  source ~/.slackbuildrc
fi

if [ -z "$VERSION" ]; then
  VERSION="$_VERSION"
fi

if [ -z "$BUILD" ]; then
  BUILD="$_BUILD"
fi

if [ "$ARCH" == "x86_64" ]; then
  LIBDIR=/usr/lib64
else
  LIBDIR=/usr/lib
fi

if [ -z "$SRC" ]; then
  SRC_DIR="$CWD"
else
  SRC_DIR="$SRC"
fi

if [ -z "$TMP" ]; then
  TMP="$_TMP"
fi

RTOOL="wget"
PACKAGE_EXT="gz"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://download.savannah.gnu.org/releases/mhonarc/$SRC"
#URL="http://www.mhonarc.org/release/MHonArc/tar/$SRC"

gpg --import << EOPGP
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.0 (GNU/Linux)

mQGiBEKOHu4RBACtUzT7qUPCkph1Pq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LbiF+3XNy9f76DhOm
yLxMuN+rq361uV2ePXjcUSl6XuvdNuz25lRRL32wNxDnnwAECwf/TiqZeiHH5qPC
MmoQxZd90VW5/rLO0kgb/ijBQpgrjvKcWp3XsQcrRi/Ah4jyGzR4v0ueoGFN04k9
rH4KZT61W7qtlG32YNvJIlmoOmuD6144GJExqbuLO09skXyUipQlaYIGFgkNHeBO
v6YZ/CHIBeFYWju0mzsviITAbg+kW4bkm/kUFxQMFpIJTBDhYCh1WiWymwluTTxf
3YmQu+0zloVC0C2CqdiPj+f6W73EtOOFHLcNdK4POXFjfdbTxw2MBUDHhorhr7vf
ogj0dmUR8jUCLWd/0TPjyJ+Yd6F83T0y0G8KOzGTm0rsNoR0YrXv3TI/I0oge7H1
A4EURC+Cb4hJBBgRAgAJBQJCjh/3AhsMAAoJEEfx4u7GMGYGATgAnRYYeRWI+SMF
HQLvCJtzi5ItzFcUAKCsbdsaPrV6noZQ+IjvSYat1ObXVQ==
=2R87
-----END PGP PUBLIC KEY BLOCK-----
EOPGP

if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
 rm -f $SRC_DIR/$SRC $SRC_DIR/$SRC.sig
 wget "$URL" -O "$SRC_DIR/$SRC"
 wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"
fi

gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found.

if [ "$PACKAGE_EXT" == "bz2" ]; then
  tarflag="j"
else
  tarflag="z"
fi

rm -rf $TMP/package-$PACKAGE
mkdir $TMP/package-$PACKAGE
cd $TMP/package-$PACKAGE
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION

perl install.me -batch

mkdir -p /usr/doc/$PACKAGE

for file in ACKNOWLG BUGS CHANGES COPYING FILELIST INSTALL README.txt RELNOTES TODO; do
  cp $file* /usr/doc/$PACKAGE/
done

mkdir -p /install
cat << EOF > /install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

       |-----handy-ruler-----------------------------------------------------|
MHonArc: MHonArc (mail archiver)
MHonArc:
MHonArc: MHonArc is a Perl program for converting mail or news messages into
MHonArc: HTML archives. It can also be used to convert individual messages
MHonArc: into HTML documents. Other capabilities include robust MIME support
MHonArc: and powerful user customization features.
MHonArc:
MHonArc:
MHonArc:
MHonArc:
MHonArc:
EOF