#!/usr/bin/make -f

D := $(CURDIR)/debian/tin

DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow

%:
	dh $@

override_dh_clean:
	dh_clean doc/CHANGES.tmp

override_dh_autoreconf:

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-pcre=/usr --with-domain-name=/etc/mailname \
		--with-mailbox=/var/mail \
		--with-editor=/usr/bin/editor --with-ispell=ispell \
		--without-pgp --without-pgpk --with-gpg=gpg \
		--without-metamail --with-slrnface=slrnface \
		--with-sum=sum --with-shell=bash \
		--with-spool-dir=/var/spool/news \
		--with-nov-dir=/var/spool/news/over.view \
		--with-libdir=/var/lib/news --with-inews-dir=/usr/bin \
		--with-nntp-default-server=localhost \
		--with-screen=ncursesw --enable-nntp --enable-ipv6 \
		--enable-included-msgs --enable-nls \
		--enable-mh-mail-handling --enable-cancel-locks \
		--enable-heapsort --enable-debug --with-pkg-config \
		--with-mime-default-charset=ISO-8859-15

override_dh_auto_build:
	dh_auto_build --sourcedir=src

override_dh_auto_install:
	$(MAKE) -C src install_nls prefix=$D/usr

override_dh_installchangelogs:
	cat doc/CHANGES doc/CHANGES.old > doc/CHANGES.tmp
	dh_installchangelogs doc/CHANGES.tmp

