cruxports/mblaze/Pkgfile

44 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-02-05 15:39:19 -05:00
# Description: suite of command-line tools for working with maildirs
# URL: https://github.com/leahneukirchen/mblaze/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Packager: Leah Neukirchen, leah at vuxu dot org
# Depends on:
name=mblaze
2022-05-12 11:16:20 -04:00
version=1.2
release=1
2022-02-05 15:39:19 -05:00
source=("https://github.com/leahneukirchen/mblaze/archive/v$version/$name-v$version.tar.gz"
2022-05-12 11:16:20 -04:00
reuse-sent.patch mblaze-delete.patch mblaze-fofl.patch mdelete.1 mailshow)
2022-02-05 15:39:19 -05:00
build() {
cd $name-$version
patch -p1 < $SRC/reuse-sent.patch
# Next patch adds support for easily deleting messages from disk, adopting the syntax
# of mrefile (except for the destination folder, of course). Comment out if you're
# wary of accidental data loss.
#
patch -p1 < $SRC/mblaze-delete.patch
cp $SRC/mdelete.1 man
#
# Next patch eliminates quoted-printable encoding in favor of 7bit, format=flowed,
# if it looks like English is the primary language of composition.
#
[ "${LANG:0:3}" = "en_" ] && patch -p1 < $SRC/mblaze-fofl.patch
make all
make DESTDIR=$PKG PREFIX="/usr" install
BUILDDATE=$(date +'%Y-%m-%d')
cat > $PKG/usr/bin/museragent << EOF
#!/bin/sh
printf "User-Agent: $name/$version-$release ($BUILDDATE)\n"
EOF
chmod 755 $PKG/usr/bin/museragent
# Now add a plugin for quickly viewing individual files under a maildir in nnn
if [ -d /usr/share/nnn/plugins ]; then
mkdir -p $PKG/usr/share/nnn/plugins
install -m 0755 $SRC/mailshow $PKG/usr/share/nnn/plugins
fi
}