Skip to content

Instantly share code, notes, and snippets.

@bjauy
Forked from anonymous/PKGBUILD.txt
Last active December 11, 2015 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjauy/4554279 to your computer and use it in GitHub Desktop.
Save bjauy/4554279 to your computer and use it in GitHub Desktop.
Fix AM_CONFIG_HEADER error
# Contributor: Colin Shea <colin@evaryont.me>
pkgname=mutt-great-dane
pkgver=1.5.21
pkgrel=1
pkgdesc="A small but very powerful text-based mail client with sidebar, NNTP, compressed, trash folder, urlview, and much more!"
arch=('i686' 'x86_64')
url="http://lunar-linux.org/index.php?page=mutt-sidebar"
depends=('openssl' 'gdbm' 'mime-types' 'libsasl' 'slang' 'libidn'
'gnupg' 'gpgme')
makedepends=('libxslt' 'lynx')
conflicts=('mutt')
provides=('mutt')
source=(ftp://ftp.mutt.org/mutt/devel/mutt-${pkgver}.tar.gz
ftp://ftp.mutt.org/pub/mutt/contrib/urlview-0.9.tar.gz
muttrc.example
patch-${pkgver}.as.echo.2
patch-${pkgver}.ats.date_conditional.3
patch-${pkgver}.cd.ifdef.2
patch-${pkgver}.cd.purge_message.8
patch-${pkgver}.cd.source_multiple.3
patch-${pkgver}.csev.ask_passphrase.1
patch-${pkgver}.csev.yesnet.1
patch-${pkgver}.dgc.deepif.2
patch-${pkgver}.indexcolor-3+cb.diff
patch-${pkgver}.rr.compressed
patch-${pkgver}.sidebar.5302767aa6aa.txt
patch-${pkgver}.tamo.w3mface.3
patch-${pkgver}.vvv.initials
patch-${pkgver}.vvv.nntp.3
patch-${pkgver}.vvv.quote.2
patch-${pkgver}.csev.fix_pager_face
mutt-resent-header-weeding.patch
mutt-sendbox-bounce.patch
mutt-sendbox.patch
mutt-write_postponed.patch
mutt-attach.patch
newsrc_stat.patch
trash_folder-1.5.18.patch
mutt-xterm_title.patch.2
patch-0.9.dw.urlview-html.3
patch-0.9.csev.urlview-fixes.1
patch-0.9.csev.urlview-manprefix.1
urlview.c.qpd-patch)
md5sums=('a29db8f1d51e2f10c070bf88e8a553fd'
'67731f73e69297ffd106b65c8aebb2ab'
'336d1d8e290a0595dbe2cd92d720ffc9'
'5c67c8bf89160b48cfd6a110d0c8e34a'
'0670750f2d82a32391c842e202aae775'
'32d1899cfea50b0d00c7ca88406cb7ee'
'5f9d902fac287035889ffd3d4faae333'
'1aa94164f4169e20ab66a1b531535c6c'
'a952a79d527395e25e3c980497004327'
'31de8c2733f87de6046cd4f3ba7690a4'
'b3a07af278ed9c7f16310be2fe1675ea'
'7cb9520885799d634a7aa127c37e30e6'
'4b34b6911edd1bc7bf1c8eff33b35c08'
'f82db552859813b67b11efe24302362d'
'562339078f5f1be52f8f068a86a31676'
'1e22b6f0a2a6628289baee19c37e2536'
'df3f42fc79d4fd6205d9ffdc023c932f'
'dcdc940070d3bd0bcf7017af70cfffc3'
'04681abbfbc364c41ff348d06189b85d'
'eb4818622b6540770eeb81dbea8447f8'
'0bbc48f7c0cc10e15ac9dbae7d34b82d'
'267acfc33f6e3fc75e7f284347d9c4d6'
'26be8adc6ba3d2f407ff1d2ed2e647b4'
'659d26f6dae386d55a58c5311e57632e'
'e44269dcaada8e6ba9bd299bb4597899'
'a83177bfd298fa3d2644d538cc79379b'
'2c5f8df784be0d6c09e8e2295d3b6ebf'
'fe79ea2cc0c590762cd7940a1c8e2a9a'
'b9445c1e532a2a0969fb6e3d8fbc86b5'
'cddf01efd62c477adc8dada7d991b106'
'babae55851e89535b9719dea76c643a1')
license=('GPL')
build() {
if [ -e $srcdir/.built ] ; then
return 0;
fi
#####################################
## mutt
cd $srcdir/mutt-$pkgver
patch -p1 -Ni ../patch-${pkgver}.sidebar.5302767aa6aa.txt # Sidebar == awesome
patch -p1 -Ni ../patch-${pkgver}.vvv.nntp.3 # NNTP support. Gmane <3
# Use normal stat instead of lstat, to support symbolic directories
patch -p1 -Nui ../newsrc_stat.patch
patch -p1 -Nui ../patch-${pkgver}.rr.compressed # Support compressed mail
patch -p1 -Nui ../patch-${pkgver}.vvv.initials # Extra format for initials
patch -p1 -Nui ../patch-${pkgver}.vvv.quote.2 # Smarter quote handling
patch -p1 -Nui ../trash_folder-1.5.18.patch # Smart trash
patch -p1 -Nui ../mutt-attach.patch # Abort on missing attachments
# These following were up-ported by me, manually, after applying the previous
# patches. Most likely they will still apply, but with some fuzziness. Not
# sure, nor do I care enough to test. I want my mutt this featureful. It's
# awesome.
patch -p1 -Nui ../patch-${pkgver}.cd.ifdef.2 # Conditional support stuff
patch -p1 -Nui ../patch-${pkgver}.as.echo.2 # Feedback from scripts
# Different colors for each column (e.g. author, date, subject..)
patch -p1 -Nui ../patch-${pkgver}.indexcolor-3+cb.diff
# (Required: Trash Folder) - Skip the trash folder
patch -p1 -Nui ../patch-${pkgver}.cd.purge_message.8
# Source multiple files in a single call (useful for globbing)
patch -p1 -Nui ../patch-${pkgver}.cd.source_multiple.3
patch -p1 -Nui ../patch-${pkgver}.csev.ask_passphrase.1 # Fix passphrase error
patch -p1 -Nui ../patch-${pkgver}.tamo.w3mface.3 # Show X-Face in mutt
patch -p1 -Nui ../patch-${pkgver}.dgc.deepif.2 # Allow nested if statements
patch -p1 -Nui ../patch-${pkgver}.ats.date_conditional.3 # Conditions on dates
# Aron Griffis' sendbox patchset, updated for Mutt 1.5.21
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# I take no credit, but sendbox is useful, so it's being added.
patch -p1 < ../mutt-write_postponed.patch
patch -p1 < ../mutt-resent-header-weeding.patch
patch -p1 < ../mutt-sendbox.patch
patch -p1 < ../mutt-sendbox-bounce.patch
# mutt can set the xterm title! Smart lil' dog, eh?
patch -p1 < ${srcdir}/mutt-xterm_title.patch.2
patch -p1 -Nui ../patch-${pkgver}.csev.fix_pager_face # fix a syntax error
# Delete all the patch-save files
find -name \*.orig -delete
# Deprectated
sed -i '/^AM_C_PROTOTYPES$/{d;q;}' configure.ac
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac
# sed -i 's/AM_INIT_AUTOMAKE(mutt, \$mutt_cv_version)/AC_INIT([mutt], [\$mutt_cv_version])\nAM_INIT_AUTOMAKE/g' configure.ac
aclocal -I m4
autoheader
automake --foreign
autoconf
# (apply this patch after automake)
patch -p1 -i ../patch-${pkgver}.csev.yesnet.1 # Allow xslt to go online & d/l
./configure --prefix=/usr --sysconfdir=/etc \
--enable-gpgme --enable-pop --enable-imap --enable-smtp --enable-nntp \
--enable-debug --disable-warnings --enable-compressed --enable-exact-address \
--enable-hcache --enable-sendbox --with-slang --with-regex --with-gss \
--with-ssl=/usr --with-sasl --with-idn || return 1
make || return 1
#####################################
## urlview
cd $srcdir/urlview-0.9
patch -p1 -Nui ../patch-0.9.dw.urlview-html.3
patch -p1 -Nui ../patch-0.9.csev.urlview-fixes.1
patch -p1 -Nui ../urlview.c.qpd-patch
./configure --prefix=/usr --sysconfdir=/etc \
--with-slang --enable-warnings || return 1
make || return 1
# Delete all the patch-save files
find -name \*.orig -delete
touch $srcdir/.built
}
package() {
#####################################
## mutt
cd $srcdir/mutt-$pkgver
make DESTDIR=$pkgdir install || return 1
rm -f ${pkgdir}/usr/bin/{flea,muttbug}
rm -f ${pkgdir}/usr/share/man/man1/{flea,muttbug}.1
rm -f ${pkgdir}/etc/mime.types*
install -m644 -D ${srcdir}/muttrc.example ${pkgdir}/etc/muttrc.example
#####################################
## urlview
cd ../urlview-0.9
patch -p1 -Nui ../patch-0.9.csev.urlview-manprefix.1
mkdir -p $pkgdir/usr/man/man1/ $pkgdir/usr/bin
make DESTDIR=$pkgdir install || return 1
mv $pkgdir/usr/man/man1/* $pkgdir/usr/share/man/man1/
rm -r $pkgdir/usr/man
rm $srcdir/.built
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment