aboutsummaryrefslogtreecommitdiff
path: root/net/mail/mhonarc/MHonArc.build
blob: d224b1077cce7a9125e22e829efee40954dea61a (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
#
#  MHonArc.build 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 any later version.
#
#  MHonArc.build 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., 59 Temple
#  Place - Suite 330, Boston, MA 02111-1307, USA
#
# build script for MHonArc
# by rhatto at riseup.net by rhatto | gpl
# 

CWD="`pwd`"

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

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

# default settings
PACKAGE="MHonArc"
ARCH="noarch"
TMP=${TMP:=/tmp}
VERSION=${VERSION:=2.6.16}
ARCH=${ARCH:=i386}
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC:=$CWD}
PREFIX="/usr/local"

# -------  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

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)

mQGiBEKOHu4RBACtUzT7qUPCkph1PqSOykVrbFoC8KbQ4fJEk7uxZsmuFT4w0N86
NL+OSnSdwSLYWps1sYt9sIs8Z73vqHML0mUoRtpMq6iVaU2y+TjiXLPFe46BHGWk
wpqe04b9Bvv2hiK1SKn3UEq5Nh0qBlxa2nBZ7/KQgWYPmxX1Knk3IOXmCwCgs5Nn
LXXgsjlAw/LZ9NvGnrg58vkEAIvjIkYgTDdycST7wm5HN+UHvp6j5lhnlJQvl36f
xQ2FjwFAq1iKxtzyNY2tQ+gAyv17T4lkJEWM4JzcfQQor1M9FDzrHCbVwk7JpImT
iFv94ABhJt73QJjqI+nhW3oNOxYPj+e0VrpYymrzrXcqKyn1BlPoyNaQ2a9tLRvn
z5pEA/4mZiWip8bGJkGW5jRn56zrf4RqREAwHjs8XG92jDzWyIhX3mlv/8gCnOVY
TOD/KNZ9MyJfIgq/CeqdtK31I9a33LWSb1hsi4/rhOCUPPTkBhk5lWioKssS2W8C
CwUiYjWbIvBw12+Yvfm0JNNMGO/rzFOjj6s5WGO+B0weqfLcyrRATUhvbkFyYyBT
aWduaW5nIFVzZXIgKE1Ib25BcmMgU2lnbmluZyBLZXkpIDxtaG9uYXJjQG1ob25h
cmMub3JnPoheBBMRAgAeBQJCjh7uAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJ
EEfx4u7GMGYGuKMAn1WwLggyhQ6e8krX5aKpm8ZtrbVaAJ4w2yAZlsmETeHnkozq
e4fmW0u5DLkCDQRCjh/3EAgAq10ERViVtgnjJhJMq1FYOY/T1CUyzbKRSvZ186CF
vcU6Cdl14dftSf9cyiSHjAPyg+hRf+MJnZ2eJDJOI5wA9+ckST53lr3dLU895Xz9
0fBTO6uzMF3fiDazfe1PW/fWYpZtdwIPLTg2vlnoQ7NGF8hOUki8jL8CJIhN+UCq
ehsz/2x6FcFh4NQLbChiyTMhjOnu0M+xHxn4sl2nKcsSxy8Y9IkGo2cswQ8+V+Kw
9LPWem589bhfoKruDeNAn9K0uqpBYXlR7uhiWDjxklCGbzlLbiF+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

SRC_DIR="$SRC_DIR/$PACKAGE"

if [ ! -d "$SRC_DIR" ]; then
  mkdir -p $SRC_DIR
fi

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

gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || exit $ERROR_GPG

TMP="$TMP/$PACKAGE"

if [ ! -d "$TMP" ]; then
  mkdir -p $TMP
fi

cd $TMP

tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
cd $PACKAGE-$VERSION

perl install.me -batch || exit $ERROR_INSTALL

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