cruxports/mblaze/Pkgfile

47 lines
1.6 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
# Depends on:
name=mblaze
2024-09-14 15:53:07 -04:00
version=1.3
2022-05-12 11:16:20 -04:00
release=1
2024-08-01 14:11:56 -04:00
source=("https://leahneukirchen.org/releases/$name-$version.tar.gz"
2024-09-14 15:53:07 -04:00
mcom.patch mdeliver.patch mmime.patch mdelete.1 mailshow)
2022-02-05 15:39:19 -05:00
build() {
cd $name-$version
2024-09-14 15:53:07 -04:00
patch -p1 < $SRC/mcom.patch
2022-02-05 15:39:19 -05:00
# 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.
#
2024-09-14 15:53:07 -04:00
patch -p1 < $SRC/mdeliver.patch
2022-02-05 15:39:19 -05:00
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.
#
2024-09-14 15:53:07 -04:00
[ "${LANG:0:3}" = "en_" ] && patch -p1 < $SRC/mmime.patch
2022-02-05 15:39:19 -05:00
2024-08-01 14:11:56 -04:00
# dirent.h on CRUX musl protects some macros behind an ifdef test,
# which the upstream source does not pass.
sed -e '1a #define _LARGEFILE64_SOURCE' -i mlist.c
2022-02-05 15:39:19 -05:00
make all
make DESTDIR=$PKG PREFIX="/usr" install
BUILDDATE=$(date +'%Y-%m-%d')
cat > $PKG/usr/bin/museragent << EOF
#!/bin/sh
2024-11-20 08:29:44 -05:00
printf "%s\n" "User-Agent: $name/$version-$release ($BUILDDATE)"
2022-02-05 15:39:19 -05:00
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
}