description='A Markdown implementation written in C'
url='https://www.pell.portland.or.us/~orc/Code/discount/'

license='BSD-3-Clause'

packager="tnut <tnut@nutyx.org>"
contributors="Spiky"

name=discount
version=3.0.0.d
_version=3.0.0d
release=2

source=(https://github.com/Orc/discount/archive/v${_version}/$name-$version.tar.gz)

build() {
  cd $name-*
  ./configure.sh \
   --prefix=/usr \
   --enable-all-features \
   --with-fenced-code \
   --shared
   make

   # fix ldconfig call
   sed -e 's|/sbin/ldconfig|/sbin/ldconfig -n|' -i librarian.sh

   make DESTDIR=$PKG install.everything
   install -Dm644 COPYRIGHT \
   $PKG/usr/share/licenses/$name/LICENSE
}
